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
12 changes: 2 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ jobs:
name: "TypeChecking: pixi run typing"
runs-on: ubuntu-latest
needs: [cache-pixi-lock]
# TODO v4: Enable typechecking again
if: false
steps:
- name: Checkout
uses: actions/checkout@v5
Expand All @@ -185,14 +183,8 @@ jobs:
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
- name: Typechecking
run: |
pixi run typing --non-interactive --html-report mypy-report
- name: Upload test results
if: ${{ always() }} # Upload even on mypy error
uses: actions/upload-artifact@v7
with:
name: Mypy report
path: mypy-report
run: | # TODO: Remove `|| true` once typechecking is stable
pixi run typing --output-format github || true
build-and-upload-nightly-parcels: # for alpha testing
needs: [cache-pixi-lock]
permissions:
Expand Down
4 changes: 2 additions & 2 deletions docs/development/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ See below for more Pixi commands relevant to development.

**Code quality**

- `pixi run lint` - Run pre-commit hooks on all files (includes formatting, linting, and other code quality checks)
- `pixi run typing` - Run mypy type checking on the codebase
- `pixi run lint` - Run [pre-commit](https://pre-commit.com/) hooks on all files (includes formatting, linting, and other code quality checks)
- `pixi run typing` - Run [ty](https://docs.astral.sh/ty/) type checking on the codebase

**Different environments**

Expand Down
6 changes: 2 additions & 4 deletions pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,10 @@ numpydoc = "*"
numpydoc-lint = { cmd = "python tools/numpydoc-public-api.py", description = "Lint public API docstrings with numpydoc." }

[feature.typing.dependencies]
mypy = "*"
lxml = "*" # in CI
types-tqdm = "*"
ty = "*"

[feature.typing.tasks]
typing = { cmd = "mypy src/parcels --install-types", description = "Run static type checking with mypy." }
typing = { cmd = "ty check", description = "Run static type checking with ty." }


[environments]
Expand Down
24 changes: 2 additions & 22 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -157,25 +157,5 @@ convention = "numpy"
[tool.ruff.lint.isort]
known-first-party = ["parcels"]

[tool.mypy]
files = [
"parcels/_typing.py",
"parcels/tools/*.py",
"parcels/grid.py",
"parcels/field.py",
"parcels/fieldset.py",
]

[[tool.mypy.overrides]]
module = [
"parcels._version_setup",
"mpi4py",
"scipy.spatial",
"sklearn.cluster",
"zarr",
"cftime",
"pykdtree.kdtree",
"netCDF4",
"pooch",
]
ignore_missing_imports = true
[tool.ty.src]
include = ["./src/"]
Loading