Qrules

Latest version: v0.10.1

Safety actively analyzes 623704 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.10.1

_See all documentation for this version [here](https://qrules.rtfd.io/en/0.10.1)._

⚠️ Enhancements and optimizations
- Warn on violated rules instead of raising exceptions (224)
- Remove topology edge number check (249)

🐛 Bug fixes
- Show only selected rules in DOT rendering (225)

📝 Documentation
- Switch to Ruff as linter (222)
- Illustrate use of `interaction_determinators` (226)
- Add `CITATION.cff` (228)
- Update links to compwa.github.io (244)
- Remove `.html` from page URLs (245)
- Switch to source code link button (246)

🔨 Maintenance
- Test QRules on Python 3.12 (235)

🖱️ Developer Experience
- Enable language navigation on Jupyter Lab (229)
- Remove `figure_formats = ["svg"]` statement (237)
- Install Ruff and Git in Jupyter Lab (238)
- Define `docnblive` job in `tox.ini` (240)
- Switch to Ruff formatter (248)

_The full changelog as commits can be found [here](https://github.com/ComPWA/qrules/compare/0.10.0...0.10.1)._

0.10.0

_See all documentation for this version [here](https://qrules.rtfd.io/en/0.10.0)._

⚠️ Interface

- The `StateTransitionCollection` class has been removed (155)
- `StateTransitionGraph` and related classes have been generalised to `MutableTransition` (156)

✨ New features

- Quantum number solutions can now be inspected separately (168)

⚠️ Enhancements and optimizations

- The `qrules.io._dot` module has been redesigned in an open-closed style to make it easier to extend (157)

🐛 Bug fixes

- Permutate topology edges, not property mappings (218)

_The full changelog as commits can be found [here](https://github.com/ComPWA/qrules/compare/0.9.8...0.10.0)._

0.10.0a1

_See all documentation for this version [here](https://qrules.rtfd.io/en/0.10.0a1)._

⚠️ Interface

- Removed [`StateTransitionCollection`](https://qrules.readthedocs.io/en/0.9.7/api/qrules.transition.html#qrules.transition.StateTransitionCollection) (155)
- Generalized [`StateTransitionGraph`](https://qrules.readthedocs.io/en/0.9.7/api/qrules.topology.html#qrules.topology.StateTransitionGraph) to a [`MutableTransition`](https://qrules.readthedocs.io/en/0.10.0a1/api/qrules.topology.html#qrules.topology.MutableTransition) class (156)

🐛 Bug fixes

- `execution_info` is now defined outside conditionals (162)

🔨 Internal maintenance

- [`io.asdot()`](https://qrules.readthedocs.io/en/0.10.0a1/api/qrules.io.html#qrules.io.asdot) function now has an open-closed design (157)

🖱️ Developer Experience

- Removed Sphinx HTML theme option `theme_dev_mode` (167)

0.9.8

_See all documentation for this version [here](https://qrules.rtfd.io/en/0.9.8)._

✨ New features

- Allow setting interactions per node (210)
- Select allowed resonances with regex (212)

⚠️ Enhancements and optimizations

- Finegrain logging levels (215)


🐛 Bug fixes

- Define execution_info outside conditionals (162)
- Improve documentation sidebar (209)
- Handle `None` parity in `parity_conservation` (211)
- Modify `isospin` in `create_particle()` (216)
- Add test for ψ(2S) → η K⁻ K*(892)⁺ (166)
- Permutate topology edges, not property mappings (217)

📝 Documentation

- Switch to `sphinx-design` (189)
- Update Zenodo author list (192)
- Improve documentation sidebar (209)

🔨 Maintenance

- Switch to black's default 88 line width (188)
- Verify installation on Python 3.11 (204)

🖱️ Developer Experience

- Remove theme option theme_dev_mode (167)
- Pin all dependencies on Read the Docs (172)
- Build documentation with make (178)
- Implement GitHub Actions caching (201)
- Outsource GitHub workflows to ComPWA/actions (205)
- Colorize `sphinx-build` output (208)

_The full changelog as commits can be found [here](https://github.com/ComPWA/qrules/compare/0.9.7...0.9.8)._

0.9.7

_See all documentation for this version [here](https://qrules.rtfd.io/en/0.9.7)._

🐛 Bug fixes

<details>
<summary>ReactionInfo is now hashable (151)</summary>

This is particularly useful for [`functools.lru_cache()`](https://docs.python.org/3/library/functools.html#functools.lru_cache).

</details>

🔨 Internal maintenance

<details>
<summary>Switched to the new attrs API (152)</summary>

See [`import attrs`](https://hynek.me/articles/import-attrs/#the-last-step-import-attrs) and [`attrs` TNG](https://www.attrs.org/en/21.4.0/names.html#attrs-tng).

</details>

<details>
<summary>implement_pretty_repr() decorator is now implement_pretty_repr (154)</summary>

The `implement_pretty_repr()` decorator does not take any arguments, so one level can be removed. This changes it's usage from:

python
implement_pretty_repr() old
attrs.define
class SomeClass:
...


to

python
implement_pretty_repr <-- new
attrs.define
class SomeClass:
...


</details>

📝 Documentation

<details>
<summary>Type hints are abbreviated where possible (154)</summary>

Type hints are abbreviated with [`autodoc_typehints_format`](https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_typehints_format). But note that this does not yet work perfectly because of QRules' [custom reference relinking](https://github.com/ComPWA/qrules/commit/837923872c85e43b765ee7c5a3d6e415d8e330ad).

</details>

<details>
<summary>API is now sorted by position in the source code (154)</summary>

API is now sorted by position in the source code, **not alphabetically**.

</details>

<details>
<summary>Left sidebar is unfolded unto the second level (148)</summary>

Also unfolds the left sidebar unto the second level, like in https://github.com/ComPWA/ampform/pull/221 and https://github.com/ComPWA/tensorwaves/pull/407. Preview [here](https://qrules--148.org.readthedocs.build/en/148).

</details>

<details>
<summary>Added Hypothesis and utterances overlay to allow commenting on the documentation (149)</summary>

Closes https://github.com/ComPWA/compwa-org/issues/109

</details>

<details>
<summary>Explained how to pin dependencies with Conda (150)</summary>

Preview [here](https://qrules--150.org.readthedocs.build/en/150/install.html). See also https://github.com/ComPWA/tensorwaves/pull/411.

</details>

🖱️ Developer Experience

<details>
<summary>Upgrade cron job are now on even weeks only (148 and 153)</summary>

See https://github.com/ComPWA/repo-maintenance/pull/48

</details>

0.9.6

See all documentation for this version [here](https://qrules.rtfd.io/en/0.9.6).

💡 New features

<details>
<summary>Topology is now ordered (137)</summary>

This can be used to create a unique, deterministic ordered list of `Topology` instances. See https://github.com/ComPWA/ampform/issues/6, where one needs a unique way of picking a reference topology.

</details>

<details>
<summary>Implemented Topology.relabel_edges() method (138)</summary>

See how to use this method to permutate final state IDs in a `Topology` case [here](https://qrules--138.org.readthedocs.build/en/138/api/qrules.topology.html#qrules.topology.Topology.relabel_edges).

</details>

<details>
<summary>qrules.io.asdot() function now accepts Graphviz attributes (139)</summary>

Accept Graphviz attributes in `qrules.io.asdot()`, so that the edges, nodes and overall DOT visualization of `StateTransition`s etc. can be styled. See [here](https://qrules--139.org.readthedocs.build/en/139/usage/visualize.html#styling) how to use.

</details>

<details>
<summary>Number of threads can now be set globally (140)</summary>

Closes 10 Closes 11

Added a new class [`NumberOfThreads`](https://qrules--140.org.readthedocs.build/en/140/api/qrules.settings.html#qrules.settings.NumberOfThreads) under the [`settings`](https://qrules--140.org.readthedocs.build/en/140/api/qrules.settings.html) module that makes it possible to set the number of threads globally. This is mainly useful in the tests, where we want to run the `StateTransitionManager` single-threaded for test coverage (#11). Previously this was done by setting `number_of_threads=1` in each test.

</details>

🐛 Bug fixes

<details>
<summary>Final state IDs in all StateTransitions match the order of the final_state argument in generate_transitions() (145)</summary>

Closes 143

Compare [this visualization in v0.9.5](https://qrules.readthedocs.io/en/0.9.5/usage/ls-coupling.html#check-with-qrules) with [the one for this PR](https://qrules--145.org.readthedocs.build/en/145/usage/ls-coupling.html#check-with-qrules).

- 10379d2 adds a test [that fails](https://github.com/ComPWA/qrules/runs/4980455593) the check described in #143
- 2e91cb4 [fixes](https://github.com/ComPWA/qrules/runs/4980458314) that test

</details>

📝 Documentation

<details>
<summary>Notebook pages can now be opened in Deepnote (136)</summary>

Closes https://github.com/ComPWA/repo-maintenance/issues/43

[![image](https://user-images.githubusercontent.com/29308176/149676020-8281cbb4-8cae-4e1a-a171-b451809ea993.png)](https://qrules--136.org.readthedocs.build/en/136/usage.html)

</details>

<details>
<summary>Default graphviz background is now transparent (141)</summary>

Follow-up to 139. Consequence is that exported PNG and SVG files have no background. Preview [here](https://qrules--141.org.readthedocs.build/en/141/usage/visualize.html).

Get old behaviour with `qrules.io.asdot(..., bgcolor="white")`.

</details>

<details>
<summary>Code examples are automatically linked to reference documentation (147)</summary>

All code examples are now clickable with links to corresponding reference documentation (also external links APIs) with [`sphinx-codeautolink`](https://sphinx-codeautolink.readthedocs.io). Closes https://github.com/ComPWA/compwa-org/issues/106 [![image](https://user-images.githubusercontent.com/29308176/151718856-b65caad0-f0aa-4da3-b2d9-9a72c743f849.png)](https://qrules--147.org.readthedocs.build/en/147/usage/reaction.html#define-the-problem-set)

</details>

🖱️ Developer Experience

<details>
<summary>Changed upgrade cron job to bi-weekly (135)</summary>

</details>

<details>
<summary>Installed jupyterlab-myst for MyST editing (147)</summary>

Installed [`jupyterlab-myst`](https://github.com/executablebooks/jupyterlab-myst)

</details>

<details>
<summary>Updated black formatting style (147)</summary>

Updated to the first non-beta black release [22.1.0](https://github.com/psf/black/releases/tag/22.1.0). Most important style effect: [no space around power operator `**`](https://black.readthedocs.io/en/stable/the_black_code_style/current_style.html#line-breaks-binary-operators).

</details>

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.