-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move version functions from utils to __version__ module
Also stop using AugurException in node file parsing. It doesn't add any information over RuntimeError.
- Loading branch information
Showing
4 changed files
with
41 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,23 @@ | ||
__version__ = '9.0.0' | ||
|
||
|
||
def is_augur_version_compatible(version): | ||
""" | ||
Checks if the provided **version** is the same major version | ||
as the currently running version of augur. | ||
Parameters | ||
---------- | ||
version : str | ||
version to check against the current version | ||
Returns | ||
------- | ||
Bool | ||
""" | ||
import packaging.version | ||
|
||
current_version = packaging.version.parse(__version__) | ||
this_version = packaging.version.parse(version) | ||
return this_version.release[0] == current_version.release[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters