Releases: ComPWA/expertsystem
PWA Expert System 0.7.3 (final release)
Release 0.7.3 (final release)
See all documentation for this version here.
This is the final release of the PWA Expert System. The package has been split up into QRules and AmpForm (the original reaction and amplitude sub-modules).
⚠️ Interface
Moved particle module to reaction (#551)
The particle module was originally under a separate module, because it could theoretically operate on its own. However, since its main classes Particle, ParticleCollection and Spin merely serve as user interfaces to the reaction module, it's better to move it back into the reaction module.
This PR also enables #372, which was currently not possible due to cyclic imports.
Extract reaction.transition sub-module (#557)
The main reaction module has been reduced in size by extracting a transition sub-module. This module (eventually) contains everything related to state transitions between an initial and final state (as opposed to some cascade of decays).
🔨 Internal maintenance
GellMann-Nishijima conservation rule in particle module (#552)
Closes #372 and reduces code duplication
_ElementType is not constrained anymore so that Pyright (#554)
Closes #437
Un-constrain the TypeVar used in GraphElementPropertyMap so that Pyright can handle it. This allows upgrading Pyright to 1.1.100 and up, and therefore running it as a pre-commit hook.
Added converters for Edge/NodeInput classes to make them more user-friendly (#555)
The conservation_rules were a bit bothersome to use because you have to convert the input for each rule to a some input class and (for correct typing) explicitly cast to a type listed in EdgeQuantumNumbers and/or NodeQuantumNumbers. This PR improves this a bit by adding attrs argument converters and asserting that the input classes have the same attribute names as EdgeQuantumNumbers and/or NodeQuantumNumbers (for duck typing).
📝 Documentation
PWA Expert System 0.7.2
Release 0.7.2
See all documentation for this version here.
💡 New features
Added argument converters for the Particle constructor (#544)
Added converters and validators to the constructor arguments of Particle. The converters make it easier to define a custom Particle, because it's not necessary to import and declare Parity and Spin instances first. For instance:
Particle(
name="custom",
pid=99999,
latex=R"p_\mathrm{custom}",
spin=1.0,
mass=1,
charge=1,
isospin=(1.5, 0.5), # no need to use Spin
charmness=1,
parity=+1, # no need to use Parity
)Implemented pretty reprs for classes in the particle module (#545)
- Fix
reprforParticleCollection - Hide attribute values if they are the default
- Indent arguments when there's limited space
- Don't show
ParityinParticleconstructor (possible since #544)
| old | new |
|---|---|
) |
![]() |
⚠️ Interface
It's now possible to hide initial state and resonance ids from a DOT rendering of topologies (#546)
Argument render_edge_id in asdot has been split into render_final_state_id, render_resonance_id, and render_initial_state_id.
Edges IDs of initial states and resonances are now hidden by default. They can be shown with the arguments of asdot:
import expertsystem as es
es.io.asdot(
graphs,
render_node=True,
render_final_state_id=True,
render_resonance_id=True,
render_initial_state_id=True,
collapse_graphs=True,
)Default view of a StateTransitionGraph:
🐛 Bug fixes
Spin in DOT rendering is shown as a fraction, like -1/2 (#540)
A StateTransitionGraph now renders with fractions instead of floats:
| old | new |
|---|---|
The Google Colab cell in notebooks does not use cell magic (#541)
Previously, it could happen that the expertsystem was installed locally, overwriting the editable install.
ParticleCollection __repr__ has been fixed, so that eval can be called on it (#545)
Improved the exception message of ParticleCollection.find: shows more candidates now (#547)
Use diflib to find more particle candidates in case startswith fails to find any. For instance:
>>> from expertsystem.particle import load_pdg
>>> pdg = load_pdg()
>>> pdg["lambda"]
Traceback (most recent call last):
...
KeyError: "No particle with name 'lambda' in the database. Did you mean one of these? ['Lambda', 'Lambda~', 'Lambda(c)+', 'Lambda(b)0']"
>>> pdg["gamm"]
Traceback (most recent call last):
...
KeyError: "No particle with name 'gamm' in the database. Did you mean 'gamma'?"🔨 Internal maintenance
The Parity and Spin classes are now defined with attrs (#543)
Makes the two classes easier to read and maintain. Also offers the possibility to add converters and validators.
📝 Documentation
Added a changelog link in the sidebar that points to the release notes on GitHub (#539)
Added a link to the releases page of this repository from Read the Docs.
🖱️ Developer Experience
The PR body of message is now also added to release notes (#538)
The release drafter previously only added PR titles to the release notes. Now the body is also included, so that it looks like this:

Test output is now uploaded as artifact (#542)
cSpell can now be run as pre-commit hook (#548)
cSpell is now enforced through pre-commit. This means that there is no need anymore to install cSpell through npm and that spelling is checked upon committing 🎉
For more info, see github.com/ComPWA/mirrors-cspell.
Added custom pre-commit hooks from ComPWA/meta (#550 and #535)
Now using pre-commit hooks from the ComPWA/meta repository in order to automatically fix first cells of Jupyter notebooks as well as their nbformat version.
PWA Expert System 0.7.1
Release 0.7.1
See all documentation for this version here.
💡 New features
Visualization features (graphviz) can now be installed through extras_require:
pip install expertsystem[viz]⚠️ Interface
HelicityModel.parameters has been renamed to HelicityModel.parameter_defaults (#531)
🐛 Bug fixes
- Edge IDs can now be hidden from
Topologyvisualizations as well (#526) - Spin projections are abbreviated to
intif they are integers (#532)
📝 Documentation
- The
expertsystemis installed in the notebook kernel if it's not available (#534). This is especially useful for Google Colaboratory. - Topologies and plots are now rendered as SVG in the notebooks and the example pages (#529)
- Interactive page has been merged with the main usage page (#533)
🖱️ Developer Experience
Packages listed under extras_require are also pinned as developer dependencies (#528)
Contributors since 0.7.0
PWA Expert System 0.7.0
Release 0.7.0
See all documentation for this version here.
Breaking change!
The amplitude sub-module now formulates amplitude models as a sympy.Expr (#454), so that it can be rendered as LaTeX in notebooks and its underlying expression tree can be 'lambdified' to arbitrary back-ends (see ComPWA/tensorwaves#222).
See a demo here.
Additional changes
💡 New features
- Export and import the
Result,StateTransitionGraph, andTopologyclass to JSON/YAML (#519) - Added a 'strict'
__eq__method forStateTransitionGraphfor testing (#519)
⚠️ Interface
io.convert_to_dothas been renamed toio.asdot, in accordance withasdict/fromdict(#513)- The
schemasfolder has been disolved into theparticlemodule. load_default_particleshad to be moved from thereactionmodule to the mainexpertsystemmodule (#519)Result.collapse_graphs()andResult.get_particle_graphs()have been removed. You should now useio.asdot(..., collapse_graphs=True)andio.asdot(..., strip_spin=True), respectively. (#523)HelicityKinematics.convert()has been renamed toHelicityKinematics.transform()(#524) (This is only a change with regard to pre-release 0.7.0a0.)
📝 Documentation
- URL changes of the usage pages: notebooks have been renamed to match module names (#518)
🖱️ Developer Experience
- Notebooks can now be run through
tox -e docliveas well (#514) - Added
nbqa-flake8pre-commit hook and fixed problems that were identified (#517)
Contributors since 0.6.10
@redeboer and @spflueger
PWA Expert System 0.7.0a0
Pre-release 0.7.0a0
Breaking change!
The amplitude sub-module now formulates amplitude models as a sympy.Expr (#454), so that it can be rendered as LaTeX in notebooks and its underlying expression tree can be 'lambdified' to arbitrary back-ends (see ComPWA/tensorwaves#222).
See a demo here.
This is a pre-release for ComPWA/tensorwaves#222
Contributors since 0.6.10
@redeboer and @spflueger
PWA Expert System 0.6.10
Release 0.6.10
This is the final release before the switch to SymPy (see #454)
See all documentation for this version here.
💡 New features
- Added option an to change mass conservation width factor (#484 and #511)
- Exception message for violated rules is now easier to read (#485)
- Node properties and edge IDs are now rendered in dot language (#487 and #510)
- Added
create_n_body_topologyandcreate_isobar_topologiesfaçade functions (#477, #493, and #500)
⚠️ Interface
- Violated rules are raised as an exception and are note part of the
Resultclass anymore (#459) Topologyclass has become immutable and hashable (#470)- Removed
graph_node_comparatorfromStateTransitionGraph(#478) Result.solutionshas been renamed toResult.transitions(#481)Enummembers such asInteractionTypes.STRONGare inUPPER_CASE(#499)- Final state edge IDs in a
TopologyandStateTransitionGraphnow lie in the range [0, n] with n the number of final states (#504)
🐛 Bug fixes
- Members of the
StateTransitionGraphare protected again (#479) - (Unstable) cell IDs have been removed from notebooks (#497)
Topologyconstructor takesIterableof edge/node IDs, e.g. to support generators (#498)- Progress bar works better now in Jupyter notebook because of
tqdm.autonotebook(#508)
🔨 Internal maintenance
conf.pynow usesmyst_enable_extensionsso thatmyst-nb >= 0.11is supported (#463)- More classes are defined through with
attr.s(#460) - Preference is given over
IterableorSizedinstead ofListetc. (#473) - Making more use of tuple unpacking instead of using an index (#474)
- Using
iter(next(...))instead of an index (#476) - The
amplitudemodel constructs info fromTopologywhere possible instead ofStateTransitionGraph(e.g. recoil edge IDs) (#475)
📝 Documentation
- Folder structure for ADRs has been improved so that the URLs on RTD become shorter (#464 and #469)
- ADR has been added about custom dynamics implementation (#461). This is addressed in
- Workflow notebook (
workflow.ipynb) has been renamed totransition.ipynb(#494). This is in preparation for #454. - Top of each sub-module API page has an
importstatement so that it is easier to see where the sub-module is located (#495) TopologyandStateTransitionGraphis rendered with node IDs and labels and edge IDs (#487, #501, and #510)
🖱️ Developer Experience
- Add
math-dollarand other myst extensions (#465) - CI runs on draft PR again (#455)
tox -e doclive(sphinx-autobuild) now has color output (#462)- Jupyter notebooks are now formatted with
nbqa-blackandnbqa-isort(#466) - Documentation build logs are now uploaded as artifacts (#471)
- Narrowed down type hints in the tests (#472)
- Added infrastructure for generating custom stubs to the
typingfolder (#496) - Added back the Jupyter Lab extension
jupyterlab-code-formatter(#491) - Added
collapsible_headingsJupyter Lab extension to developer dependencies (#502) pre-commithooks are now automatically upgraded through GitHub Actions (#506)
Contributors since 0.6.9
PWA Expert System 0.6.9
Release 0.6.9
See all documentation for this version here.
💡 New features
- The
expertsystemworks on Python 3.9 as well now (#447) - Added LaTeX labels to the
Particleclass (#449)
⚠️ Interface
- The
Kinematicsclass is not mutable anymore (#453)
📝 Documentation
- The visualization of the
expertsystem's submodules on the API page (e.g. here) has been removed (#452)
🖱️ Developer Experience
- A new ADR has been formulated: the amplitude model will be formulated in terms of SymPy (#445)
- Fix:
pytestis now run on all cores on GitHub Actions (#448) - Removed all reStructuredText files: MyST suffices (#451)
- CI for documentation is faster now that
pydepshas been removed (#452)
Contributors since 0.6.8
@redeboer and @spflueger
PWA Expert System 0.6.8
Release 0.6.8
⚠️ Interface
- The amplitude model file structure now follows that of the class structure of
AmplitudeModel, now that theiomodule makes use ofattr.asdict(#436) FitParameter.valuehas become a required attribute (#432)- It is possible to register custom
Dynamicsclasses now thatParticleDynamicshas become mutable (#434) RelativisticBreitWigner.pole_position-->RelativisticBreitWigner.pole_real(#439)RelativisticBreitWigner.pole_width-->RelativisticBreitWigner.pole_imag(#439)
🐛 Bug fixes
ioonly validates when loading, not when writing (#431)
🖱️ Developer Experience
- JSON amplitude model files are validated JSON schemas in VSCode (#429)
mypythroughtoxis now run on thesrcfolder (#433)- The cron job PR for upgrading the dependencies is submitted with the GitHub bot as author (#435)
- The
iomodule has become easier to maintain now that it makes use ofattr.asdict. Classes structures (#436) - A minimum version has been set for
mypy, for static typing onattrs(#444) sphinx-autobuildis now installed through developer requirements (#446)
Contributors since 0.6.7
PWA Expert System 0.6.7
Release 0.6.7
See all documentation for this version here.
💡 New features
- Added
__repr__and__eq__methods for theFitParametersclass (#427) - Implemented
io.asdictandio.fromdictfunctions. This allows one to dump to any file format that supports stream from and to adictlike structe (#426) - refactor!: merge load functions (#428)
⚠️ Interface
- XML support (for ComPWA) has been removed (#425)
- Functions
load_amplitude_modelandload_particle_collectionhave been merged into one functionio.load. This is to reflect theio.writefunction and make the API simpler (#428)
🐛 Bug fixes
- Added the "Interface" label to the allowed PR labels (PR linting), so that it's possible to have a PR with only the Interface change label (#423)
🖱️ Developer Experience
- Running
pytestin parallel is now more stable, because serialization tests do not read from disk anymore (#426)
Contributors since 0.6.6
PWA Expert System 0.6.6
Release 0.6.6
See all documentation for this version here.
💡 New features
- Top node with
StrenghtIntensitytimesNormalizedIntensityhas been removed from theAmplitudeModel(#417)
🐛 Bug fixes
- Parity violating amplitudes are not coupled anymore (#421)
🖱️ Developer Experience
- Developer requirements are pinned all the way to indirect dependencies and for each Python version. The corresponding
requirements*.txtfiles are updated automatically for each PR and through a cron job (#412) - Issue templates have been made more user friendly (#420)
- Added issue label for interface changes (#422)
Contributors since 0.6.5
@redeboer and @spflueger

