Skip to content

Commit

Permalink
MAINT: update lock files (#27)
Browse files Browse the repository at this point in the history
* DOC: switch to stable page for `vector` docs
* DX: convert Tox config to native TOML
* FIX: downgrade `pygments` for `sphinx-codeautolink`
* FIX: set `sphinx.configuration`
* MAINT: remove `pygments` constraint

Co-authored-by: GitHub <noreply@github.com>
  • Loading branch information
pre-commit-ci[bot] and web-flow authored Jan 13, 2025
1 parent d9e9634 commit 7e74568
Show file tree
Hide file tree
Showing 10 changed files with 582 additions and 535 deletions.
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
".pre-commit-config.yaml",
".prettierignore",
".readthedocs.yml",
".taplo.toml",
".vscode/*",
"docs/conf.py",
"pyproject.toml"
Expand Down
6 changes: 3 additions & 3 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.8
rev: 0.5.15
hooks:
- id: check-dev-files
args:
Expand Down Expand Up @@ -75,7 +75,7 @@ repos:
)$
- 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 @@ -152,6 +152,6 @@ repos:
- id: pyright

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.5.11
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:
pixi run \
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 @@ -15,3 +15,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: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ git clone https://github.com/ComPWA/report
cd report
```

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).
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/layout/#the-lockfile).

```shell
uv sync --all-extras
Expand Down
4 changes: 2 additions & 2 deletions docs/033/index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"metadata": {},
"source": [
":::{admonition} Abstract\n",
"This document introduces Amplitude Analysis / Partial Wave Analysis (PWA) by demonstrating its application to a specific reaction channel and amplitude model. It aims to equip readers with a basic understanding of the full workflow and methodologies of PWA in hadron physics through a practical, hands-on example. Only basic Python programming and libraries (e.g. [`numpy`](https://numpy.org/doc/stable), [`scipy`](https://docs.scipy.org/doc/scipy), etc.) are used to illustrate the more fundamental steps in a PWA. Calculations with 4-vectors in this report are performed with the [`vector`](https://vector.readthedocs.io/en/latest/usage/intro.html) package.\n",
"This document introduces Amplitude Analysis / Partial Wave Analysis (PWA) by demonstrating its application to a specific reaction channel and amplitude model. It aims to equip readers with a basic understanding of the full workflow and methodologies of PWA in hadron physics through a practical, hands-on example. Only basic Python programming and libraries (e.g. [`numpy`](https://numpy.org/doc/stable), [`scipy`](https://docs.scipy.org/doc/scipy), etc.) are used to illustrate the more fundamental steps in a PWA. Calculations with 4-vectors in this report are performed with the [`vector`](https://vector.readthedocs.io/en/stable/usage/intro.html) package.\n",
":::"
]
},
Expand Down Expand Up @@ -872,7 +872,7 @@
" - The function starts by generating an initial phase space sample. If this initial sample does not meet the required size, more samples are generated and concatenated until the requested size is reached.\n",
" - Once the target sample size is reached or exceeded, `remove_overflow()` trims the sample to precisely match the requested size.\n",
"\n",
"- **Step 3**, Convert tensors to [four-momentum vectors](https://vector.readthedocs.io/en/latest/api/backends/vector.backends.numpy.html#vector.backends.numpy.MomentumNumpy4D) objects\n",
"- **Step 3**, Convert tensors to [four-momentum vectors](https://vector.readthedocs.io/en/stable/api/backends/vector.backends.numpy.html#vector.backends.numpy.MomentumNumpy4D) objects\n",
" The `phasespace` package generates four-momenta in the form of $4\\times N$ TensorFlow tensors, with $N$ the number of events. For each tensor in the phase space tuple (representing the momentum components like $E, p_x, p_y, p_z$), the `to_vector` function converts them into a structured `MomentumNumpy4D` array. This structured array includes keys for each momentum component and possibly the energy component and provides convenient methods for computing boosts etc.\n",
":::"
]
Expand Down
Loading

0 comments on commit 7e74568

Please sign in to comment.