diff --git a/.secrets.baseline b/.secrets.baseline index 1db95684b..75ac03f99 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -207,5 +207,5 @@ } ] }, - "generated_at": "2025-01-14T12:14:14Z" + "generated_at": "2025-01-16T13:18:21Z" } diff --git a/Procfile.dev b/Procfile.dev index 6dbb4058d..2a65c5e52 100644 --- a/Procfile.dev +++ b/Procfile.dev @@ -1,3 +1,3 @@ services: docker compose --profile lvao up -web: .venv/bin/python manage.py runserver 0.0.0.0:8000 +web: poetry run python manage.py runserver 0.0.0.0:8000 npm: rm -rf .parcel-cache; npm run watch diff --git a/airflow-scheduler.Dockerfile b/airflow-scheduler.Dockerfile index 36c410505..117e6f364 100644 --- a/airflow-scheduler.Dockerfile +++ b/airflow-scheduler.Dockerfile @@ -27,8 +27,18 @@ COPY pyproject.toml poetry.lock ./ RUN --mount=type=cache,target=${POETRY_CACHE_DIR} poetry sync --with airflow --no-root + FROM apache/airflow:2.10.4 AS scheduler -USER ${AIRFLOW_UID:-50000} +USER root +WORKDIR /opt/ +RUN apt-get update +RUN apt-get install unzip +RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" +RUN unzip awscliv2.zip +RUN ./aws/install + +USER ${AIRFLOW_UID:-50000}:0 +WORKDIR /opt/airflow ENV CPLUS_INCLUDE_PATH=/usr/include/gdal \ C_INCLUDE_PATH=/usr/include/gdal \ VIRTUAL_ENV=/home/airflow/.local \ @@ -37,17 +47,11 @@ ENV CPLUS_INCLUDE_PATH=/usr/include/gdal \ COPY --from=python-builder ${VIRTUAL_ENV} ${VIRTUAL_ENV} COPY --from=builder ${CPLUS_INCLUDE_PATH} ${CPLUS_INCLUDE_PATH} -# Use user airflow -WORKDIR /opt/airflow -USER ${AIRFLOW_UID:-50000}:0 -RUN chown -R ${AIRFLOW_UID:-50000}:0 . # Set current directory to airflow root # Copy the dags, logs, config, and plugins directories to the appropriate locations COPY sync_dags.sh /opt/airflow/sync_dags.sh -RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \ - unzip awscliv2.zip \ - ./aws/install + # NĂ©cessaire pour faire fonctionner Django dans Airflow COPY core qfdmo qfdmd dsfr_hacks ./ diff --git a/poetry.lock b/poetry.lock index d71d31128..f53ca7b4c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1582,6 +1582,21 @@ files = [ [package.dependencies] Django = ">=3.2" +[[package]] +name = "django-filter" +version = "24.3" +description = "Django-filter is a reusable Django application for allowing users to filter querysets dynamically." +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "django_filter-24.3-py3-none-any.whl", hash = "sha256:c4852822928ce17fb699bcfccd644b3574f1a2d80aeb2b4ff4f16b02dd49dc64"}, + {file = "django_filter-24.3.tar.gz", hash = "sha256:d8ccaf6732afd21ca0542f6733b11591030fa98669f8d15599b358e24a2cd9c3"}, +] + +[package.dependencies] +Django = ">=4.2" + [[package]] name = "django-import-export" version = "4.3.4" @@ -1725,6 +1740,21 @@ files = [ django = "*" typing-extensions = "*" +[[package]] +name = "django-unfold" +version = "0.44.0" +description = "Modern Django admin theme for seamless interface development" +optional = false +python-versions = ">=3.8" +groups = ["main"] +files = [ + {file = "django_unfold-0.44.0-py3-none-any.whl", hash = "sha256:94da205caad9d5ba0d1a0542c2bacaadbf23d90bf176472214e53cecfc2e9469"}, + {file = "django_unfold-0.44.0.tar.gz", hash = "sha256:1a448c2ab993ab39811b5dede01f5b36066a2c7618b9db64c5f4b29aaa166b9c"}, +] + +[package.dependencies] +django = ">=3.2" + [[package]] name = "django-widget-tweaks" version = "1.5.0" @@ -6500,4 +6530,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.1" python-versions = "^3.12,<3.13" -content-hash = "0f4be247a346cab1e374010d38818fac7155f19eaccda48b2702577a5429b509" +content-hash = "9b158576ea57fab7ec1abb29d10b837384d20fa96b6317670455a403ea16db7a" diff --git a/pyproject.toml b/pyproject.toml index 115cd295e..acabc3e19 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,7 +69,7 @@ version = "1.57.0" description = "" license = "MIT" readme = "README.md" -requires-python = "^3.12,<3.13" +requires-python = ">=3.12,<3.13" [tool.poetry] package-mode = false