propka3 --version prints version

Closes https://github.com/jensengroup/propka/issues/89
This commit is contained in:
Thomas Holder
2020-12-06 20:36:58 +01:00
committed by Oliver Beckstein
parent 3937cb1467
commit 578b57694f
2 changed files with 5 additions and 5 deletions

View File

@@ -62,10 +62,9 @@ protein-ligand complexes based in the 3D structure. The
specifying mutation labels which is used to modify specifying mutation labels which is used to modify
<filename> according to, e.g. N25R/N181D (default: None) <filename> according to, e.g. N25R/N181D (default: None)
.. option:: -v VERSION_LABEL, --version VERSION_LABEL .. option:: --version
specifying the sub-version of propka [Jan15/Dec19] show program's version number and exit
(default: Jan15)
.. option:: -p PARAMETERS, --parameters PARAMETERS .. option:: -p PARAMETERS, --parameters PARAMETERS

View File

@@ -198,6 +198,8 @@ def build_parser(parser=None):
Argument `--generate-propka-input` has been removed as writing PROPKA Argument `--generate-propka-input` has been removed as writing PROPKA
input files is no longer supported. input files is no longer supported.
""" """
import propka
if parser is not None: if parser is not None:
group = parser.add_argument_group(title="PROPKA invocation options") group = parser.add_argument_group(title="PROPKA invocation options")
else: else:
@@ -241,8 +243,7 @@ def build_parser(parser=None):
help=("specifying mutation labels which is used to modify " help=("specifying mutation labels which is used to modify "
"<filename> according to, e.g. N25R/N181D")) "<filename> according to, e.g. N25R/N181D"))
group.add_argument( group.add_argument(
"-v", "--version", dest="version_label", default="Jan15", "--version", action="version", version=f"%(prog)s {propka.__version__}")
help="specifying the sub-version of propka [Jan15/Dec19]")
group.add_argument( group.add_argument(
"-p", "--parameters", dest="parameters", "-p", "--parameters", dest="parameters",
default=pkg_resources.resource_filename(__name__, "propka.cfg"), default=pkg_resources.resource_filename(__name__, "propka.cfg"),