Skip to content

Commit

Permalink
Bugfix/jwhite242/versioninfo (#419)
Browse files Browse the repository at this point in the history
Switch to importlib to get version for maestro's cli from pyproject.toml and remove old out of sync version source
  • Loading branch information
jwhite242 authored May 10, 2023
1 parent 78cc329 commit f5fcad5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
9 changes: 7 additions & 2 deletions maestrowf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@
import logging
import sys

try:
from importlib.metadata import version
except ImportError as imp_err:
# Remove this try/except upon deprecation of python 3.7
from importlib_metadata import version

from rich import box
from rich.console import Console
from rich.table import Table
Expand All @@ -63,8 +69,7 @@ def emit(self, record):
LOGGER = logging.getLogger(__name__)
LOGGER.addHandler(NullHandler())

__version_info__ = ("1", "1", "9dev1")
__version__ = '.'.join(__version_info__)
__version__ = version(__package__)


@six.add_metaclass(ABCMeta)
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ python = ">=3.7.1,<4.0"
coloredlogs = "*"
dill = "*"
filelock = "*"
importlib_metadata = {version = "*", python = "<3.8"}
jsonschema = ">=3.2.0"
pyyaml = ">=4.2b1"
rich = "*"
Expand Down

0 comments on commit f5fcad5

Please sign in to comment.