Skip to content

Commit 324d9b5

Browse files
author
Alexander Ororbia
committed
minor edit to ngcsimlib central init to support dunder method that returns software version
1 parent 9d372b5 commit 324d9b5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

ngcsimlib/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66
from ngcsimlib._src.configManager import get_config, provide_namespace
77
import argparse, os, json
88

9+
import pkg_resources
10+
from pkg_resources import get_distribution
11+
12+
__version__ = get_distribution('ngcsimlib').version
13+
914
def configure():
1015
parser = argparse.ArgumentParser(description='Build and run a model using ngclearn')
1116
parser.add_argument("--config", type=str, help='location of config.json file')
@@ -27,4 +32,4 @@ def configure():
2732
# "additional information")
2833
return
2934

30-
init_config(config_path)
35+
init_config(config_path)

0 commit comments

Comments
 (0)