Skip to content

Commit

Permalink
MAINT: update lock files (#368)
Browse files Browse the repository at this point in the history
* DX: respect `.gitignore` with cSpell
* MAINT: address Ruff errors
* MAINT: implement updates from pre-commit hooks
* MAINT: remove `enable-cache` argument (defaults to true)
* MAINT: rename `TCH` Ruff rules to `TC`
* MAINT: update to `astral-sh/setup-uv@v5`

---------

Co-authored-by: GitHub <noreply@github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 23, 2024
1 parent bf60221 commit a397929
Show file tree
Hide file tree
Showing 24 changed files with 1,602 additions and 1,223 deletions.
53 changes: 27 additions & 26 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
},
{
"addWords": true,
"name": "python",
"path": "./.cspell/python.txt"
"name": "python-extra",
"path": "./.cspell/python-extra.txt"
},
{
"addWords": true,
Expand Down Expand Up @@ -68,29 +68,6 @@
"pytest.ini",
"tox.ini"
],
"language": "en-US",
"overrides": [
{
"allowCompoundWords": true,
"dictionaries": ["julia", "latex", "python"],
"filename": "**/*.ipynb"
},
{
"allowCompoundWords": true,
"dictionaries": ["julia", "latex"],
"filename": "**/*.jl",
"languageId": "julia"
},
{
"dictionaries": ["latex", "python"],
"filename": "**/*.py"
},
{
"dictionaries": ["latex", "python"],
"filename": "**/*.pyi"
}
],
"version": "0.2",
"ignoreWords": [
"Colab",
"Sigmapi",
Expand Down Expand Up @@ -133,5 +110,29 @@
"xshift",
"yaxis",
"zaxis"
]
],
"language": "en-US",
"overrides": [
{
"allowCompoundWords": true,
"dictionaries": ["julia", "latex", "python", "python-extra"],
"filename": "**/*.ipynb"
},
{
"allowCompoundWords": true,
"dictionaries": ["julia", "latex"],
"filename": "**/*.jl",
"languageId": "julia"
},
{
"dictionaries": ["latex", "python", "python-extra"],
"filename": "**/*.py"
},
{
"dictionaries": ["latex", "python", "python-extra"],
"filename": "**/*.pyi"
}
],
"useGitignore": true,
"version": "0.2"
}
42 changes: 42 additions & 0 deletions .cspell/python-extra.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
absl
ampform
clim
cmap
cmap
corrcoef
fontsize
funcs
hspace
imread
imshow
ioff
lambdify
lambdifying
lhcb
meshgrid
ncols
ndarray
nrows
pcolormesh
phasespace
rcdefaults
seealso
sharey
svgutils
sympify
tensorwaves
tolist
viridis
vmax
vmin
wspace
xlabel
xreplace
xtick
xticklabels
xticks
ylabel
ytick
yticklabels
yticks
zorder
99 changes: 0 additions & 99 deletions .cspell/python.txt

This file was deleted.

16 changes: 6 additions & 10 deletions .github/workflows/ci-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{env.PYTHON_VERSION}}
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- uses: astral-sh/setup-uv@v5
- name: Build documentation without running notebooks
run: >-
uv run \
Expand All @@ -47,9 +45,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{env.PYTHON_VERSION}}
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- uses: astral-sh/setup-uv@v5
- run: |
sudo apt-get update -y
sudo apt-get install -y inkscape latexmk make texlive-fonts-extra texlive-xetex xindy
Expand All @@ -73,9 +69,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: ${{env.PYTHON_VERSION}}
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- uses: astral-sh/setup-uv@v5
- name: Check external links with Sphinx linkcheck
run: >-
uv run \
Expand Down Expand Up @@ -114,7 +108,9 @@ jobs:
restore-keys: |
sympy-${{hashFiles('uv.lock')}}-${{hashFiles('src/**/*.py')}}
sympy-${{hashFiles('uv.lock')}}
path: ~/.sympy-cache*/
path: |
~/.cache/ampform*
# cspell:ignore ampform
- name: Fetch Jupyter cache
uses: actions/cache@v4
with:
Expand Down
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
- id: check-useless-excludes

- repo: https://github.com/ComPWA/policy
rev: 0.5.6
rev: 0.5.8
hooks:
- id: check-dev-files
args:
Expand All @@ -27,7 +27,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 @@ -55,7 +55,7 @@ repos:
metadata.vscode
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.1
rev: v0.8.4
hooks:
- id: ruff
args: [--fix]
Expand Down Expand Up @@ -84,7 +84,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/ComPWA/prettier-pre-commit
rev: v3.3.3
rev: v3.4.2
hooks:
- id: prettier

Expand All @@ -94,14 +94,14 @@ repos:
- id: taplo-format

- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
rev: v0.24.2
hooks:
- id: toml-sort
args: [--in-place]
exclude: (?x)^(.*/Manifest\.toml|.*/Project\.toml)$

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.29.4
rev: 0.30.0
hooks:
- id: check-jsonschema
name: Check CITATION.cff
Expand All @@ -114,7 +114,7 @@ repos:
pass_filenames: false

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

Expand All @@ -140,11 +140,11 @@ repos:
- python

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

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.4.28
rev: 0.5.11
hooks:
- id: uv-lock
2 changes: 2 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"ms-python.mypy-type-checker",
"ms-python.python",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter",
"ms-toolsai.vscode-jupyter-cell-tags",
"ms-vscode.live-server",
"ms-vsliveshare.vsliveshare",
Expand All @@ -32,6 +33,7 @@
"ms-python.flake8",
"ms-python.isort",
"ms-python.pylint",
"ms-toolsai.vscode-jupyter-slideshow",
"ms-vscode.cpptools",
"travisillig.vscode-json-stable-stringify",
"tyriar.sort-lines"
Expand Down
9 changes: 4 additions & 5 deletions docs/amplitude-model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,9 @@
"\n",
"simplify_latex_rendering()\n",
"\n",
"NO_TQDM = \"EXECUTE_NB\" in os.environ\n",
"if NO_TQDM:\n",
" logging.getLogger().setLevel(logging.ERROR)\n",
" logging.getLogger(\"polarimetry.io\").setLevel(logging.ERROR)"
"NO_LOG = \"EXECUTE_NB\" in os.environ\n",
"if NO_LOG:\n",
" logging.disable(logging.CRITICAL)"
]
},
{
Expand Down Expand Up @@ -538,7 +537,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
"version": "3.12.8"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit a397929

Please sign in to comment.