Commit 0c774729 authored by Stefan Mauerberger's avatar Stefan Mauerberger
Browse files

Adds --version

parent 05284332
......@@ -29,6 +29,7 @@ import argparse
from . import commands
from .pymagglobal import models
from pymagglobal import __version__
class ListModelsAction(argparse.Action):
......@@ -62,6 +63,8 @@ def main():
f'commands above has its own --help, so use e.g. '
f'master --help to get information on how to create a '
f'master curve')
parser.add_argument('--version', action='version',
version=f'pymagglobal {__version__}')
parser.add_argument('--list-models', help='list available models and exit',
action=ListModelsAction)
# parser for arguments that are shared between all commands
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment