Skip to content

Commit

Permalink
quantum-number-names are now determined programatically
Browse files Browse the repository at this point in the history
  • Loading branch information
grayson-helmholz committed Oct 18, 2024
1 parent a758e47 commit 4db3ee5
Showing 1 changed file with 7 additions and 27 deletions.
34 changes: 7 additions & 27 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import sys

import attrs
from sphinx_api_relink.helpers import (
get_branch_name,
get_execution_mode,
Expand All @@ -11,6 +12,8 @@
set_intersphinx_version_remapping,
)

from qrules.quantum_numbers import EdgeQuantumNumbers, NodeQuantumNumbers

sys.path.insert(0, os.path.abspath("."))
from _extend_docstrings import extend_docstrings # noqa: PLC2701

Expand Down Expand Up @@ -259,35 +262,12 @@
nb_execution_show_tb = True
nb_execution_timeout = -1
nb_output_stderr = "remove"
nitpik_temp_names = [
"pid",
"mass",
"width",
"spin_magnitude",
"spin_projection",
"charge",
"isospin_magnitude",
"isospin_projection",
"strangeness",
"charmness",
"bottomness",
"topness",
"baryon_number",
"electron_lepton_number",
"muon_lepton_number",
"tau_lepton_number",
"parity",
"c_parity",
"g_parity",
"l_magnitude",
"l_projection",
"s_magnitude",
"s_projection",
"parity_prefactor",
]
nitpick_temp_eqdge_names = list(attrs.fields_dict(EdgeQuantumNumbers))
nitpick_temp_node_names = list(attrs.fields_dict(NodeQuantumNumbers))
nitpick_temp_names = [*nitpick_temp_eqdge_names, *nitpick_temp_node_names]
nitpick_temp_patterns = [
(r"py:(class|obj)", r"qrules\.quantum_numbers\." + name)
for name in nitpik_temp_names
for name in nitpick_temp_names
]
nitpick_ignore_regex = [
(r"py:(class|obj)", "json.encoder.JSONEncoder"),
Expand Down

0 comments on commit 4db3ee5

Please sign in to comment.