Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: use Fraction for spin values #288

Merged
merged 51 commits into from
Dec 6, 2024
Merged

ENH: use Fraction for spin values #288

merged 51 commits into from
Dec 6, 2024

Conversation

grayson-helmholz
Copy link
Contributor

@grayson-helmholz grayson-helmholz commented Oct 4, 2024

If the Spin class would have the types of its fields magnitude & projection to be of
the Fraction-type, it would simplyfy the validation of their values (multiples of 1/2,
projection <= magnitude, etc.)

Closes #158

@redeboer redeboer self-requested a review October 4, 2024 15:18
@grayson-helmholz grayson-helmholz linked an issue Oct 4, 2024 that may be closed by this pull request
@redeboer redeboer added the ⚙️ Enhancement Improvements and optimizations of existing features label Oct 4, 2024
@redeboer redeboer marked this pull request as ready for review October 8, 2024 14:25
src/qrules/particle.py Outdated Show resolved Hide resolved
@redeboer redeboer marked this pull request as draft October 8, 2024 14:28
@redeboer redeboer changed the title Change the Spin class to have magnitude & projection as Fractions ENH: use Fraction for spin values Oct 8, 2024
@redeboer
Copy link
Member

redeboer commented Oct 8, 2024

@grayson-helmholz grayson-helmholz marked this pull request as ready for review November 18, 2024 13:37
@grayson-helmholz grayson-helmholz marked this pull request as draft November 18, 2024 14:09
src/qrules/combinatorics.py Outdated Show resolved Hide resolved
src/qrules/io/_dot.py Outdated Show resolved Hide resolved
docs/conf.py Outdated Show resolved Hide resolved
src/qrules/__init__.py Outdated Show resolved Hide resolved
src/qrules/combinatorics.py Show resolved Hide resolved
tests/unit/test_settings.py Outdated Show resolved Hide resolved
tests/unit/test_particle.py Outdated Show resolved Hide resolved
tests/unit/test_particle.py Outdated Show resolved Hide resolved
src/qrules/settings.py Outdated Show resolved Hide resolved
src/qrules/particle.py Outdated Show resolved Hide resolved
Copy link
Member

@redeboer redeboer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! 🎅

@grayson-helmholz grayson-helmholz merged commit 9d74b21 into main Dec 6, 2024
16 checks passed
@grayson-helmholz grayson-helmholz deleted the spin_as_fraction branch December 6, 2024 14:18
@redeboer redeboer added this to the 0.11.0 milestone Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ Enhancement Improvements and optimizations of existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write spin magnitude and projection as Fraction
2 participants