Skip to content
Closed
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
4 changes: 2 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": "a9c290fa0e810e9dee6c61991afac6f0c969c3b1",
"commit": "5ad0c955478c9b0fe8772545ef46291f5f314f75",
"checkout": null,
"context": {
"cookiecutter": {
Expand All @@ -13,7 +13,7 @@
"integration_tests": "True",
"pypi": true,
"_template": "https://github.com/ecmwf-projects/cookiecutter-conda-package",
"_commit": "a9c290fa0e810e9dee6c61991afac6f0c969c3b1"
"_commit": "5ad0c955478c9b0fe8772545ef46291f5f314f75"
}
},
"directory": null
Expand Down
46 changes: 23 additions & 23 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
- uses: pre-commit/action@v3.0.1
Expand All @@ -32,8 +32,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.x
- name: Install conda-merge
Expand All @@ -44,7 +44,7 @@ jobs:
for SUFFIX in ci integration; do
conda-merge ci/environment-$SUFFIX.yml environment.yml > ci/combined-environment-$SUFFIX.yml || exit
done
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v6
with:
name: combined-environments
path: ci/combined-environment-*.yml
Expand All @@ -55,11 +55,11 @@ 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@v6
- uses: actions/download-artifact@v7
with:
name: combined-environments
path: ci
Expand Down Expand Up @@ -87,8 +87,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- uses: actions/checkout@v6
- uses: actions/download-artifact@v7
with:
name: combined-environments
path: ci
Expand All @@ -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 .
Expand All @@ -116,8 +116,8 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- uses: actions/checkout@v6
- uses: actions/download-artifact@v7
with:
name: combined-environments
path: ci
Expand All @@ -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 .
Expand All @@ -149,12 +149,12 @@ 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@v6
- uses: actions/download-artifact@v7
with:
name: combined-environments
path: ci
Expand Down Expand Up @@ -188,10 +188,10 @@ jobs:
(needs.integration-tests.result == 'success' || needs.integration-tests.result == 'skipped')

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '3.11'
python-version: '3.12'
- name: Install package
run: |
python -m pip install --upgrade pip
Expand All @@ -206,7 +206,7 @@ jobs:
python -m twine check --strict * || exit
python -c "import openptv_python" || exit
cd ..
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v6
with:
name: distribution
path: dist
Expand All @@ -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@v7
with:
name: distribution
path: dist
- uses: pypa/gh-action-pypi-publish@v1.12.4
- uses: pypa/gh-action-pypi-publish@v1.13.0
with:
verbose: true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -471,3 +471,5 @@ $RECYCLE.BIN/

# End of https://www.toptal.com/developers/gitignore/api/python,jupyternotebooks,vim,visualstudiocode,pycharm,emacs,linux,macos,windows
.cruft.json
/.tmp
/tmp
14 changes: 7 additions & 7 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: v5.0.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.6
hooks:
- id: blackdoc
additional_dependencies: [black==23.11.0]
additional_dependencies: [black==25.9.0]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.11
rev: v0.15.2
hooks:
- id: ruff
args: [--fix, --show-fixes]
- id: ruff-format
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.22
rev: 1.0.0
hooks:
- id: mdformat
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.14.0
rev: v2.16.0
hooks:
- id: pretty-format-yaml
args: [--autofix, --preserve-quotes]
- id: pretty-format-toml
args: [--autofix]
- repo: https://github.com/gitleaks/gitleaks
rev: v8.26.0
rev: v8.30.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 @@ WORKDIR /src/openptv-python

COPY environment.yml /src/openptv-python/

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/openptv-python
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ PROJECT := openptv_python
CONDA := conda
CONDAFLAGS :=
COV_REPORT := html
PYTHON ?= python

default: qa unit-tests type-check

qa:
pre-commit run --all-files
$(PYTHON) -m pre_commit run --all-files

unit-tests:
python -m pytest -vv --cov=. --cov-report=$(COV_REPORT) --doctest-glob="*.md" --doctest-glob="*.rst"
$(PYTHON) -m pytest -vv --cov=. --cov-report=$(COV_REPORT) --doctest-glob="*.md" --doctest-glob="*.rst"

type-check:
python -m mypy .
$(PYTHON) -m mypy .
Comment on lines +5 to +16

conda-env-update:
$(CONDA) install -y -c conda-forge conda-merge
Expand Down
Loading
Loading