Electrostatics / pdb2pqr

PDB2PQR - determining titration states, adding missing atoms, and assigning charges/radii to biomolecules.
http://www.poissonboltzmann.org/
Other
127 stars 34 forks source link

Using '--version' flag on command line shows "3.4.0" instead of the version installed #217

Closed Eo300 closed 3 years ago

Eo300 commented 3 years ago

When using the CLI, querying for the version number using the flag --version returns the following:

$ pdb2pqr30 --version
pdb2pqr30 3.4.0

However, the correct version does get displayed within the text returned from the --help flag.

At the time of writing this, this issue appears within versions 3.1.0, 3.2.0, and the master branch

Eo300 commented 3 years ago

On further inspection, looks like this flag is being set via the PROPKA argument parser, as we don't set the flag ourselves: https://github.com/Electrostatics/pdb2pqr/blob/7e28bb8ef048f2b86bb4229ecd52e1668808f747/pdb2pqr/main.py#L223-L224

As such, it's being set for us here: https://github.com/jensengroup/propka/blob/68007f065c5400566598509875344ed1c0f593c9/propka/lib.py#L245-L246

group.add_argument("--version", action="version", version=f"%(prog)s {propka.__version__}")