Skip to content
This repository has been archived by the owner on Jul 18, 2022. It is now read-only.

Commit

Permalink
Update version string
Browse files Browse the repository at this point in the history
  • Loading branch information
kdheepak committed Dec 14, 2021
1 parent 2397093 commit cc8a97f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions helics_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,20 @@ def _get_version():
try:
import helics_apps as ha

helics_apps_version = "HELICS Apps version {}\n\nIf your `helics` and `helics-apps` versions don't match, you may want to run `pip install helics helics-apps --upgrade`.".format(
ha.__version__
)
helics_apps_version = "HELICS Apps version {}".format(ha.__version__)

except ImportError:
helics_apps_version = "Python `helics-apps` package not installed. Install using `pip install helics-apps --upgrade`."

try:
import helics as h
import helics_apps as ha

if not h.helicsGetVersion().startswith(ha.__version__.strip("v")):
echo("`helics` and `helics-apps` versions don't match. You may want to run `pip install helics helics-apps --upgrade`.", status="error")
except ImportError:
pass

return """{}
{}
Expand Down

0 comments on commit cc8a97f

Please sign in to comment.