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

Implement AsdfVersion type #279

Closed
drdavella opened this issue Jul 14, 2017 · 0 comments · Fixed by #284
Closed

Implement AsdfVersion type #279

drdavella opened this issue Jul 14, 2017 · 0 comments · Fixed by #284

Comments

@drdavella
Copy link
Contributor

Currently versions can be represented as either tuples or strings:

version = (1, 0, 0)
version = '1.1.0'

However, this causes issues when performing version comparisons, so generally all versions need to be converted to one format or the other. Instead, it might be helpful to have an AsdfVersion class that allows for transparent comparisons of all different version formats:

version = AsdfVersion('1.0.0')
assert version == AsdfVersion((1,0,0))
assert version == AsdfVersion(1,0,0)
assert version == '1.0.0'
assert version == (1,0,0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant