Skip to content
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

MAINT: update lock files #539

Merged
merged 13 commits into from
Jan 29, 2025
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: ComPWA/actions/.github/workflows/[email protected]
with:
coverage-target: tensorwaves
macos-python-version: "3.9"
macos-python-version: "3.10"
specific-pip-packages: ${{ inputs.specific-pip-packages }}
test-output-path: tests/output/
secrets:
Expand Down
14 changes: 8 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ repos:
- id: check-useless-excludes

- repo: https://github.com/ComPWA/policy
rev: 0.5.15
rev: 0.6.1
hooks:
- id: check-dev-files
args:
- --doc-apt-packages=graphviz
- --excluded-python-versions=3.13
- --repo-name=tensorwaves
- --repo-title=TensorWaves
- --update-lock-files=outsource
Expand All @@ -30,6 +31,7 @@ repos:
- --add-install-cell
- --additional-packages=IPython
- --extras-require=doc,jax,pwa,viz
- id: set-nb-display-name

- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
Expand Down Expand Up @@ -60,7 +62,7 @@ repos:
metadata.vscode

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.1
rev: v0.9.3
hooks:
- id: ruff
args: [--fix]
Expand Down Expand Up @@ -126,12 +128,12 @@ repos:
pass_filenames: false

- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.17.0
rev: v8.17.1
hooks:
- id: cspell

- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: 3.0.3
rev: 3.2.0
hooks:
- id: editorconfig-checker
name: editorconfig
Expand All @@ -152,11 +154,11 @@ repos:
- python

