Skip to content

Commit

Permalink
perf: adds config pyproject.toml for faster build, test runs
Browse files Browse the repository at this point in the history
- `pip` -> `uv`
- `pytest` single-core -> logical max

https://hatch.pypa.io/latest/how-to/environment/select-installer/#enabling-uv
https://pytest-xdist.readthedocs.io/en/latest/distribution.html#running-tests-across-multiple-cpus

Should speed up CI, although GitHub Actions only runs on 4 cores iirc
  • Loading branch information
dangotbanned committed Jun 10, 2024
1 parent 25ce09b commit fd20f00
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ artifacts = ["altair/jupyter/js/index.js"]

[tool.hatch.envs.default]
features = ["all", "dev"]
# https://hatch.pypa.io/latest/how-to/environment/select-installer/#enabling-uv
installer = "uv"

[tool.hatch.envs.default.scripts]
generate-schema-wrapper = [
Expand Down Expand Up @@ -306,6 +308,8 @@ line-ending = "lf"
# They contain examples which are being executed by the
# test_examples tests.
norecursedirs = ["tests/examples_arguments_syntax", "tests/examples_methods_syntax"]
# https://pytest-xdist.readthedocs.io/en/latest/distribution.html#running-tests-across-multiple-cpus
addopts="-n logical"

[tool.mypy]
warn_unused_ignores = true
Expand Down

0 comments on commit fd20f00

Please sign in to comment.