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 #109

Merged
merged 13 commits into from
Jan 13, 2025
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ concurrency:
cancel-in-progress: |-
${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }}

env:
PYTHONHASHSEED: "0"

on:
push:
branches:
Expand Down Expand Up @@ -36,3 +33,8 @@ jobs:
apt-packages: graphviz
gh-pages: true
specific-pip-packages: ${{ inputs.specific-pip-packages }}
style:
if: inputs.specific-pip-packages == ''
secrets:
token: ${{ secrets.PAT }}
uses: ComPWA/actions/.github/workflows/pre-commit.yml@v2.1
14 changes: 8 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
ci:
autoupdate_commit_msg: "MAINT: update lock files"
autoupdate_schedule: quarterly
skip:
- uv-lock

repos:
- repo: meta
Expand All @@ -9,7 +11,7 @@ repos:
- id: check-useless-excludes

- repo: https://github.com/ComPWA/policy
rev: 0.5.5
rev: 0.5.15
hooks:
- id: check-dev-files
args:
Expand All @@ -23,7 +25,7 @@ repos:
- id: remove-empty-tags

- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
rev: 0.8.1
hooks:
- id: nbstripout
args:
Expand Down Expand Up @@ -51,7 +53,7 @@ repos:
metadata.vscode

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.1
rev: v0.9.1
hooks:
- id: ruff
args: [--fix]
Expand All @@ -68,7 +70,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/ComPWA/prettier-pre-commit
rev: v3.3.3
rev: v3.4.2
hooks:
- id: prettier
exclude: >-
Expand All @@ -82,7 +84,7 @@ repos:
- id: taplo-format

- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
rev: v0.24.2
hooks:
- id: toml-sort
args:
Expand All @@ -100,6 +102,6 @@ repos:
)$

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.4.27
rev: 0.5.18
hooks:
- id: uv-lock
4 changes: 3 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ build:
export UV_LINK_MODE=copy
uv run \
--group doc \
--locked \
--no-dev \
--with tox \
tox -e doc
mkdir -p $READTHEDOCS_OUTPUT
mv docs/_build/html $READTHEDOCS_OUTPUT

sphinx:
configuration: docs/conf.py
7 changes: 7 additions & 0 deletions .taplo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,10 @@ compact_inline_tables = true
indent_string = " "
reorder_arrays = true
reorder_keys = true

[[rule]]
include = ["**/pyproject.toml"]
keys = ["tool.tox"]