- repo: https://github.com/ComPWA/pyright-pre-commit
rev: v1.1.391
rev: v1.1.392
hooks:
- id: pyright

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.5.18
rev: 0.5.25
hooks:
- id: uv-lock
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ build:
uv run \
--group doc \
--no-dev \
--with tox \
--with tox-uv \
tox -e doc
mkdir -p $READTHEDOCS_OUTPUT
mv docs/_build/html $READTHEDOCS_OUTPUT
Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"notebook.gotoSymbols.showAllSymbols": true,
"python.analysis.autoImportCompletions": false,
"python.analysis.inlayHints.pytestParameters": true,
"python.defaultInterpreterPath": ".venv/bin/python",
"python.terminal.activateEnvironment": false,
"python.testing.pytestArgs": ["--color=no", "--no-cov"],
"python.testing.pytestEnabled": true,
Expand Down
6 changes: 3 additions & 3 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ run into trouble.
```

4. Download and install cuDNN following
[these instructions](https://docs.nvidia.com/deeplearning/cudnn/installation/overview.html).
[these instructions](https://docs.nvidia.com/deeplearning/cudnn/installation/latest/index.html).
Make sure that you download cuDNN **for CUDA 11.x**!

In Ubuntu (Debian), there are two convenient options: (1)
[installing through `apt`](https://docs.nvidia.com/deeplearning/cudnn/installation/linux.html#package-manager-installation)
[installing through `apt`](https://docs.nvidia.com/deeplearning/cudnn/installation/latest/linux.html#package-manager-local-installation)
or (2)
[using a local installer](https://docs.nvidia.com/deeplearning/cudnn/installation/linux.html#package-manager-local-installation).
[using a local installer](https://docs.nvidia.com/deeplearning/cudnn/installation/latest/linux.html#package-manager-local-installation).

5. **[Recommended]** Install JAX with GPU binaries in your
{ref}`virtual environment <compwa:develop:Virtual environment>` following
Expand Down
112 changes: 66 additions & 46 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,13 @@ namespaces = false
where = ["src"]

[tool.setuptools_scm]
local_scheme = "no-local-version"
version_scheme = "only-version"
write_to = "src/tensorwaves/version.py"

[tool.coverage.report]
exclude_also = [
"if TYPE_CHECKING:",
]

[tool.coverage.run]
branch = true
source = ["src"]
Expand Down Expand Up @@ -209,16 +212,6 @@ ignore_missing_imports = true
module = ["tensorflow.python.ops.numpy_ops"]

[tool.pyright]
exclude = [
"**/.git",
"**/.ipynb_checkpoints",
"**/.mypy_cache",
"**/.pytest_cache",
"**/.tox",
"**/.venv/",
"**/__pycache__",
"**/_build",
]
reportArgumentType = false
reportAttributeAccessIssue = false
reportGeneralTypeIssues = false
Expand Down Expand Up @@ -445,6 +438,10 @@ trailing_comma_inline_array = true

[tool.tox]
env_list = [
"3.9",
"3.10",
"3.11",
"3.12",
"cov",
"docnb-force",
"linkcheck",
Expand All @@ -456,13 +453,16 @@ skip_install = true
skip_missing_interpreters = true

[tool.tox.env_run_base]
allowlist_externals = ["pytest"]
commands = [["pytest", {replace = "posargs", extend = true}]]
description = "Run all unit tests"
dependency_groups = ["test"]
description = "Run test suite on Python {env_name}"
no_package = false
pass_env = ["*"]
runner = "uv-venv-lock-runner"
skip_install = false
skip_missing_interpreters = false

[tool.tox.env.bench]
allowlist_externals = ["pytest"]
commands = [
[
"pytest",
Expand All @@ -475,7 +475,6 @@ commands = [
description = "Run benchmark tests and visualize in histogram"

[tool.tox.env.cov]
allowlist_externals = ["pytest"]
commands = [
[
"pytest",
Expand All @@ -490,6 +489,7 @@ description = "Compute test coverage"

[tool.tox.env.doc]
allowlist_externals = ["sphinx-build"]
base = []
commands = [
[
"sphinx-build",
Expand All @@ -498,71 +498,78 @@ commands = [
"--keep-going",
"--show-traceback",
"docs/",
"docs/_build/html",
"docs/_build/html/",
],
]
description = "Build documentation and API through Sphinx"
set_env.PYTHONWARNINGS = ""

[tool.tox.env.doclive]
allowlist_externals = ["sphinx-autobuild"]
base = ["tool.tox.env.doc", "tool.tox.env_run_base"]
base = []
commands = [
[
"sphinx-autobuild",
"--builder=dirhtml",
"--ignore=docs/_build/",
"--ignore=docs/api/",
"--ignore=docs/usage/logs/",
"--open-browser",
"--port=0",
"--re-ignore='.*/__pycache__/.*'",
"--re-ignore='.*/.ipynb_checkpoints/.*'",
"--re-ignore='.*/.virtual_documents/.*'",
"--re-ignore='.*\\.csv'",
"--re-ignore='.*\\.gif'",
"--re-ignore='.*\\.gv'",
"--re-ignore='.*\\.inv'",
"--re-ignore='.*\\.json'",
"--re-ignore='.*\\.pickle'",
"--re-ignore='.*\\.png'",
"--re-ignore='.*\\.svg'",
"--re-ignore='.*\\.ya?ml'",
"--re-ignore='docs/usage/sub_expr_f?'",
"--watch=docs",
"--re-ignore=/__pycache__(/.*)?$",
"--re-ignore=/_build(/.*)?$",
"--re-ignore=/_images(/.*)?$",
"--re-ignore=/\\.cache(/.*)?$",
"--re-ignore=/\\.egg-info(/.*)?$",
"--re-ignore=/\\.ipynb_checkpoints(/.*)?$",
"--re-ignore=/\\.venv(/.*)?$",
"--re-ignore=/\\.virtual_documents(/.*)?$",
"--re-ignore=/api(/.*)?$",
"--re-ignore=/docs$",
"--re-ignore=/sub_expr_f?",
"--re-ignore=/version\\.py$",
"--re-ignore=\\.csv$",
"--re-ignore=\\.csv$",
"--re-ignore=\\.egg-info(/.*)?$",
"--re-ignore=\\.gif$",
"--re-ignore=\\.gitignore$",
"--re-ignore=\\.gv$",
"--re-ignore=\\.inv$",
"--re-ignore=\\.json$",
"--re-ignore=\\.pickle$",
"--re-ignore=\\.pkl$",
"--re-ignore=\\.png$",
"--re-ignore=\\.root$",
"--re-ignore=\\.svg$",
"--re-ignore=\\.tmp$",
"--re-ignore=\\.ya?ml$",
"--watch=src",
"docs/",
"docs/_build/html",
"docs/_build/html/",
],
]
description = "Set up a server to directly preview changes to the HTML pages"

[tool.tox.env.docnb]
base = ["tool.tox.env.doc", "tool.tox.env_run_base"]
base = ["tool.tox.env.doc"]
description = "{[tool.tox.env.doc]description} with cached notebook execution"
set_env = [
{replace = "ref", of = ["tool.tox.env.doc.set_env"]},
{EXECUTE_NB = "yes"},
]

[tool.tox.env.docnb-force]
base = ["tool.tox.env.doc", "tool.tox.env_run_base"]
base = ["tool.tox.env.doc"]
description = "{[tool.tox.env.doc]description} with notebook execution (no cache)"
set_env = [
{replace = "ref", of = ["tool.tox.env.doc.set_env"]},
{FORCE_EXECUTE_NB = "yes"},
]

[tool.tox.env.docnblive]
base = ["tool.tox.env.doclive", "tool.tox.env_run_base"]
base = ["tool.tox.env.doclive"]
description = "{[tool.tox.env.doclive]description} with notebook execution (no cache)"
set_env = [
{replace = "ref", of = ["tool.tox.env.doclive.set_env"]},
{EXECUTE_NB = "yes"},
]

[tool.tox.env.jax]
allowlist_externals = ["pytest"]
commands = [
[
"pytest",
Expand All @@ -575,27 +582,40 @@ commands = [
],
]
description = "Run tests with JAX only"
extras = ["jax"]

[tool.tox.env.linkcheck]
allowlist_externals = ["sphinx-build"]
base = ["tool.tox.env.doc", "tool.tox.env_run_base"]
base = ["tool.tox.env.doc"]
commands = [
[
"sphinx-build",
"--builder=linkcheck",
"--show-traceback",
"docs/",
"docs/_build/linkcheck",
"docs/_build/linkcheck/",
],
]
description = "Check external links in the documentation (requires internet connection)"

[tool.tox.env.nb]
allowlist_externals = ["pytest"]
commands = [["pytest", "--nbmake", "{posargs:docs}"]]
description = "Run all notebooks with pytest"
with_dev = true

[tool.tox.env.sty]
allowlist_externals = ["pre-commit"]
base = []
commands = [["pre-commit", "run", "--all-files", {replace = "posargs", extend = true}]]
description = "Perform all linting, formatting, and spelling checks"

[tool.tox.labels]
doc = [
"docnb-force",
"linkcheck",
]
test = [
"3.9",
"3.10",
"3.11",
"3.12",
]
Loading