From 4f54de00ce81b736edacfa8e35f51b5973507f3e Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Thu, 19 Aug 2021 02:42:29 -0400 Subject: [PATCH] add `dp --version` (#995) --- deepmd/entrypoints/main.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/deepmd/entrypoints/main.py b/deepmd/entrypoints/main.py index 52e4e1c61e..5789cfe47b 100644 --- a/deepmd/entrypoints/main.py +++ b/deepmd/entrypoints/main.py @@ -5,6 +5,7 @@ from pathlib import Path from typing import Dict, List, Optional +from deepmd import __version__ from deepmd.entrypoints import ( compress, config, @@ -395,6 +396,8 @@ def parse_args(args: Optional[List[str]] = None): type=str, help='the output model', ) + # --version + parser.add_argument('--version', action='version', version='DeePMD-kit v%s' % __version__) parsed_args = parser.parse_args(args=args) if parsed_args.command is None: