Skip to content

Commit

Permalink
MAINT: update lock files (#42)
Browse files Browse the repository at this point in the history
* DX: convert Tox config to native TOML
* DX: run all notebooks on `tox -p`

Co-authored-by: GitHub <noreply@github.com>
  • Loading branch information
pre-commit-ci[bot] and web-flow authored Jan 13, 2025
1 parent 08d8951 commit d9f298c
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 123 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ repos:
- id: check-useless-excludes

- repo: https://github.com/ComPWA/policy
rev: 0.5.8
rev: 0.5.15
hooks:
- id: check-dev-files
args:
Expand Down Expand Up @@ -54,7 +54,7 @@ repos:
metadata.vscode
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
rev: v0.9.1
hooks:
- id: ruff
args: [--fix]
Expand Down Expand Up @@ -109,6 +109,6 @@ repos:
alias: ec

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.5.11
rev: 0.5.18
hooks:
- id: uv-lock
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
44 changes: 19 additions & 25 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -114,37 +114,31 @@ all = false
ignore_case = true
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 =
sty,
skip_install = True
skip_missing_interpreters = True
skipsdist = True
env_list = [
"nb",
"sty",
]
no_package = true
requires = ["tox>=4.21.0"]
skip_install = true
skip_missing_interpreters = true

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

[testenv:nb]
allowlist_externals =
pytest
commands =
pytest {posargs}
description = Run all notebooks with pytest
[tool.tox.env.nb]
allowlist_externals = ["pytest"]
commands = [["pytest", {replace = "posargs", extend = true}]]
description = "Run all notebooks with pytest"

[testenv:sty]
allowlist_externals =
pre-commit
commands =
pre-commit --all-files run {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

0 comments on commit d9f298c

Please sign in to comment.