Skip to content

Commit

Permalink
Addition of version information to package and command line (#205)
Browse files Browse the repository at this point in the history
* Addition of version information.

* Tweak to have setup.py pull from __version__

* Addition of command line arg to print version.
  • Loading branch information
Francesco Di Natale authored Dec 3, 2019
1 parent 4eb5671 commit 40009ee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions maestrowf/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ def emit(self, record):

LOGGER = logging.getLogger(__name__)
LOGGER.addHandler(NullHandler())

__version_info__ = ("1", "1", "5dev")
__version__ = '.'.join(__version_info__)
3 changes: 3 additions & 0 deletions maestrowf/maestro.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import tabulate
import time

from maestrowf import __version__
from maestrowf.conductor import monitor_study
from maestrowf.datastructures import YAMLSpecification
from maestrowf.datastructures.core import Study
Expand Down Expand Up @@ -392,6 +393,8 @@ def setup_argparser():
parser.add_argument(
"-c", "--logstdout", action="store_true", default=True,
help="Log to stdout in addition to a file. [Default: %(default)s]")
parser.add_argument(
"-v", "--version", action="version", version='%(prog)s ' + __version__)

return parser

Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from maestrowf import __version__
from setuptools import setup, find_packages

setup(name='maestrowf',
description='A tool and library for specifying and conducting general '
'workflows.',
version='1.1.5dev',
version=__version__,
author='Francesco Di Natale',
author_email='[email protected]',
url='https://github.com/llnl/maestrowf',
Expand Down

0 comments on commit 40009ee

Please sign in to comment.