Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ci:
autofix_commit_msg: "MAINT: implement pre-commit autofixes"
autoupdate_commit_msg: "MAINT: upgrade lock files"
autoupdate_schedule: quarterly
skip:
- check-jsonschema
- mypy
Expand All @@ -14,7 +15,7 @@ repos:
- id: check-useless-excludes

- repo: https://github.com/ComPWA/policy
rev: 0.8.2
rev: 0.8.5
hooks:
- id: check-dev-files
args:
Expand All @@ -27,10 +28,7 @@ repos:
- id: fix-nbformat-version
- id: remove-empty-tags
- id: set-nb-cells
args:
- --add-install-cell
- --additional-packages=IPython
- --extras-require=doc,viz
args: [--autolink-concat]
- id: set-nb-display-name
- id: strip-nb-whitespace

Expand Down Expand Up @@ -63,7 +61,7 @@ repos:
metadata.vscode

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.0
rev: v0.15.1
hooks:
- id: ruff-check
args: [--fix]
Expand Down Expand Up @@ -112,7 +110,7 @@ repos:
- --in-place

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.36.1
rev: 0.36.2
hooks:
- id: check-jsonschema
name: Check CITATION.cff
Expand Down Expand Up @@ -155,6 +153,6 @@ repos:
- id: pyright

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.10.0
rev: 0.10.3
hooks:
- id: uv-lock
3 changes: 3 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
import os
import sys
import typing
import warnings

from sphinx.deprecation import RemovedInSphinx10Warning
from sphinx_api_relink.helpers import (
get_branch_name,
get_execution_mode,
Expand Down Expand Up @@ -33,6 +35,7 @@ def __get_newtypes(some_type: type) -> list:
"8.12.3": "8.12.1",
},
})
warnings.filterwarnings("ignore", category=RemovedInSphinx10Warning)

BRANCH = get_branch_name()
ORGANIZATION = "ComPWA"
Expand Down
62 changes: 8 additions & 54 deletions docs/usage.ipynb
Original file line number Diff line number Diff line change
@@ -1,55 +1,5 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hideCode": true,
"hideOutput": true,
"hidePrompt": true,
"jupyter": {
"source_hidden": true
},
"tags": [
"remove-cell",
"skip-execution"
]
},
"outputs": [],
"source": [
"# WARNING: advised to install a specific version, e.g. qrules==0.1.2\n",
"%pip install -q qrules[doc,viz] IPython"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hideCode": true,
"hideOutput": true,
"hidePrompt": true,
"jupyter": {
"source_hidden": true
},
"tags": [
"remove-cell"
]
},
"outputs": [],
"source": [
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```{autolink-concat}\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -61,7 +11,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
":::{autolink-concat}\n",
":::\n",
"\n",
"```{thebe-button}\n",
"\n",
"```"
]
},
Expand Down Expand Up @@ -127,7 +81,7 @@
"source": [
":::{seealso}\n",
"\n",
"{doc}`/usage/reaction` and {doc}`ampform:usage/amplitude`\n",
"{doc}`/usage/reaction` and {doc}`ampform:amplitude`\n",
"\n",
":::"
]
Expand All @@ -143,7 +97,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The {func}`.load_pdg` function creates a {class}`.ParticleCollection` containing the latest PDG info. Its {meth}`~.ParticleCollection.find` and {meth}`~.ParticleCollection.filter` methods allows you to quickly look up the quantum numbers of a particle and, vice versa, look up particle candidates based on a set of quantum numbers."
"The {func}`.load_pdg` function creates a {class}`.ParticleCollection` containing the latest PDG info. Its {meth}`~.ParticleCollection.find` and {meth}`~.ParticleCollection.filter` methods allows you to quickly look up the quantum numbers of a particle and, vice versa, look up particle candidates based on a set of quantum numbers."
]
},
{
Expand Down Expand Up @@ -172,9 +126,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"````{margin}\n",
"```{margin}\n",
"{meth}`~.ParticleCollection.filter` can perform any type of search using a [`lambda`](https://docs.python.org/3/tutorial/controlflow.html#lambda-expressions). Have a look at {class}`.Particle` for the available properties.\n",
"````"
"```"
]
},
{
Expand Down
57 changes: 5 additions & 52 deletions docs/usage/conservation.ipynb
Original file line number Diff line number Diff line change
@@ -1,60 +1,13 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hideCode": true,
"hideOutput": true,
"hidePrompt": true,
"jupyter": {
"source_hidden": true
},
"tags": [
"remove-cell",
"skip-execution"
]
},
"outputs": [],
"source": [
"# WARNING: advised to install a specific version, e.g. qrules==0.1.2\n",
"%pip install -q qrules[doc,viz] IPython"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hideCode": true,
"hideOutput": true,
"hidePrompt": true,
"jupyter": {
"source_hidden": true
},
"tags": [
"remove-cell"
]
},
"outputs": [],
"source": [
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```{autolink-concat}\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Conservation rules"
"# Conservation rules\n",
"\n",
":::{autolink-concat}\n",
":::"
]
},
{
Expand Down Expand Up @@ -417,7 +370,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.8"
"version": "3.13.12"
}
},
"nbformat": 4,
Expand Down
57 changes: 5 additions & 52 deletions docs/usage/custom-topology.ipynb
Original file line number Diff line number Diff line change
@@ -1,60 +1,13 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hideCode": true,
"hideOutput": true,
"hidePrompt": true,
"jupyter": {
"source_hidden": true
},
"tags": [
"remove-cell",
"skip-execution"
]
},
"outputs": [],
"source": [
"# WARNING: advised to install a specific version, e.g. qrules==0.1.2\n",
"%pip install -q qrules[doc,viz] IPython"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hideCode": true,
"hideOutput": true,
"hidePrompt": true,
"jupyter": {
"source_hidden": true
},
"tags": [
"remove-cell"
]
},
"outputs": [],
"source": [
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```{autolink-concat}\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Custom topologies"
"# Custom topologies\n",
"\n",
":::{autolink-concat}\n",
":::"
]
},
{
Expand Down Expand Up @@ -301,7 +254,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.8"
"version": "3.13.12"
}
},
"nbformat": 4,
Expand Down
57 changes: 5 additions & 52 deletions docs/usage/ls-coupling.ipynb
Original file line number Diff line number Diff line change
@@ -1,60 +1,13 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hideCode": true,
"hideOutput": true,
"hidePrompt": true,
"jupyter": {
"source_hidden": true
},
"tags": [
"remove-cell",
"skip-execution"
]
},
"outputs": [],
"source": [
"# WARNING: advised to install a specific version, e.g. qrules==0.1.2\n",
"%pip install -q qrules[doc,viz] IPython"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"hideCode": true,
"hideOutput": true,
"hidePrompt": true,
"jupyter": {
"source_hidden": true
},
"tags": [
"remove-cell"
]
},
"outputs": [],
"source": [
"import os\n",
"\n",
"STATIC_WEB_PAGE = {\"EXECUTE_NB\", \"READTHEDOCS\"}.intersection(os.environ)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```{autolink-concat}\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# LS-couplings"
"# LS-couplings\n",
"\n",
":::{autolink-concat}\n",
":::"
]
},
{
Expand Down Expand Up @@ -347,7 +300,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.13.8"
"version": "3.13.12"
}
},
"nbformat": 4,
Expand Down
Loading