proxygen-cli 2.1.16__tar.gz → 2.1.18__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/PKG-INFO +2 -1
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/cli/command_main.py +1 -5
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/test/command_main_test.py +13 -3
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/pyproject.toml +2 -2
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/README.md +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/__init__.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/cli/command_credentials.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/cli/command_docker.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/cli/command_instance.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/cli/command_pytest_nhsd_apim_token.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/cli/command_secret.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/cli/command_settings.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/cli/command_spec.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/lib/auth.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/lib/constants.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/lib/credentials.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/lib/dot_proxygen.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/lib/output.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/lib/proxygen_api.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/lib/settings.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/lib/spec.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/lib/spec_server.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/lib/version.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/test/__init__.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/test/command_credentials_test.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/test/command_instance_test.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/test/command_pytest_nhsd_apim_token_test.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/test/command_secret_test.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/test/command_settings_test.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/test/command_spec_test.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/test/conftest.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/test/fixtures/client.key +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/test/fixtures/client.pem +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/test/fixtures/secret.txt +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/test/mock_private_key.py +0 -0
- {proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/test/validate_cli_version_test.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: proxygen-cli
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.18
|
|
4
4
|
Summary: CLI for interacting with NHSD APIM's proxygen service
|
|
5
5
|
Home-page: https://github.com/NHSDigital/proxygen-cli
|
|
6
6
|
Author: Ben Strutt
|
|
@@ -15,6 +15,7 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
15
15
|
Requires-Dist: click (>=8.1.3,<9.0.0)
|
|
16
16
|
Requires-Dist: cryptography (>=42,<44)
|
|
17
17
|
Requires-Dist: lxml (>=4.7.1,<5.0.0)
|
|
18
|
+
Requires-Dist: packaging (>=24.2,<25.0)
|
|
18
19
|
Requires-Dist: pydantic (>=1.9.1,<2.0.0)
|
|
19
20
|
Requires-Dist: pyjwt (>=2.3.0,<3.0.0)
|
|
20
21
|
Requires-Dist: pyyaml (>=6.0,<7.0)
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import click
|
|
2
2
|
from proxygen_cli.lib.settings import SETTINGS
|
|
3
|
-
|
|
4
3
|
from proxygen_cli.lib import proxygen_api, output
|
|
5
4
|
from proxygen_cli.cli import (
|
|
6
5
|
command_credentials,
|
|
@@ -12,12 +11,11 @@ from proxygen_cli.cli import (
|
|
|
12
11
|
command_pytest_nhsd_apim_token
|
|
13
12
|
)
|
|
14
13
|
|
|
15
|
-
|
|
16
14
|
@click.group()
|
|
15
|
+
@click.version_option(prog_name="proxygen") # Automatically adds version option
|
|
17
16
|
def main():
|
|
18
17
|
"""Main group"""
|
|
19
18
|
|
|
20
|
-
|
|
21
19
|
main.add_command(command_settings.settings)
|
|
22
20
|
main.add_command(command_credentials.credentials)
|
|
23
21
|
main.add_command(command_instance.instance)
|
|
@@ -26,7 +24,6 @@ main.add_command(command_secret.secret)
|
|
|
26
24
|
main.add_command(command_docker.docker)
|
|
27
25
|
main.add_command(command_pytest_nhsd_apim_token.pytest_nhsd_apim)
|
|
28
26
|
|
|
29
|
-
|
|
30
27
|
@main.command()
|
|
31
28
|
def status():
|
|
32
29
|
"""
|
|
@@ -37,6 +34,5 @@ def status():
|
|
|
37
34
|
{"proxygen_url": str(SETTINGS.endpoint_url), "response": status}
|
|
38
35
|
)
|
|
39
36
|
|
|
40
|
-
|
|
41
37
|
if __name__ == "__main__":
|
|
42
38
|
main()
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import json
|
|
2
2
|
from unittest.mock import patch
|
|
3
|
-
|
|
4
3
|
from click.testing import CliRunner
|
|
5
|
-
|
|
6
|
-
from proxygen_cli.cli.command_main import status
|
|
4
|
+
from proxygen_cli.cli.command_main import status, main # Import `main` for the version test
|
|
7
5
|
from proxygen_cli.lib.settings import Settings
|
|
8
6
|
from proxygen_cli.test.command_settings_test import get_test_settings
|
|
9
7
|
|
|
@@ -24,3 +22,15 @@ def test_proxygen_status(patch_config, patch_request):
|
|
|
24
22
|
"proxygen_url": "https://mock-proxygen.nhs.uk",
|
|
25
23
|
"response": {"mock_return": "value"},
|
|
26
24
|
}
|
|
25
|
+
|
|
26
|
+
def test_main_version():
|
|
27
|
+
runner = CliRunner()
|
|
28
|
+
result = runner.invoke(main, ['--version']) # Correctly invoke the main CLI group
|
|
29
|
+
assert result.exit_code == 0
|
|
30
|
+
version_output = result.output.strip() # Clean up the output by stripping whitespace
|
|
31
|
+
|
|
32
|
+
# Print the version output to the console
|
|
33
|
+
print(f"Version Output: {version_output}") # This will print the version during the test
|
|
34
|
+
|
|
35
|
+
# Assert that the output contains the version information automatically provided by Click
|
|
36
|
+
assert "proxygen, version" in version_output # This works as Click handles versioning
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "proxygen-cli"
|
|
3
|
-
version = "2.1.
|
|
3
|
+
version = "2.1.18"
|
|
4
4
|
description = "CLI for interacting with NHSD APIM's proxygen service"
|
|
5
5
|
authors = ["Ben Strutt <ben.strutt1@nhs.net>"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -21,7 +21,7 @@ cryptography = ">=42,<44"
|
|
|
21
21
|
pyyaml = "^6.0"
|
|
22
22
|
yaspin = "^2.2.0"
|
|
23
23
|
tabulate = "^0.9.0"
|
|
24
|
-
|
|
24
|
+
packaging = "^24.2"
|
|
25
25
|
|
|
26
26
|
[tool.poetry.group.dev.dependencies]
|
|
27
27
|
pytest = "^7.2.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/cli/command_pytest_nhsd_apim_token.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{proxygen_cli-2.1.16 → proxygen_cli-2.1.18}/proxygen_cli/test/command_pytest_nhsd_apim_token_test.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|