Skip to content

Releases: ComPWA/qrules

QRules 0.9.3

20 Oct 15:24
523c639
Compare
Choose a tag to compare

Release 0.9.3

See all documentation for this version here.

💡 New features

Python 3.10 is now supported (#117)

🔨 Internal maintenance

Narrowed down type hints (#114)

See also ComPWA/ampform#168 and ComPWA/tensorwaves#332

📝 Documentation

Added Zenodo DOI badge (#106)

Closes ComPWA/compwa.github.io#55

Zenodo DOI

QRules can now be installed from Conda-Forge (#115)

Closes #59

🖱️ Developer Experience

Fixed .flake8 config syntax (#116)

The .flake8 config file was using not using the same comment style as described in
https://flake8.pycqa.org/en/latest/user/configuration.html#project-configuration
Consequence not all errors were identified anymore.

Additional update: config has been simplified with the use of --extend-select.

Embedded Zenodo metadata (#112)

Closes ComPWA/compwa.github.io#64

QRules 0.9.2

24 Sep 11:46
61caefa
Compare
Choose a tag to compare

Release 0.9.2

Release for first Zenodo DOI
Zenodo DOI

See all documentation for this version here.

💡 New features

Added more pretty reprs through decorator (#85)

Following classes are now better represented in Jupyter noteboooks:

  • InitialFacts
  • InteractionProperties
  • EdgeSettings
  • NodeSettings
  • GraphSettings
  • GraphElementProperties
  • QNProblemSet
  • QuantumNumberSolution
  • QNResult
  • ExecutionInfo
ProblemSet can now be rendered as DOT (#86)

Closes #28

Allow setting custom topologies in STM (#103)

Closes #96

Made the StateTransitionManager.topologies attribute public, so that it's easier to feed custom topologies to the StateTransitionManager. Note that the topologies attribute is immutable and can only be modified by overwriting it, so I decided to avoid cluttering the code with additional setters and getters.

An example for 2-to-2 topologies (see also #29) is illustrated in a new notebook.

🐛 Bug fixes

Use functools.wraps in decorators (b988057)

Improves the docstrings of decorated functions.

📝 Documentation

Removed references to the expert system in the documentation (#104)

Links in the documentation were sometimes still pointing to the expertsystem website. Best avoided by keeping intersphinx_mapping as small as possible.

Added conservation rules page (#84)

Describe how to use the conservation_rules module separately.

A preview with cell output can be viewed here:
https://qrules.readthedocs.io/en/doc-conservation-rules/usage/conservation.html
(until this PR is closed).

Decreased code line width in notebooks (#88)

Input code cells that are too wide get a scroll bar. That's ok, but it looks just a bit better when you can see the entire code without scrolling.

Page content on the documentation is now wider (#98)

See ComPWA/ampform#104

Embedded GPLv3+ license file (#100)

Some platforms like Zenodo and conda-forge require the license file to be packaged.

Extended package description in README and removed tick-boxed (#101)

Removed the tick-boxes there, because they do not render correctly on PyPI.

Added package description for PyPI (#102)

Closes ComPWA/compwa.github.io#61

Automated changes by create-pull-request GitHub action

Removed references to the expert system in the documentation (#104)

Links in the documentation were sometimes still pointing to the expertsystem website. Best avoided by keeping intersphinx_mapping as small as possible.

Added a notebook that shows how to feed custom topologies to the StateTransitionManager (#103)

Closes #96

An example for 2-to-2 topologies (see also #29) is illustrated in a new notebook.

Switched to compwa-org web-page for contributing (#93)

🖱️ Developer Experience

Switched to pre-commit.ci where possible (#87)

pre-commit.ci is faster than GitHub Actions, so it would be better to switch to that. Another major advantage: it can auto-fix style problems.

The only problem is that hooks like pylint, mypy, and even flake8 require additional dependencies and we don't want to maintain a list of those in both setup.cfg (required for code editors that use those dependencies) as well as in .pre-commit-config.yaml. There are also hooks like pyright and editorconfig-checker that don't work well on pre-commit.ci.

This PR makes all hooks that don't require additional dependencies (like black and isort) 'non-local'. This also works better with source control in VSCode.
Caveat: pinned requirements might diverge from the versions of the hooks.

This PR is a bit experimental -- we'll have to see how well this works out before it is implemented in AmpForm etc.

Another potential problem is that (as far as I know), pre-commit.ci cannot switch off autoupdate (at most set to quarterly). It is (for now) better to upgrade the hooks along with the requirement pinning though.

🔨 Internal maintenance

Removed mdit-py-plugins version limit (#94)

See ComPWA/ampform#147

QRules 0.9.1

14 Jul 10:38
a589665
Compare
Choose a tag to compare

Release 0.9.1

See all documentation for this version here.

⚠️ Interface

StateTransitionCollection ordered has become ordered (#77)

Turn StateTransitionCollection into an immutable abc.Sequence, instead of a set.

🐛 Bug fixes

Allow rendering iterables with graphviz (#78)

Allow converting an iterable (not just a sequence) to DOT. This enables rendering for instance the output of a filter as DOT:

import graphviz
import qrules

reaction = qrules.generate_transitions(
    initial_state="J/psi(1S)",
    final_state=["K0", "Sigma+", "p~"],
    allowed_interaction_types="strong",
)
transitions = filter(
    lambda t: t.states[3].particle.mass > 1.75,
    reaction.transitions,
)
dot = qrules.io.asdot(transitions, collapse_graphs=True, render_final_state_id=False)
graphviz.Source(dot)

image

Node properties for StateTransition are now also rendered (#80)

QRules 0.9.0

18 Jun 15:04
fe764e1
Compare
Choose a tag to compare

Release 0.9.0

‼ Contains major changes to qrules.generate_transitions

See all documentation for this version here.

💡 New features

Particles can now be sorted (#72)

This PR allows sorting Particle instances. This is useful later on in #26, when StateTransitions are meant to become frozen and sortable.

Note that ParticleCollection.names now returns a list, sorted using the total_ordering of Particle.

⚠️ Interface

Rename formalism_type to formalism (#69)

Use

result = qrules.generate_transitions(
    ....
    formalism="canonical-helicity",
)

instead of

result = qrules.generate_transitions(
    ....
    formalism_type="canonical-helicity",
)
Use canonical-helicity by default (#70)

Canonical is the most complete set of solutions. The idea is to do the formalism filtering later on, in AmpForm (see #12).

Return sorted list for ParticleCollection.names (#72)

ParticleCollection.names now returns a list, sorted using the total_ordering of Particle.

allowed_interaction_types has become more strict in what types of descriptions it takes (#74)

Simplifies the slightly confusing rules for the allowed_interaction_types argument of qrules.generate_transitions.

The Result class has been replaced with a frozen ReactionInfo class (#75)

Closes #26

A few new frozen classes (State, StateTransition, StateTransitionCollection, and ReactionInfo) now replace the StateTransitionGraph as main interface to the user. StateTransitionGraph is mutable and only for internal usage (see also #25).

The Result class has been removed in favor of ReactionInfo.

Some additional improvements:

  • Topology and Topology now have a pretty printer methods (as have StateTransition etc.)
  • FrozenDict has gotten ordering (for sorting StateTransitions and Topologys).

📝 Documentation

Documentation now uses import qrules without "as q" (#66)

Use import qrules instead of import qrules as q, as it's not really needed to abbreviate this module.

🔨 Internal maintenance

Result fixture in the conftest.py for the unit tests has been parametrized (#67)

See https://docs.pytest.org/en/6.2.x/parametrize.html

repr methods in tests are parametrized (#68)

Also includes pytest-flake8 fixes

Fixed more problems identified by pytest-flake8 (#68)

See pytest-flake8

QRules 0.8.2

02 Jun 10:40
6f90310
Compare
Choose a tag to compare

Release 0.8.2

See all documentation for this version here.

📝 Documentation

Improved docstrings about interaction properties (#57)

It's not well documented what the labels of an interaction node mean (see for instance this graph visualization).

Rendering of special methods in the API has also been improved.

🐛 Bug fixes

Refuse rendering collapsed graphs with node properties (#57)

It doesn't make sense to render node properties for collapsed graphs of state transition graphs without spin projections on the edges, so io.asdot now raises an exception if you try to use render_node=True with collapse_graph=True or strip_spin=True.

🖱️ Developer Experience

Milestone are now automatically closed upon release (#62)

QRules 0.8.1

02 May 20:11
439e329
Compare
Choose a tag to compare

Release 0.8.1

Maintenance release: mainly improves mobile version of the website.

See all documentation for this version here.

⚠️ Interface

Optional dependencies "extras" has been renamed to "all" (a2fc2dd)

🖱️ Developer Experience

Added PR template + gitpod extensions (#52)
GitPod now automatically installs recommended VSCode extensions (#52)
Notebooks can now be run through pytest (#53)

Provides a faster way of running all notebooks. Usage:

tox -e testnb
EXECUTE_NB=yes  tox -e testnb  # as if run by Sphinx

or

poytest --nb-test-files  # all tests and notebooks
pytest docs --nb-test-files
pytest docs --nb-test-files  -n auto  # parallel

Rest of the configuration, such as ignoring cell output, is provided through pytest.ini. For further info, see pytest-notebook.

Note that the notebooks are still run through Sphinx on the CI. This is to ensure the rendering on RTD works correctly. pytest-notebook is therefore only installed through the dev extras, not through the test extras.

Removed nbstripout from developer dependencies (c7c93f7)

Only available as pre-commit hook now.

Added more flake8 plugins and fixed identified problems (ffa91f5)
Added VSCode test explorer extension (2318823)

Native VSCode test explorer doesn't work as great. For instance, it's not possible to run all tests within a folder.

QRules 0.8.0

16 Apr 11:21
8deee77
Compare
Choose a tag to compare

Release 0.8.0

See all documentation for this version here.

💡 New features

Determine quantum number domains from a ParticleCollection (#45)

From ComPWA/expertsystem#486, but adapted so that ranges are generated: if there is some Particle in the inserted ParticleCollection with spin-1.5, the range will be [0, 0.5, 1, 1.5] (not just [1.5]). Also allows setting the maximum spin in LS-couplings.

Extend configuration arguments in facade functions (#40) by @wgradl

Allow setting the maximum angular momentum and spin magnitude through check_reaction_violations() and generate_transitions().

⚠️ Interface

Rename default_settings to settings (#43)
Rename to InteractionTypes to InteractionType (#47)

Policy is that enums should be singular, so that the syntax makes more sense, especially in docstrings. For instance:

  • "Which InteractionType?"
  • "Use InteractionType.WEAK instead of..."

Same with the (already existing) SolvingMode.

Rename particles argument to particle_db in several functions (#50)

Rename particles argument to particle_db in several functions and classes, such as the StateTransitionManager. This naming was introduced for check_reaction_violations (#40) and makes more sense to the reader.

🐛 Bug fixes

Fix link to codacy badge (#4)
Define testpaths in pytest.ini (#42)

Since 8a3f33c, it is become impossible to run tests through VSCode. Defining testpaths in pytest.ini fixes this. In addition, it removes the last 'non-tox' section from the tox.ini file (see 2d9f620).

Note that this also allows running and debugging doctests from VScode 🎉

🔨 Internal maintenance

Added a test to verify default interaction settings (#41)

Taken from ComPWA/expertsystem#486 and in preparation of #40. The next step (before #40 idea is to deduce default interaction settings from a ParticleCollection (as was initially done in that PR, see ComPWA/expertsystem#486 (comment))

📝 Documentation

Several improvements to the documentation

See #3, 35ebed2, 8d4e940, #44, and 8deee77

🖱️ Developer Experience

Split GitHub Actions workflow "CI" into CI-style, CI-docs, and CI-tests (#36)
Let Read the Docs fail if there are warning (#37)
Define all requirements setup.cfg and pin versions through constraint files (#39)

With the release of pip-tools v6.1.0, pip-compile now correctly handles extras_require. This allows for a big clean-up of the set-up introduced by ComPWA/expertsystem#412.

Advantages:

  • Easier for the user and developer! Just run:
    pip install -e .[dev]
    to get started developing,
    pip install -e .[dev] -U
    to try out upgrades, and
    pip install -c .constraints/py3.8.txt -e .[dev] -U
    in case you exactly want to reproduce the dependencies for some commit.
  • The upgrade jobs become significantly faster: bit over 1min versus almost 3min
  • All requirements, their version domains, and the dependencies between each of the requirement sections can be nicely overseen and maintained within setup.cfg
  • Git diffs for pull requests that affect dependencies become easier to oversee
  • Less complexity and fewer changes per commit
Define testpaths in pytest.ini (#42)

Since 8a3f33c, it is become impossible to run tests through VSCode. Defining testpaths in pytest.ini fixes this. In addition, it removes the last 'non-tox' section from the tox.ini file (see 2d9f620).

Note that this also allows running and debugging doctests from VScode 🎉

QRules 0.8.0a1

06 Apr 16:08
5a14647
Compare
Choose a tag to compare
QRules 0.8.0a1 Pre-release
Pre-release

Pre-release 0.8.0a1

See all documentation for this version here.

⚠️ Interface

  • Extract expertsystem.reaction as qrules package (#1 and #2)
    The expertsystem has been split up into qrules and ampform 🎉