[rule.formatting]
reorder_arrays = false
2 changes: 2 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"mhutchie.git-graph",
"ms-python.python",
"ms-toolsai.jupyter",
"ms-toolsai.vscode-jupyter-cell-tags",
"ms-vscode.live-server",
"ms-vsliveshare.vsliveshare",
"redhat.vscode-yaml",
Expand All @@ -28,6 +29,7 @@
"ms-python.isort",
"ms-python.mypy-type-checker",
"ms-python.pylint",
"ms-toolsai.vscode-jupyter-slideshow",
"travisillig.vscode-json-stable-stringify",
"tyriar.sort-lines"
]
Expand Down
209 changes: 103 additions & 106 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ split-on-trailing-comma = false
"RUF001",
"S101",
"T20",
"TC00",
"TCH",
]
"docs/*" = [
Expand All @@ -139,123 +140,119 @@ in_place = true
sort_first = [
"build-system",
"project",
"tool.setuptools",
"tool.setuptools_scm",
"tool.tox.env_run_base",
]
spaces_indent_inline_array = 4
trailing_comma_inline_array = true

[tool.tox]
legacy_tox_ini = """
[tox]
envlist =
cov,
docnb-force,
linkcheck,
sty,
skip_install = True
skip_missing_interpreters = True
skipsdist = True
env_list = [
"cov",
"docnb-force",
"linkcheck",
"sty",
]
no_package = true
requires = ["tox>=4.21.0"]
skip_install = true
skip_missing_interpreters = true

[testenv]
passenv = *
setenv =
PYTHONHASHSEED = 0
[tool.tox.env_run_base]
pass_env = ["*"]

[testenv:doc]
allowlist_externals =
sphinx-build
commands =
sphinx-build \
--builder=html \
--fail-on-warning \
--keep-going \
--show-traceback \
docs/ docs/_build/html
description = Build documentation and API through Sphinx
setenv =
{[testenv]setenv}
PYTHONWARNINGS =
[tool.tox.env.doc]
allowlist_externals = ["sphinx-build"]
commands = [
[
"sphinx-build",
"--builder=html",
"--fail-on-warning",
"--keep-going",
"--show-traceback",
"docs/",
"docs/_build/html",
],
]
description = "Build documentation and API through Sphinx"
set_env.PYTHONWARNINGS = ""

[testenv:docnb]
base = doc
description = {[testenv:doc]description} with cached notebook execution
passenv = *
setenv =
{[testenv:doc]setenv}
EXECUTE_NB = yes
[tool.tox.env.doclive]
allowlist_externals = ["sphinx-autobuild"]
commands = [
[
"sphinx-autobuild",
"--builder=html",
"--ignore=docs/_build/",
"--ignore=docs/_images/",
"--ignore=docs/api/",
"--open-browser",
"--port=0",
"--re-ignore='.*/__pycache__/.*'",
"--re-ignore='.*/.ipynb_checkpoints/.*'",
"--re-ignore='.*/.virtual_documents/.*'",
"--re-ignore='.*\\.csv'",
"--re-ignore='.*\\.gif'",
"--re-ignore='.*\\.gitignore'",
"--re-ignore='.*\\.gv'",
"--re-ignore='.*\\.inv'",
"--re-ignore='.*\\.json'",
"--re-ignore='.*\\.pickle'",
"--re-ignore='.*\\.png'",
"--re-ignore='.*\\.svg'",
"--re-ignore='.*\\.tmp'",
"--re-ignore='.*\\.ya?ml'",
"--watch=docs",
"--watch=src",
"docs/",
"docs/_build/html",
],
]
description = "Set up a server to directly preview changes to the HTML pages"
set_env.PYTHONWARNINGS = ""

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

[testenv:doclive]
allowlist_externals =
sphinx-autobuild
commands =
sphinx-autobuild \
--builder=html \
--ignore=docs/_build/ \
--ignore=docs/_images/ \
--ignore=docs/api/ \
--open-browser \
--port=0 \
--re-ignore='.*/__pycache__/.*' \
--re-ignore='.*/.ipynb_checkpoints/.*' \
--re-ignore='.*/.virtual_documents/.*' \
--re-ignore='.*\\.csv' \
--re-ignore='.*\\.gif' \
--re-ignore='.*\\.gitignore' \
--re-ignore='.*\\.gv' \
--re-ignore='.*\\.inv' \
--re-ignore='.*\\.json' \
--re-ignore='.*\\.pickle' \
--re-ignore='.*\\.png' \
--re-ignore='.*\\.svg' \
--re-ignore='.*\\.tmp' \
--re-ignore='.*\\.ya?ml' \
--watch=docs \
--watch=src \
docs/ docs/_build/html
description = Set up a server to directly preview changes to the HTML pages
setenv =
{[testenv:doc]setenv}
[tool.tox.env.docnb-force]
base = ["tool.tox.env.doc", "tool.tox.env_run_base"]
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"},
]

[testenv:docnblive]
base = doclive
description = {[testenv:doclive]description} with cached notebook execution
passenv = *
setenv =
{[testenv:doclive]setenv}
EXECUTE_NB = yes
[tool.tox.env.docnblive]
base = ["tool.tox.env.doclive", "tool.tox.env_run_base"]
description = "{[tool.tox.env.doclive]description} with cached notebook execution"
set_env = [
{replace = "ref", of = ["tool.tox.env.doclive.set_env"]},
{EXECUTE_NB = "yes"},
]

[testenv:linkcheck]
allowlist_externals =
sphinx-build
commands =
sphinx-build \
--builder=linkcheck \
--show-traceback \
docs/ docs/_build/linkcheck
description = Check external links in the documentation (requires internet connection)
setenv =
{[testenv:doclive]setenv}
[tool.tox.env.linkcheck]
allowlist_externals = ["sphinx-build"]
commands = [
[
"sphinx-build",
"--builder=linkcheck",
"--show-traceback",
"docs/",
"docs/_build/linkcheck",
],
]
description = "Check external links in the documentation (requires internet connection)"

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

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