Skip to content

Commit b788a13

Browse files
committed
add version parameter to usage
1 parent 848ca4d commit b788a13

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

bakrep/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = '1.0.0'

bakrep/cli.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import argparse
22
import sys
33

4+
import bakrep
45
import bakrep.download
56

67

@@ -15,7 +16,11 @@ def main(argv):
1516
parser = argparse.ArgumentParser(
1617
add_help=True,
1718
prog='bakrep',
18-
description='A tool to download bakrep datasets')
19+
description='A CLI tool to download BakRep datasets',
20+
epilog=f'Version: {bakrep.__version__}\nDOI: 10.1099\nmgen.0.001305\nURL: https://bakrep.computational.bio/about',
21+
formatter_class=argparse.RawDescriptionHelpFormatter
22+
)
23+
parser.add_argument('--version', action='version', version=f'%(prog)s {bakrep.__version__}')
1924

2025
sub_parsers = parser.add_subparsers(title="actions", required=True, )
2126
download_parser = sub_parsers.add_parser('download')

0 commit comments

Comments
 (0)