Skip to content

Improve type checking. #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 26, 2024
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
17 changes: 16 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,21 @@ on:

jobs:

run-type-checking:

name: Run tests for type-checking
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version-file: .python-version
allow-prereleases: true
cache: pip
- run: pip install tox-uv
- run: tox -e typing

run-tests:

name: Run tests for ${{ matrix.os }} on ${{ matrix.environment }}
Expand All @@ -32,7 +47,7 @@ jobs:
uses: julia-actions/setup-julia@v2
- uses: prefix-dev/[email protected]
with:
pixi-version: v0.20.1
pixi-version: v0.22.0
# cache: true
environments: ${{ matrix.environment }}

Expand Down
12 changes: 0 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,6 @@ repos:
mdformat-black,
]
args: [--wrap, "88"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.10.0'
hooks:
- id: mypy
additional_dependencies: [
attrs>=21.3.0,
click,
pytask>=0.4.0,
types-PyYAML,
types-setuptools
]
pass_filenames: false
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12.2
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ releases are available on [PyPI](https://pypi.org/project/pytask-julia) and
- {pull}`32` uses trusted publishing for PyPI.
- {pull}`33` uses uuid4 to generate more robust file names for serialized arguments.
- {pull}`36` updates tests for pytask v0.5.
- {pull}`37` improves type-checking.

## 0.4.0 - 2023-10-08

Expand Down
504 changes: 361 additions & 143 deletions pixi.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pytask_julia = "pytask_julia.plugin"

[project.optional-dependencies]
test = ["pytask-parallel", "pytest", "pytest-cov", "pytest-xdist", "pyyaml"]
typing = ["mypy", "pyyaml", "types-PyYAML"]

[tool.rye]
managed = true
Expand Down Expand Up @@ -115,7 +116,7 @@ platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"]
pytask_julia = { path = ".", editable = true }

[tool.pixi.environments]
default = { solve-group = "default" }
default = { solve-group = "default", features = ["test", "typing"]}
test = { features = ["test"], solve-group = "default" }
py38 = { features = ["py38", "test"]}
py39 = { features = ["py39", "test"]}
Expand Down
24 changes: 10 additions & 14 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
[tox]
envlist = pytest
requires = tox>=4
envlist = test, typing

[testenv]
allowlist_externals = julia
passenv = CI
usedevelop = true
package = editable

[testenv:pytest]
deps =
# Package dependencies
pytask >=0.4.0
pytask-parallel >=0.4.0

# Optional package dependencies
pyyaml

pytest
pytest-cov
pytest-xdist
[testenv:test]
extras = test
commands =
julia --project=. --eval "import Pkg; Pkg.instantiate()"
pytest {posargs}


[testenv:typing]
extras = typing
commands = mypy
Loading