Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9badc8c

Browse files
committedJan 7, 2025·
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 048bed3 commit 9badc8c

File tree

10 files changed

+64
-46
lines changed

10 files changed

+64
-46
lines changed
 

‎.binder/postBuild

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ set -ex
33
curl -LsSf https://astral.sh/uv/install.sh | sh
44
source $HOME/.cargo/env
55
uv export \
6-
--extra jupyter \
7-
--extra notebooks \
6+
--no-dev \
87
> requirements.txt
98
uv pip install \
109
--requirement requirements.txt \
1110
--system
11+
rm requirements.txt
1212
uv cache clean

‎.cspell.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,5 +113,6 @@
113113
"toprettyxml",
114114
"unsrt",
115115
"venv"
116-
]
116+
],
117+
"useGitignore": true
117118
}

‎.github/workflows/ci.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ concurrency:
55
cancel-in-progress: |-
66
${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }}
77
8-
env:
9-
PYTHONHASHSEED: "0"
10-
118
on:
129
push:
1310
branches:
@@ -28,7 +25,7 @@ on:
2825

2926
jobs:
3027
doc:
31-
uses: ComPWA/actions/.github/workflows/ci-docs.yml@v2
28+
uses: ComPWA/actions/.github/workflows/ci-docs.yml@v2.1
3229
permissions:
3330
pages: write
3431
id-token: write
@@ -40,4 +37,4 @@ jobs:
4037
if: inputs.specific-pip-packages == ''
4138
secrets:
4239
token: ${{ secrets.PAT }}
43-
uses: ComPWA/actions/.github/workflows/pre-commit.yml@v2
40+
uses: ComPWA/actions/.github/workflows/pre-commit.yml@v2.1

‎.readthedocs.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ build:
1111
pixi global install graphviz uv
1212
- |-
1313
export UV_LINK_MODE=copy
14-
uv run --extra doc --locked --with tox \
14+
uv run \
15+
--group doc \
16+
--locked \
17+
--no-dev \
18+
--with tox \
1519
tox -e doc
1620
mkdir -p $READTHEDOCS_OUTPUT
1721
mv docs/_build/html $READTHEDOCS_OUTPUT

‎CONTRIBUTING.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,30 @@ cd compwa.github.io
1515
Now it's simply a matter of creating and activating the [virtual environment](https://docs.astral.sh/uv/pip/environments) with [`uv sync`](https://docs.astral.sh/uv/reference/cli/#uv-sync). The dependencies for the project are 'pinned' in each commit through the [`uv.lock` file](https://docs.astral.sh/uv/concepts/projects/#project-lockfile).
1616

1717
```shell
18-
uv sync
18+
uv sync --all-extras
1919
source .venv/bin/activate
2020
```
2121

