proxygen-cli 2.1.17__tar.gz → 2.1.19__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.17 → proxygen_cli-2.1.19}/PKG-INFO +3 -2
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/README.md +2 -2
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/cli/command_main.py +1 -5
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/test/command_main_test.py +13 -3
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/pyproject.toml +1 -2
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/__init__.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/cli/command_credentials.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/cli/command_docker.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/cli/command_instance.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/cli/command_pytest_nhsd_apim_token.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/cli/command_secret.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/cli/command_settings.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/cli/command_spec.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/lib/auth.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/lib/constants.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/lib/credentials.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/lib/dot_proxygen.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/lib/output.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/lib/proxygen_api.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/lib/settings.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/lib/spec.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/lib/spec_server.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/lib/version.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/test/__init__.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/test/command_credentials_test.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/test/command_instance_test.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/test/command_pytest_nhsd_apim_token_test.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/test/command_secret_test.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/test/command_settings_test.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/test/command_spec_test.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/test/conftest.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/test/fixtures/client.key +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/test/fixtures/client.pem +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/test/fixtures/secret.txt +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/proxygen_cli/test/mock_private_key.py +0 -0
- {proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/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.19
|
|
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
|
|
@@ -33,7 +33,7 @@ Installation is straightforward using pip:
|
|
|
33
33
|
```
|
|
34
34
|
pip install proxygen-cli
|
|
35
35
|
```
|
|
36
|
-
After installation, the `proxygen` executable is available. Typing `proxygen` displays a list of available commands.
|
|
36
|
+
After installation, the `proxygen` executable is available. Typing `proxygen` displays a list of available commands. The `proxygen --version` command will show the version of the CLI installed.
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
## Configuration
|
|
@@ -133,3 +133,4 @@ Use the following command to obtain the pytest-nhsd-apim token:
|
|
|
133
133
|
```
|
|
134
134
|
$(proxygen pytest_nhsd_apim get_token)
|
|
135
135
|
```
|
|
136
|
+
|
|
@@ -6,7 +6,7 @@ Installation is straightforward using pip:
|
|
|
6
6
|
```
|
|
7
7
|
pip install proxygen-cli
|
|
8
8
|
```
|
|
9
|
-
After installation, the `proxygen` executable is available. Typing `proxygen` displays a list of available commands.
|
|
9
|
+
After installation, the `proxygen` executable is available. Typing `proxygen` displays a list of available commands. The `proxygen --version` command will show the version of the CLI installed.
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
## Configuration
|
|
@@ -105,4 +105,4 @@ When testing using the pytest-nhsd-apim python testing package, an apigee manage
|
|
|
105
105
|
Use the following command to obtain the pytest-nhsd-apim token:
|
|
106
106
|
```
|
|
107
107
|
$(proxygen pytest_nhsd_apim get_token)
|
|
108
|
-
```
|
|
108
|
+
```
|
|
@@ -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.19"
|
|
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"
|
|
@@ -23,7 +23,6 @@ yaspin = "^2.2.0"
|
|
|
23
23
|
tabulate = "^0.9.0"
|
|
24
24
|
packaging = "^24.2"
|
|
25
25
|
|
|
26
|
-
|
|
27
26
|
[tool.poetry.group.dev.dependencies]
|
|
28
27
|
pytest = "^7.2.1"
|
|
29
28
|
pytest-cov = "^4.0.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{proxygen_cli-2.1.17 → proxygen_cli-2.1.19}/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.17 → proxygen_cli-2.1.19}/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
|