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

Add util function get_strict_version #1686

Merged
merged 2 commits into from
Jun 27, 2018
Merged

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented Jun 26, 2018

Fixes #1685

The utility function aiida.get_strict_version will return a StrictVersion
instance from distutils.version with the current version of the package.

@sphuber
Copy link
Contributor Author

sphuber commented Jun 26, 2018

Note that this also fixes the duplication of the __version__ definition in aiida.__init__.py (thanks @espenfl ).

The utility function `aiida.get_strict_version` will return a StrictVersion
instance from `distutils.version` with the current version of the package.
@sphuber sphuber force-pushed the fix_1685_strict_version branch from 713d31d to f453a9a Compare June 26, 2018 16:54
ltalirz
ltalirz previously approved these changes Jun 26, 2018
Copy link
Member

@ltalirz ltalirz left a 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

@sphuber
Copy link
Contributor Author

sphuber commented Jun 26, 2018

Let's wait for approval of either @DropD and @giovannipizzi as well to be sure

@codecov-io
Copy link

codecov-io commented Jun 26, 2018

Codecov Report

Merging #1686 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b6e6880...32c1cbb. Read the comment docs.

@@ -8,13 +8,14 @@
# For further information please visit http://www.aiida.net #
###########################################################################
import warnings
from distutils.version import StrictVersion
Copy link
Member

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.

Copy link
Contributor Author

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

@sphuber sphuber merged commit 090c6f9 into develop Jun 27, 2018
@sphuber sphuber deleted the fix_1685_strict_version branch June 27, 2018 13:05
ltalirz pushed a commit to ltalirz/aiida-core that referenced this pull request Oct 23, 2018
The utility function `aiida.get_strict_version` will return a StrictVersion
instance from `distutils.version` with the current version of the package.
giovannipizzi pushed a commit that referenced this pull request Oct 23, 2018
The utility function `aiida.get_strict_version` will return a StrictVersion
instance from `distutils.version` with the current version of the package.
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 this pull request may close these issues.

4 participants