From eada53644a1e1f72de455b2ce66073cedcea88e9 Mon Sep 17 00:00:00 2001 From: malmans2 Date: Tue, 19 Aug 2025 17:09:29 +0200 Subject: [PATCH 1/3] template update --- .cruft.json | 3 ++- .github/workflows/on-push.yml | 38 +++++++++++++++++------------------ .gitignore | 1 + .pre-commit-config-cruft.yaml | 2 +- .pre-commit-config.yaml | 12 +++++------ Makefile | 2 +- docs/conf.py | 2 ++ docs/index.md | 1 + pyproject.toml | 4 +++- 9 files changed, 36 insertions(+), 29 deletions(-) diff --git a/.cruft.json b/.cruft.json index 6c0bb72..ab8a050 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/ecmwf-projects/cookiecutter-conda-package", - "commit": "104191f7bf58670f65db81e04b34e7bf56bb4985", + "commit": "d7e6283cabfb764abba134ade577294ebb4af217", "checkout": null, "context": { "cookiecutter": { @@ -11,6 +11,7 @@ "copyright_year": "2022", "mypy_strict": "True", "integration_tests": "True", + "pypi": true, "_template": "https://github.com/ecmwf-projects/cookiecutter-conda-package" } }, diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index 81cd3b6..f40f20d 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -22,7 +22,7 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: actions/setup-python@v5 with: python-version: 3.x @@ -32,7 +32,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: actions/setup-python@v5 with: python-version: 3.x @@ -55,18 +55,18 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.11'] + python-version: ['3.11', '3.13'] steps: - - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 + - uses: actions/checkout@v5 + - uses: actions/download-artifact@v5 with: name: combined-environments path: ci - name: Get current date id: date run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}" - - uses: mamba-org/setup-micromamba@v1 + - uses: mamba-org/setup-micromamba@v2 with: environment-file: ci/combined-environment-ci.yml environment-name: DEVELOP @@ -87,15 +87,15 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 + - uses: actions/checkout@v5 + - uses: actions/download-artifact@v5 with: name: combined-environments path: ci - name: Get current date id: date run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}" - - uses: mamba-org/setup-micromamba@v1 + - uses: mamba-org/setup-micromamba@v2 with: environment-file: ci/combined-environment-ci.yml environment-name: DEVELOP @@ -116,15 +116,15 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 + - uses: actions/checkout@v5 + - uses: actions/download-artifact@v5 with: name: combined-environments path: ci - name: Get current date id: date run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}" - - uses: mamba-org/setup-micromamba@v1 + - uses: mamba-org/setup-micromamba@v2 with: environment-file: ci/combined-environment-ci.yml environment-name: DEVELOP @@ -155,15 +155,15 @@ jobs: extra: -integration steps: - - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 + - uses: actions/checkout@v5 + - uses: actions/download-artifact@v5 with: name: combined-environments path: ci - name: Get current date id: date run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}" - - uses: mamba-org/setup-micromamba@v1 + - uses: mamba-org/setup-micromamba@v2 with: environment-file: ci/combined-environment${{ matrix.extra }}.yml environment-name: DEVELOP${{ matrix.extra }} @@ -190,7 +190,7 @@ jobs: (needs.integration-tests.result == 'success' || needs.integration-tests.result == 'skipped') steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: actions/setup-python@v5 with: python-version: '3.11' @@ -217,7 +217,7 @@ jobs: runs-on: ubuntu-latest needs: distribution if: | - always() && + always() && true && needs.distribution.result == 'success' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags') @@ -228,10 +228,10 @@ jobs: id-token: write # IMPORTANT: this permission is mandatory for trusted publish steps: - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v5 with: name: distribution path: dist - - uses: pypa/gh-action-pypi-publish@v1.8.14 + - uses: pypa/gh-action-pypi-publish@v1.12.4 with: verbose: true diff --git a/.gitignore b/.gitignore index 46bc2fa..0f6a04f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ version.py # Sphinx automatic generation of API +docs/README.md docs/_api/ # Combined environments diff --git a/.pre-commit-config-cruft.yaml b/.pre-commit-config-cruft.yaml index b55f24f..4ab48c8 100644 --- a/.pre-commit-config-cruft.yaml +++ b/.pre-commit-config-cruft.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/cruft/cruft - rev: 2.15.0 + rev: 2.16.0 hooks: - id: cruft entry: cruft update -y diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d3deef5..1614480 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v6.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -12,28 +12,28 @@ repos: - id: debug-statements - id: mixed-line-ending - repo: https://github.com/keewis/blackdoc - rev: v0.3.9 + rev: v0.4.1 hooks: - id: blackdoc additional_dependencies: [black==23.11.0] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.3.5 + rev: v0.12.9 hooks: - id: ruff args: [--fix, --show-fixes] - id: ruff-format - repo: https://github.com/executablebooks/mdformat - rev: 0.7.17 + rev: 0.7.22 hooks: - id: mdformat - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks - rev: v2.13.0 + rev: v2.15.0 hooks: - id: pretty-format-yaml args: [--autofix, --preserve-quotes] - id: pretty-format-toml args: [--autofix] - repo: https://github.com/gitleaks/gitleaks - rev: v8.18.2 + rev: v8.28.0 hooks: - id: gitleaks diff --git a/Makefile b/Makefile index 468182f..85f2156 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,6 @@ template-update: pre-commit run --all-files cruft -c .pre-commit-config-cruft.yaml docs-build: - cd docs && rm -fr _api && make clean && make html + cp README.md docs/. && cd docs && rm -fr _api && make clean && make html # DO NOT EDIT ABOVE THIS LINE, ADD COMMANDS BELOW diff --git a/docs/conf.py b/docs/conf.py index 32046d0..eb43a3f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -37,8 +37,10 @@ autodoc_typehints = "none" # autoapi configuration +autoapi_add_toctree_entry = False autoapi_dirs = ["../ogc_api_processes_fastapi"] autoapi_ignore = ["*/version.py"] +autoapi_member_order = "groupwise" autoapi_options = [ "members", "inherited-members", diff --git a/docs/index.md b/docs/index.md index b2f2c36..7870b45 100644 --- a/docs/index.md +++ b/docs/index.md @@ -6,6 +6,7 @@ OGC API Processes service based on FastAPI. :caption: 'Contents:' :maxdepth: 2 +README.md API Reference <_api/ogc_api_processes_fastapi/index> ``` diff --git a/pyproject.toml b/pyproject.toml index 6ec71a6..3cd1ab6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,6 @@ [build-system] -requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"] +build-backend = "setuptools.build_meta" +requires = ["setuptools>=64", "setuptools_scm>=8"] [project] classifiers = [ @@ -62,6 +63,7 @@ convention = "numpy" packages = ["ogc_api_processes_fastapi"] [tool.setuptools_scm] +fallback_version = "999" write_to = "ogc_api_processes_fastapi/version.py" write_to_template = ''' # Do not change! Do not track in version control! From 1e0d2cc83835ebf98125dab12d961dfd50aec3ca Mon Sep 17 00:00:00 2001 From: malmans2 Date: Tue, 19 Aug 2025 17:09:42 +0200 Subject: [PATCH 2/3] no pypi --- .cruft.json | 5 +++-- .github/workflows/on-push.yml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.cruft.json b/.cruft.json index ab8a050..4541bc5 100644 --- a/.cruft.json +++ b/.cruft.json @@ -11,8 +11,9 @@ "copyright_year": "2022", "mypy_strict": "True", "integration_tests": "True", - "pypi": true, - "_template": "https://github.com/ecmwf-projects/cookiecutter-conda-package" + "pypi": false, + "_template": "https://github.com/ecmwf-projects/cookiecutter-conda-package", + "_commit": "d7e6283cabfb764abba134ade577294ebb4af217" } }, "directory": null diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index f40f20d..4015fc3 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -217,7 +217,7 @@ jobs: runs-on: ubuntu-latest needs: distribution if: | - always() && true && + always() && false && needs.distribution.result == 'success' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags') From 67e7975a4b0b6cc2c8a1626c9d19783de97f1df6 Mon Sep 17 00:00:00 2001 From: malmans2 Date: Tue, 19 Aug 2025 17:55:27 +0200 Subject: [PATCH 3/3] py3.12 --- .cruft.json | 4 ++-- .github/workflows/on-push.yml | 12 +++++------- Dockerfile | 2 +- README.md | 4 ++-- pyproject.toml | 1 + 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.cruft.json b/.cruft.json index 4541bc5..2c74ef2 100644 --- a/.cruft.json +++ b/.cruft.json @@ -1,6 +1,6 @@ { "template": "https://github.com/ecmwf-projects/cookiecutter-conda-package", - "commit": "d7e6283cabfb764abba134ade577294ebb4af217", + "commit": "d8e38d412bfd81121857042e6b2b755b0bbac1c5", "checkout": null, "context": { "cookiecutter": { @@ -13,7 +13,7 @@ "integration_tests": "True", "pypi": false, "_template": "https://github.com/ecmwf-projects/cookiecutter-conda-package", - "_commit": "d7e6283cabfb764abba134ade577294ebb4af217" + "_commit": "d8e38d412bfd81121857042e6b2b755b0bbac1c5" } }, "directory": null diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index 4015fc3..fdfefc2 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -55,7 +55,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.11', '3.13'] + python-version: ['3.11', '3.12'] steps: - uses: actions/checkout@v5 @@ -103,7 +103,7 @@ jobs: cache-environment-key: environment-${{ steps.date.outputs.date }} cache-downloads-key: downloads-${{ steps.date.outputs.date }} create-args: >- - python=3.11 + python=3.12 - name: Install package run: | python -m pip install --no-deps -e . @@ -132,7 +132,7 @@ jobs: cache-environment-key: environment-${{ steps.date.outputs.date }} cache-downloads-key: downloads-${{ steps.date.outputs.date }} create-args: >- - python=3.11 + python=3.12 - name: Install package run: | python -m pip install --no-deps -e . @@ -148,10 +148,8 @@ jobs: strategy: matrix: - python-version: ['3.8', '3.9'] - extra: ['-ci'] include: - - python-version: '3.8' + - python-version: '3.12' extra: -integration steps: @@ -193,7 +191,7 @@ jobs: - uses: actions/checkout@v5 - uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.12' - name: Install package run: | python -m pip install --upgrade pip diff --git a/Dockerfile b/Dockerfile index 785df5c..94bfbcb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /src/ogc-api-processes-fastapi COPY environment.yml /src/ogc-api-processes-fastapi/ -RUN conda install -c conda-forge gcc python=3.11 \ +RUN conda install -c conda-forge gcc python=3.12 \ && conda env update -n base -f environment.yml COPY . /src/ogc-api-processes-fastapi diff --git a/README.md b/README.md index d2c7e12..65c84a6 100644 --- a/README.md +++ b/README.md @@ -11,10 +11,10 @@ OGC API Processes service based on FastAPI ## Workflow for developers/contributors -For best experience create a new conda environment (e.g. DEVELOP) with Python 3.11: +For best experience create a new conda environment (e.g. DEVELOP) with Python 3.12: ``` -conda create -n DEVELOP -c conda-forge python=3.11 +conda create -n DEVELOP -c conda-forge python=3.12 conda activate DEVELOP ``` diff --git a/pyproject.toml b/pyproject.toml index 3cd1ab6..7161648 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,6 +11,7 @@ classifiers = [ "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Scientific/Engineering" ] dependencies = [