Skip to content

Commit

Permalink
MAINT: update lock files (#26)
Browse files Browse the repository at this point in the history
* DX: remove `files.watcherExclude`
* DX: set `PYTHONHASHSEED=0`
* MAINT: ignore `LOG015` in TR-002
* MAINT: implement dev environment updates
* MAINT: pin link to `numpy.emath`
* MAINT: remove `enable-cache` argument (defaults to true)
* MAINT: rename `TCH` Ruff rules to `TC`
* MAINT: sort cSpell config
* MAINT: update link to Lecture 17
* MAINT: update link to `ScipyTrustConstrV1`
* MAINT: update to `astral-sh/setup-uv@v5`

---------

Co-authored-by: GitHub <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Dec 20, 2024
1 parent c9167da commit d9e9634
Show file tree
Hide file tree
Showing 20 changed files with 1,617 additions and 2,045 deletions.
1 change: 0 additions & 1 deletion .binder/postBuild
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ pixi_packages="$(NO_COLOR= pixi list --explicit --no-install | awk 'NR > 1 {prin
if [[ -n "$pixi_packages" ]]; then
pixi global install $pixi_packages
fi
export PYTHONHASHSEED="0"
pixi clean cache --yes

uv export \
Expand Down
142 changes: 71 additions & 71 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"version": "0.2",
"allowCompoundWords": false,
"enableFiletypes": [
"git-commit",
Expand Down Expand Up @@ -37,80 +36,10 @@
"docs/conf.py",
"pyproject.toml"
],
"language": "en-US",
"overrides": [
{
"allowCompoundWords": true,
"filename": "**/*.jl",
"languageId": "julia"
}
],
"words": [
"AmpForm",
"analyticity",
"arccos",
"arctan",
"Argand",
"autograd",
"Blatt",
"Breit",
"Byckling",
"Colab",
"ComPWA",
"Dalitz",
"dummifies",
"dummify",
"eigenstates",
"Flatté",
"functools",
"GlueX",
"graphviz",
"Hankel",
"helicities",
"helicity",
"hepstats",
"Hippel",
"iminuit",
"IPython",
"JHEP",
"JPAC",
"Ketzer",
"Källén",
"lambdification",
"lambdified",
"lambdifies",
"lambdify",
"lambdifying",
"LHCb",
"lineshape",
"lineshapes",
"matplotlib",
"Mikhasenko",
"NumPy",
"parametrizations",
"Pixi",
"plotly",
"pyplot",
"QRules",
"Quigg",
"SciPy",
"sympify",
"SymPy",
"TensorWaves",
"traceback",
"unevaluatable",
"unitarity",
"unitless",
"unphysical",
"vectorize",
"Weisskopf",
"zfit"
],
"ignoreWords": [
"Kutschke",
"Marangotto",
"PINF",
"PYTHONHASHSEED",
"Richman",
"absl",
"aitchison",
Expand Down Expand Up @@ -310,5 +239,76 @@
"zlim",
"zorder",
"zticks"
],
"language": "en-US",
"overrides": [
{
"allowCompoundWords": true,
"filename": "**/*.jl",
"languageId": "julia"
}
],
"useGitignore": true,
"version": "0.2",
"words": [
"AmpForm",
"analyticity",
"arccos",
"arctan",
"Argand",
"autograd",
"Blatt",
"Breit",
"Byckling",
"Colab",
"ComPWA",
"Dalitz",
"dummifies",
"dummify",
"eigenstates",
"Flatté",
"functools",
"GlueX",
"graphviz",
"Hankel",
"helicities",
"helicity",
"hepstats",
"Hippel",
"iminuit",
"IPython",
"JHEP",
"JPAC",
"Ketzer",
"Källén",
"lambdification",
"lambdified",
"lambdifies",
"lambdify",
"lambdifying",
"LHCb",
"lineshape",
"lineshapes",
"matplotlib",
"Mikhasenko",
"NumPy",
"parametrizations",
"Pixi",
"plotly",
"pyplot",
"QRules",
"Quigg",
"SciPy",
"sympify",
"SymPy",
"TensorWaves",
"traceback",
"unevaluatable",
"unitarity",
"unitless",
"unphysical",
"vectorize",
"Weisskopf",
"zfit"
]
}
3 changes: 0 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
4 changes: 1 addition & 3 deletions .github/workflows/notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- uses: astral-sh/setup-uv@v5
- name: Install graphviz
run: sudo apt-get -y install graphviz
- name: Run all notebooks
Expand Down
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ repos:
- id: check-useless-excludes

- repo: https://github.com/ComPWA/policy
rev: 0.5.5
rev: 0.5.8
hooks:
- id: check-dev-files
args:
Expand All @@ -28,7 +28,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 @@ -56,7 +56,7 @@ repos:
metadata.vscode
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.8.7
rev: 1.9.1
hooks:
- id: nbqa-isort
args: [--float-to-top]
Expand All @@ -75,7 +75,7 @@ repos:
)$
- 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 @@ -104,7 +104,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 @@ -114,14 +114,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/streetsidesoftware/cspell-cli
rev: v8.15.2
rev: v8.17.0
hooks:
- id: cspell

