Skip to content

♻️ Rational config versions #429

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

Merged
merged 2 commits into from
Apr 18, 2025
Merged

♻️ Rational config versions #429

merged 2 commits into from
Apr 18, 2025

Conversation

nevans
Copy link
Collaborator

@nevans nevans commented Apr 17, 2025

Updates Config.version_defaults to use Rational internally, with aliases for Float.

Adds a default_proc to Config.version_defaults to enable more flexible lookups. For example, we can now use something like Config["0.4.11"] (I do not intend to store version defaults for x.y.z releases). I had to add a special-case for zero, to avoid Config["missing"] == Config[0r]

Fixes #428.

Using Rational internally, with aliases for Float and Integer versions.

Fixes #428.
This enables more flexible lookups.  So we can now use something like
`Config["0.4.11"]` (I do _not_ intend to store version defaults for
`x.y.z` releases).  I had to add a special-case for zero, to avoid
`Config["missing"] == Config[0r]`
@nevans nevans force-pushed the rational-config-versions branch from d0e4af7 to c7732e6 Compare April 17, 2025 21:56
@nevans nevans merged commit d839268 into master Apr 18, 2025
37 checks passed
@nevans nevans deleted the rational-config-versions branch April 18, 2025 00:48
nevans added a commit that referenced this pull request Apr 18, 2025
…ig-version

♻️ Rational config version (backport #429 to v0.4)
@nevans nevans added the enhancement New feature or request label Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't use floating point math to calculate version numbers (or floats at all)
1 participant