aboutsummaryrefslogtreecommitdiffstats
path: root/snips_inference_agl/cli/versions.py
diff options
context:
space:
mode:
Diffstat (limited to 'snips_inference_agl/cli/versions.py')
-rw-r--r--snips_inference_agl/cli/versions.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/snips_inference_agl/cli/versions.py b/snips_inference_agl/cli/versions.py
new file mode 100644
index 0000000..d7922ef
--- /dev/null
+++ b/snips_inference_agl/cli/versions.py
@@ -0,0 +1,19 @@
+from __future__ import print_function
+
+
+def add_version_parser(subparsers, formatter_class):
+ from snips_inference_agl.__about__ import __version__
+ subparser = subparsers.add_parser(
+ "version", formatter_class=formatter_class,
+ help="Print the package version")
+ subparser.set_defaults(func=lambda _: print(__version__))
+ return subparser
+
+
+def add_model_version_parser(subparsers, formatter_class):
+ from snips_inference_agl.__about__ import __model_version__
+ subparser = subparsers.add_parser(
+ "model-version", formatter_class=formatter_class,
+ help="Print the model version")
+ subparser.set_defaults(func=lambda _: print(__model_version__))
+ return subparser