File tree Expand file tree Collapse file tree 3 files changed +7
-11
lines changed
Expand file tree Collapse file tree 3 files changed +7
-11
lines changed Original file line number Diff line number Diff line change 1- from packaging .version import parse
2-
31from proxygen_cli .lib import proxygen_api
42from proxygen_cli import __version__ as proxygen_cli_version
53
6-
74def validate_cli_version ():
85 status = proxygen_api .status ()
9- required_cli_version = parse ( status ["proxygen_cli" ]["min_version" ])
10- current_cli_version = parse ( proxygen_cli_version )
11- if current_cli_version < required_cli_version :
12- raise RuntimeError (f"This version proxygen-cli is out-of-date. Please update to { required_cli_version } " )
6+ required = tuple ( int ( x ) for x in status ["proxygen_cli" ]["min_version" ]. split ( "." ) )
7+ current = tuple ( int ( x ) for x in proxygen_cli_version . split ( "." ) )
8+ if current < required :
9+ raise RuntimeError (f"This version proxygen-cli is out-of-date. Please update to { status [ 'proxygen_cli' ][ 'min_version' ] } " )
Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " proxygen-cli"
3- version = " 3.0.0 "
3+ version = " 3.0.1 " # Versions must be x.y.z integers for version comparisons
44description = " CLI for interacting with NHSD APIM's proxygen service"
55authors = [" Ben Strutt <ben.strutt1@nhs.net>" ]
66readme = " README.md"
@@ -21,7 +21,6 @@ cryptography = "44.0.1"
2121pyyaml = " ^6.0.3"
2222yaspin = " ^3.2.0"
2323tabulate = " ^0.9.0"
24- packaging = " ^24.2"
2524cffi = " ^1.17.1"
2625
2726[tool .poetry .group .dev .dependencies ]
You can’t perform that action at this time.
0 commit comments