/
info.py
37 lines (27 loc) · 926 Bytes
/
info.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
"""display sourmash version and other information"""
import os
import screed
import sourmash
from sourmash.logging import notify
from sourmash.plugins import list_all_plugins
def subparser(subparsers):
subparser = subparsers.add_parser("info")
subparser.add_argument(
"-v",
"--verbose",
action="store_true",
help="report versions of khmer and screed",
)
def info(verbose=False):
"Report sourmash version + version of installed dependencies."
notify(f"sourmash version {sourmash.VERSION}")
notify(f"- loaded from path: {os.path.dirname(__file__)}")
notify("")
if verbose:
notify("khmer version: None (internal Nodegraph)")
notify("")
notify(f"screed version {screed.__version__}")
notify(f"- loaded from path: {os.path.dirname(screed.__file__)}")
list_all_plugins()
def main(args):
info(verbose=args.verbose)