From 11c8e61cd508dfd0374040786e04ce130d4e9b32 Mon Sep 17 00:00:00 2001 From: Pierlou Date: Fri, 23 Jan 2026 13:34:25 +0100 Subject: [PATCH] chore: clean up repo --- .github/linters/.flake8 | 5 ----- .github/workflows/linting.yml | 27 -------------------------- .gitignore | 1 + docker-compose.yml | 2 +- plugins/operators/.gitignore | 2 -- plugins/operators/clean_folder.py | 32 ------------------------------- scripts/airflow-entrypoint.sh | 2 +- 7 files changed, 3 insertions(+), 68 deletions(-) delete mode 100755 .github/linters/.flake8 delete mode 100755 .github/workflows/linting.yml delete mode 100755 plugins/operators/.gitignore delete mode 100755 plugins/operators/clean_folder.py diff --git a/.github/linters/.flake8 b/.github/linters/.flake8 deleted file mode 100755 index 7354731..0000000 --- a/.github/linters/.flake8 +++ /dev/null @@ -1,5 +0,0 @@ -[flake8] -max-line-length = 88 -extend-ignore = - # See https://github.com/PyCQA/pycodestyle/issues/373 - E203, \ No newline at end of file diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml deleted file mode 100755 index 6dc0e4c..0000000 --- a/.github/workflows/linting.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: Lint Code Base -on: [push, pull_request] -jobs: - build: - name: Lint Code Base - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v2 - with: - # Full git history is needed to get a proper list - # of changed files within `super-linter` - fetch-depth: 0 - - name: Lint Code Base - uses: github/super-linter@v4 - env: - VALIDATE_ALL_CODEBASE: false # Only new or edited files - DEFAULT_BRANCH: main - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - VALIDATE_JSCPD: false # Copy/paste detection - VALIDATE_GITHUB_ACTIONS: false # Due to shellcheck SC2086 issues - VALIDATE_MARKDOWN: false # Due to multiple headings issue - # VALIDATE_PYTHON_BLACK: false # Not using black - VALIDATE_DOCKERFILE_HADOLINT: false - VALIDATE_HTML: false - PYTHON_FLAKE8_CONFIG_FILE: .flake8 diff --git a/.gitignore b/.gitignore index 40e7db8..7981b97 100755 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ ssh/ variables.py .DS_Store mise.local.toml +.vscode/ diff --git a/docker-compose.yml b/docker-compose.yml index 425b5a5..d9c420e 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,7 @@ services: context: . dockerfile: Dockerfile hostname: webserver - restart: always + restart: on-failure depends_on: - postgres command: webserver diff --git a/plugins/operators/.gitignore b/plugins/operators/.gitignore deleted file mode 100755 index a1b9cbb..0000000 --- a/plugins/operators/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -.env -__pycache__/ \ No newline at end of file diff --git a/plugins/operators/clean_folder.py b/plugins/operators/clean_folder.py deleted file mode 100755 index e3a9270..0000000 --- a/plugins/operators/clean_folder.py +++ /dev/null @@ -1,32 +0,0 @@ -import os -import shutil -from typing import Optional - -from airflow.models import BaseOperator - - -class CleanFolderOperator(BaseOperator): - """ - Clean tmp folder - :param folder_path: path of folder to clean - :type folder_path: str - - """ - - supports_lineage = True - - template_fields = ("folder_path",) - - def __init__( - self, - *, - folder_path: Optional[str] = None, - **kwargs, - ) -> None: - super().__init__(**kwargs) - - self.folder_path = folder_path - - def execute(self, context): - if os.path.exists(self.folder_path) and os.path.isdir(self.folder_path): - shutil.rmtree(self.folder_path) diff --git a/scripts/airflow-entrypoint.sh b/scripts/airflow-entrypoint.sh index c23e147..7c05681 100755 --- a/scripts/airflow-entrypoint.sh +++ b/scripts/airflow-entrypoint.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash + airflow resetdb airflow db init airflow upgradedb airflow users create -r Admin -u "$AIRFLOW_ADMIN_MAIL" -e "$AIRFLOW_ADMIN_MAIL" -f "$AIRFLOW_ADMIN_FIRSTNAME" -l "$AIRFLOW_ADMIN_NAME" -p "$AIRFLOW_ADMIN_PASSWORD" airflow scheduler & airflow webserver -