-
Notifications
You must be signed in to change notification settings - Fork 192
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
Add util function get_strict_version #1686
Conversation
Note that this also fixes the duplication of the |
The utility function `aiida.get_strict_version` will return a StrictVersion instance from `distutils.version` with the current version of the package.
713d31d
to
f453a9a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking forward to verdi --version
Let's wait for approval of either @DropD and @giovannipizzi as well to be sure |
Codecov Report
@@ Coverage Diff @@
## develop #1686 +/- ##
========================================
Coverage 57.14% 57.14%
========================================
Files 275 275
Lines 33931 33931
========================================
Hits 19390 19390
Misses 14541 14541 Continue to review full report at Codecov.
|
aiida/__init__.py
Outdated
@@ -8,13 +8,14 @@ | |||
# For further information please visit http://www.aiida.net # | |||
########################################################################### | |||
import warnings | |||
from distutils.version import StrictVersion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to have StrictVersion available at the aiida
level?
Personally I prefer to hide it, so put it into the function.
But if you instead it's ok, I'm ok with a merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that is a good point, I will move it in
The utility function `aiida.get_strict_version` will return a StrictVersion instance from `distutils.version` with the current version of the package.
Fixes #1685
The utility function
aiida.get_strict_version
will return a StrictVersioninstance from
distutils.version
with the current version of the package.