22-
Formatting and linting checks are automatically performed when committing changes. This is done with [pre-commit](https://pre-commit.com). To install the hooks in your local repository, run [`pre-commit install`](https://pre-commit.com/#3-install-the-git-hook-scripts) **once**:
22+
Formatting and linting checks are automatically performed when committing changes. This is done with [pre-commit](https://pre-commit.com). To install the hooks in your local repository, run install `pre-commit` with `uv`:
23+
24+
```shell
25+
uv tool install pre-commit --with pre-commit-uv --force-reinstall
26+
```
27+
28+
and [`pre-commit install`](https://pre-commit.com/#3-install-the-git-hook-scripts) **once**:
2329

2430
```shell
2531
pre-commit install --install-hooks
2632
```
33+
34+
In addition, it may be handy to install `tox`:
35+
36+
```shell
37+
uv tool install tox --with tox-uv
38+
```
39+
40+
If the repository provides a Tox configuration under [`pyproject.toml`](./pyproject.toml), you can see which jobs it defines with:
41+
42+
```shell
43+
tox list
44+
```

‎docs/adr/002/composition.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@
190190
") -> DynamicsExpression:\n",
191191
" edge_ids = determine_attached_final_state(graph, edge_id)\n",
192192
" final_state_ids = map(str, edge_ids)\n",
193-
" mass = sp.Symbol(f\"m_{{{\"+\".join(final_state_ids)}}}\")\n",
193+
" mass = sp.Symbol(f\"m_{{{'+'.join(final_state_ids)}}}\")\n",
194194
" particle, _ = graph.get_edge_props(edge_id)\n",
195195
" mass0 = sp.Symbol(f\"m_{{{particle.latex}}}\")\n",
196196
" gamma0 = sp.Symbol(Rf\"\\Gamma_{{{particle.latex}}}\")\n",
@@ -212,7 +212,7 @@
212212
") -> DynamicsExpression:\n",
213213
" edge_ids = determine_attached_final_state(graph, edge_id)\n",
214214
" final_state_ids = map(str, edge_ids)\n",
215-
" mass = sp.Symbol(f\"m_{{{\"+\".join(final_state_ids)}}}\")\n",
215+
" mass = sp.Symbol(f\"m_{{{'+'.join(final_state_ids)}}}\")\n",
216216
" particle, _ = graph.get_edge_props(edge_id)\n",
217217
" mass0 = sp.Symbol(f\"m_{{{particle.latex}}}\")\n",
218218
" gamma0 = sp.Symbol(Rf\"\\Gamma_{{{particle.latex}}}\")\n",

‎docs/adr/002/expr.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
" ) -> RelativisticBreitWigner:\n",
163163
" edge_ids = determine_attached_final_state(graph, edge_id)\n",
164164
" final_state_ids = map(str, edge_ids)\n",
165-
" mass = sp.Symbol(f\"m_{{{\"+\".join(final_state_ids)}}}\")\n",
165+
" mass = sp.Symbol(f\"m_{{{'+'.join(final_state_ids)}}}\")\n",
166166
" particle, _ = graph.get_edge_props(edge_id)\n",
167167
" mass0 = sp.Symbol(f\"m_{{{particle.latex}}}\")\n",
168168
" gamma0 = sp.Symbol(Rf\"\\Gamma_{{{particle.latex}}}\")\n",
@@ -247,7 +247,7 @@
247247
" ) -> RelativisticBreitWignerWithFF:\n",
248248
" edge_ids = determine_attached_final_state(graph, edge_id)\n",
249249
" final_state_ids = map(str, edge_ids)\n",
250-
" mass = sp.Symbol(f\"m_{{{\"+\".join(final_state_ids)}}}\")\n",
250+
" mass = sp.Symbol(f\"m_{{{'+'.join(final_state_ids)}}}\")\n",
251251
" particle, _ = graph.get_edge_props(edge_id)\n",
252252
" mass0 = sp.Symbol(f\"m_{{{particle.latex}}}\")\n",
253253
" gamma0 = sp.Symbol(Rf\"\\Gamma_{{{particle.latex}}}\")\n",
@@ -459,7 +459,7 @@
459459
" ) -> RelativisticBreitWigner:\n",
460460
" edge_ids = determine_attached_final_state(graph, edge_id)\n",
461461
" final_state_ids = map(str, edge_ids)\n",
462-
" mass = sp.Symbol(f\"m_{{{\"+\".join(final_state_ids)}}}\")\n",
462+
" mass = sp.Symbol(f\"m_{{{'+'.join(final_state_ids)}}}\")\n",
463463
" particle, _ = graph.get_edge_props(edge_id)\n",
464464
" mass0 = sp.Symbol(Rf\"\\mu_{{{particle.latex}}}\")\n",
465465
" gamma0 = sp.Symbol(Rf\"\\sigma_{{{particle.latex}}}\")\n",

‎docs/adr/002/function.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
" ) -> \"RelativisticBreitWigner\":\n",
112112
" edge_ids = determine_attached_final_state(graph, edge_id)\n",
113113
" final_state_ids = map(str, edge_ids)\n",
114-
" mass = sp.Symbol(f\"m_{{{\"+\".join(final_state_ids)}}}\")\n",
114+
" mass = sp.Symbol(f\"m_{{{'+'.join(final_state_ids)}}}\")\n",
115115
" particle, _ = graph.get_edge_props(edge_id)\n",
116116
" mass0 = sp.Symbol(f\"m_{{{particle.latex}}}\")\n",
117117
" gamma0 = sp.Symbol(Rf\"\\Gamma_{{{particle.latex}}}\")\n",
@@ -159,7 +159,7 @@
159159
" ) -> \"RelativisticBreitWignerWithFF\":\n",
160160
" edge_ids = determine_attached_final_state(graph, edge_id)\n",
161161
" final_state_ids = map(str, edge_ids)\n",
162-
" mass = sp.Symbol(f\"m_{{{\"+\".join(final_state_ids)}}}\")\n",
162+
" mass = sp.Symbol(f\"m_{{{'+'.join(final_state_ids)}}}\")\n",
163163
" particle, _ = graph.get_edge_props(edge_id)\n",
164164
" mass0 = sp.Symbol(f\"m_{{{particle.latex}}}\")\n",
165165
" gamma0 = sp.Symbol(Rf\"\\Gamma_{{{particle.latex}}}\")\n",

‎docs/conf.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,14 +129,14 @@
129129
html_title = "Common Partial Wave Analysis Project"
130130
intersphinx_mapping = {
131131
"ampform": ("https://ampform.readthedocs.io/stable", None),
132-
"attrs": (f"https://www.attrs.org/en/{pin("attrs")}", None),
132+
"attrs": (f"https://www.attrs.org/en/{pin('attrs')}", None),
133133
"expertsystem": ("https://expertsystem.readthedocs.io/stable", None),
134134
"graphviz": ("https://graphviz.readthedocs.io/en/stable", None),
135-
"IPython": (f"https://ipython.readthedocs.io/en/{pin("IPython")}", None),
135+
"IPython": (f"https://ipython.readthedocs.io/en/{pin('IPython')}", None),
136136
"jax": ("https://jax.readthedocs.io/en/latest", None),
137-
"matplotlib": (f"https://matplotlib.org/{pin("matplotlib")}", None),
138-
"numba": (f"https://numba.readthedocs.io/en/{pin("numba")}", None),
139-
"numpy": (f"https://numpy.org/doc/{pin_minor("numpy")}", None),
137+
"matplotlib": (f"https://matplotlib.org/{pin('matplotlib')}", None),
138+
"numba": (f"https://numba.readthedocs.io/en/{pin('numba')}", None),
139+
"numpy": (f"https://numpy.org/doc/{pin_minor('numpy')}", None),
140140
"pwa": ("https://pwa.readthedocs.io", None),
141141
"python": ("https://docs.python.org/3", None),
142142
"qrules": ("https://qrules.readthedocs.io/stable", None),

‎pyproject.toml

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,25 @@ maintainers = [{email = "compwa-admin@ep1.rub.de"}]
1414
name = "compwa-github-io"
1515
requires-python = ">=3.12"
1616

17-
[project.optional-dependencies]
17+
[project.readme]
18+
content-type = "text/markdown"
19+
file = "README.md"
20+
21+
[project.urls]
22+
Documentation = "https://compwa.github.io"
23+
Source = "https://github.com/ComPWA/compwa.github.io"
24+
Tracker = "https://github.com/ComPWA/compwa.github.io/issues"
25+
26+
[dependency-groups]
1827
dev = [
19-
"compwa-github-io[doc]",
20-
"compwa-github-io[jupyter]",
21-
"compwa-github-io[sty]",
22-
"compwa-github-io[test]",
28+
"ruff",
2329
"sphinx-autobuild",
30+
{include-group = "doc"},
31+
{include-group = "jupyter"},
32+
{include-group = "style"},
33+
{include-group = "test"},
2434
]
2535
doc = [
26-
"compwa-github-io[notebooks]",
2736
"myst-nb",
2837
"sphinx",
2938
"sphinx-api-relink",
@@ -39,45 +48,34 @@ doc = [
3948
"sphinx-thebe",
4049
"sphinx-togglebutton",
4150
"sphinxcontrib-bibtex >=2",
51+
{include-group = "notebooks"},
4252
]
4353
jupyter = [
44-
"compwa-github-io[notebooks]",
4554
"jupyterlab",
4655
"jupyterlab-code-formatter >=3.0.0",
4756
"jupyterlab-git",
4857
"jupyterlab-lsp",
4958
"jupyterlab-myst",
5059
"python-lsp-ruff",
5160
"python-lsp-server[rope]",
61+
{include-group = "notebooks"},
5262
]
5363
notebooks = [
5464
"black",
5565
"graphviz",
5666
"numpy",
5767
"sympy",
5868
]
59-
sty = [
69+
style = [
6070
"attrs",
61-
"compwa-github-io[types]",
6271
"nbformat",
63-
"ruff",
72+
{include-group = "types"},
6473
]
6574
test = [
6675
"jupyter",
6776
"nbmake",
6877
]
69-
types = [
70-
"sphinx-api-relink",
71-
]
72-
73-
[project.readme]
74-
content-type = "text/markdown"
75-
file = "README.md"
76-
77-
[project.urls]
78-
Documentation = "https://compwa.github.io"
79-
Source = "https://github.com/ComPWA/compwa.github.io"
80-
Tracker = "https://github.com/ComPWA/compwa.github.io/issues"
78+
types = ["sphinx-api-relink"]
8179

8280
[tool.setuptools]
8381
include-package-data = false
@@ -243,7 +241,7 @@ split-on-trailing-comma = false
243241
"S101",
244242
"S307",
245243
"T20",
246-
"TCH00",
244+
"TC00",
247245
]
248246
"**/003.ipynb" = ["B023", "PLC2701"]
249247
"**/009.ipynb" = ["FURB113"]

0 commit comments

Comments
 (0)
Please sign in to comment.