From 324d9b5e4b4ae1217e0cd3f0ee09dc7be881ec4b Mon Sep 17 00:00:00 2001 From: Alexander Ororbia Date: Fri, 5 Dec 2025 19:12:44 -0500 Subject: [PATCH] minor edit to ngcsimlib central init to support dunder method that returns software version --- ngcsimlib/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ngcsimlib/__init__.py b/ngcsimlib/__init__.py index 964089f..104de81 100644 --- a/ngcsimlib/__init__.py +++ b/ngcsimlib/__init__.py @@ -6,6 +6,11 @@ from ngcsimlib._src.configManager import get_config, provide_namespace import argparse, os, json +import pkg_resources +from pkg_resources import get_distribution + +__version__ = get_distribution('ngcsimlib').version + def configure(): parser = argparse.ArgumentParser(description='Build and run a model using ngclearn') parser.add_argument("--config", type=str, help='location of config.json file') @@ -27,4 +32,4 @@ def configure(): # "additional information") return - init_config(config_path) \ No newline at end of file + init_config(config_path)