Support __version__ #175
-
>>> import mirgecom
>>> mirgecom.__version__
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'mirgecom' has no attribute '__version__'
# But:
>>> import numpy
>>> numpy.__version__
'1.19.4'
# And:
>>> from mirgecom import version
>>> version.VERSION_TEXT
'2020.1' |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
IMO: We should! In my packages, it's kind of hit-or-miss, often based on some bad practices that have become hard to change. :/ But in general Side question: What's the accepted practice for comparing string-y version numbers? I know distutils/setuptools has something... is that what you're supposed to use? (That's why I have |
Beta Was this translation helpful? Give feedback.
-
Oh! Did not realize that this was "Discussions". Can this be turned into an issue? |
Beta Was this translation helpful? Give feedback.
IMO: We should! In my packages, it's kind of hit-or-miss, often based on some bad practices that have become hard to change. :/ But in general
top_level_module.__version__
is the right place for a version number.Side question: What's the accepted practice for comparing string-y version numbers? I know distutils/setuptools has something... is that what you're supposed to use? (That's why I have
VERSION
in my packages as a tuple-y version number, so thatVERSION >= (2020, 4)
does something vaguely sensible.)