Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/ecmwf-projects/cookiecutter-conda-package",
"commit": "5c8a3dfc59e893134050fe4e355893dd1d08b2e7",
"commit": "d8e38d412bfd81121857042e6b2b755b0bbac1c5",
"checkout": null,
"context": {
"cookiecutter": {
Expand All @@ -12,7 +12,8 @@
"mypy_strict": "True",
"integration_tests": "False",
"pypi": "false",
"_template": "https://github.com/ecmwf-projects/cookiecutter-conda-package"
"_template": "https://github.com/ecmwf-projects/cookiecutter-conda-package",
"_commit": "d8e38d412bfd81121857042e6b2b755b0bbac1c5"
}
},
"directory": null
Expand Down
44 changes: 22 additions & 22 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -55,18 +55,18 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11']
python-version: ['3.11', '3.12']

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
Expand All @@ -87,23 +87,23 @@ 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
cache-environment: true
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 .
Expand All @@ -116,23 +116,23 @@ 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
cache-environment: true
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 .
Expand All @@ -149,19 +149,19 @@ jobs:
strategy:
matrix:
include:
- python-version: '3.11'
- python-version: '3.12'
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 }}
Expand All @@ -188,10 +188,10 @@ 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'
python-version: '3.12'
- name: Install package
run: |
python -m pip install --upgrade pip
Expand Down Expand Up @@ -226,10 +226,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.9.0
- uses: pypa/gh-action-pypi-publish@v1.12.4
with:
verbose: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
version.py

# Sphinx automatic generation of API
docs/README.md
docs/_api/

# Combined environments
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config-cruft.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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.5.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.14.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.4
rev: v8.28.0
hooks:
- id: gitleaks
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ COPY . /src/cads-processing-api-service

WORKDIR /src/cads-processing-api-service

RUN conda install -c conda-forge make gcc python=3.10 \
RUN conda install -c conda-forge make gcc python=3.12 \
&& make conda-env-update CONDAFLAGS="-n base"

RUN pip install --no-deps -e .
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ 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

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ CADS Processing API service

## 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
```

Expand Down
2 changes: 2 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@
autodoc_typehints = "none"

# autoapi configuration
autoapi_add_toctree_entry = False
autoapi_dirs = ["../cads_processing_api_service"]
autoapi_ignore = ["*/version.py"]
autoapi_member_order = "groupwise"
autoapi_options = [
"members",
"inherited-members",
Expand Down
1 change: 1 addition & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CADS Processing API service.
:caption: 'Contents:'
:maxdepth: 2

README.md
API Reference <_api/cads_processing_api_service/index>
```

Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -85,6 +86,7 @@ convention = "numpy"
packages = ["cads_processing_api_service"]

[tool.setuptools_scm]
fallback_version = "999"
write_to = "cads_processing_api_service/version.py"
write_to_template = '''
# Do not change! Do not track in version control!
Expand Down