Expand All @@ -147,11 +147,11 @@ repos:
)$
- 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 @@ -12,6 +12,7 @@
"mhutchie.git-graph",
"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.isort",
"ms-python.mypy-type-checker",
"ms-python.pylint",
"ms-toolsai.vscode-jupyter-slideshow",
"travisillig.vscode-json-stable-stringify",
"tyriar.sort-lines"
]
Expand Down
6 changes: 0 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@
"files.associations": {
"**/pixi.lock": "yaml"
},
"files.watcherExclude": {
"**/*_cache/**": true,
"**/.eggs/**": true,
"**/.git/**": true,
"**/.tox/**": true
},
"git.rebaseWhenSync": true,
"github-actions.workflows.pinned.workflows": [".github/workflows/ci.yml"],
"gitlens.telemetry.enabled": false,
Expand Down
2 changes: 1 addition & 1 deletion docs/000/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Unfortunately, the {mod}`jax.numpy` API does not interface to {mod}`numpy.emath`. It is possible to decorate {func}`numpy.emath.sqrt` be decorated with {func}`jax.jit`, but that **only works with static, hashable arguments**:"
"Unfortunately, the {mod}`jax.numpy` API does not interface to [`numpy.emath`](https://numpy.org/doc/2.0/reference/routines.emath.html). It is possible to decorate {func}`numpy.emath.sqrt` be decorated with {func}`jax.jit`, but that **only works with static, hashable arguments**:"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/001/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Just as noted in {ref}`000/index:Complex square root` though, {mod}`numpy.emath` is not provided by the NumPy API of {doc}`JAX <jax:index>`. As discussed there, we can at most decorate the {mod}`numpy.emath` version with {func}`jax.jit` and work with static arguments only:"
"Just as noted in {ref}`000/index:Complex square root` though, [`numpy.emath`](https://numpy.org/doc/2.0/reference/routines.emath.html) is not provided by the NumPy API of {doc}`JAX <jax:index>`. As discussed there, we can at most decorate the [`numpy.emath`](https://numpy.org/doc/2.0/reference/routines.emath.html) version with {func}`jax.jit` and work with static arguments only:"
]
},
{
Expand Down Expand Up @@ -401,7 +401,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"As concluded in {ref}`000/index:Conditional square root`, the alternative to lambdify to {mod}`numpy.emath` is to lambdify to {func}`numpy.select`. This has some caveats, though, like that you should not use `__dict__`. Worse, JAX is not immediately supported as backend. Fortunately, we now know how to overwrite lambdify methods.\n",
"As concluded in {ref}`000/index:Conditional square root`, the alternative to lambdify to [`numpy.emath`](https://numpy.org/doc/2.0/reference/routines.emath.html) is to lambdify to {func}`numpy.select`. This has some caveats, though, like that you should not use `__dict__`. Worse, JAX is not immediately supported as backend. Fortunately, we now know how to overwrite lambdify methods.\n",
"\n",
"An additional tool we need now is to {doc}`define a new printer class <sympy:modules/printing>` for JAX, so that we can also define a special rendering method for `ComplexSqrt` in the case of JAX. Most of its printing methods should be the same as that of SymPy's `NumPyPrinter`, the rest we can overwrite:"
]
Expand Down
3 changes: 2 additions & 1 deletion docs/002/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ ignore = [
"F404",
"G004",
"ISC001",
"LOG015",
"PD901",
"PLR2004",
"S101",
"T201",
"TCH003",
"TC003",
]
select = ["ALL"]
2 changes: 1 addition & 1 deletion docs/014/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ignore = [
"PYI034",
"S101",
"SIM108",
"TCH003",
"TC003",
]
select = ["ALL"]

Expand Down
2 changes: 1 addition & 1 deletion docs/020/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@
"metadata": {},
"source": [
":::{note}\n",
"You can also try different minimizers, like {class}`~zfit.minimizers.minimizers_scipy.ScipyTrustConstrV1`, but {class}`~zfit.minimizers.minimizer_minuit.Minuit` seems to perform best.\n",
"You can also try different minimizers, like [`ScipyTrustConstrV1`](https://zfit.readthedocs.io/en/v0.18.1/user_api/minimize/_generated/minimizers/zfit.minimize.ScipyTrustConstrV1.html), but {class}`~zfit.minimizers.minimizer_minuit.Minuit` seems to perform best.\n",
":::"
]
},
Expand Down
2 changes: 1 addition & 1 deletion docs/025/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
":::{seealso} [Lecture 17](https://compwa.github.io/strong2020-salamanca/lecture17.html) on collision theory of the [STRONG2020 HaSP School](https://indico.ific.uv.es/event/6803) by Miguel Albaladejo.\n",
":::{seealso} [Lecture 17](https://compwa.github.io/strong2020-salamanca/lecture17/) on collision theory of the [STRONG2020 HaSP School](https://indico.ific.uv.es/event/6803) by Miguel Albaladejo.\n",
"<!-- cspell:ignore Albaladejo -->\n",
":::\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion docs/030/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ignore = [
"PLC2401",
"PLR0913",
"PLR0917",
"TCH002",
"TC002",
]
select = ["ALL"]

Expand Down
2 changes: 1 addition & 1 deletion docs/031/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ignore = [
"PLR0913",
"PLR0917",
"S101",
"TCH002",
"TC002",
]
select = ["ALL"]

Expand Down
2 changes: 1 addition & 1 deletion docs/032/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ignore = [
"PLR0913",
"PLR0917",
"S101",
"TCH00",
"TC00",
]
select = ["ALL"]

Expand Down
Loading

0 comments on commit d9e9634

Please sign in to comment.