vantage6 5.0.0a18__py3-none-any.whl → 5.0.0a19__py3-none-any.whl
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.
Potentially problematic release.
This version of vantage6 might be problematic. Click here for more details.
- tests_cli/test_wizard.py +3 -2
- vantage6/cli/__build__ +1 -1
- vantage6/cli/configuration_wizard.py +9 -3
- vantage6/cli/dev/create.py +0 -1
- vantage6/cli/node/common/__init__.py +2 -28
- vantage6/cli/node/create_private_key.py +2 -10
- vantage6/cli/template/server_config.j2 +0 -1
- vantage6/cli/test/feature_tester.py +1 -22
- {vantage6-5.0.0a18.dist-info → vantage6-5.0.0a19.dist-info}/METADATA +8 -9
- {vantage6-5.0.0a18.dist-info → vantage6-5.0.0a19.dist-info}/RECORD +13 -13
- {vantage6-5.0.0a18.dist-info → vantage6-5.0.0a19.dist-info}/WHEEL +0 -0
- {vantage6-5.0.0a18.dist-info → vantage6-5.0.0a19.dist-info}/entry_points.txt +0 -0
- {vantage6-5.0.0a18.dist-info → vantage6-5.0.0a19.dist-info}/top_level.txt +0 -0
tests_cli/test_wizard.py
CHANGED
|
@@ -29,8 +29,10 @@ class WizardTest(unittest.TestCase):
|
|
|
29
29
|
result[name] = None
|
|
30
30
|
return result
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
@patch("vantage6.cli.configuration_wizard.NodeClient.authenticate")
|
|
33
|
+
def test_node_wizard(self, authenticate):
|
|
33
34
|
"""An error is printed when docker is not running"""
|
|
35
|
+
authenticate.return_value = None
|
|
34
36
|
|
|
35
37
|
with patch(f"{module_path}.q") as q:
|
|
36
38
|
q.unsafe_prompt.side_effect = self.prompts
|
|
@@ -99,7 +101,6 @@ class WizardTest(unittest.TestCase):
|
|
|
99
101
|
"api_path",
|
|
100
102
|
"uri",
|
|
101
103
|
"allow_drop_all",
|
|
102
|
-
"jwt_secret_key",
|
|
103
104
|
"logging",
|
|
104
105
|
"vpn_server",
|
|
105
106
|
"rabbitmq",
|
vantage6/cli/__build__
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
19
|
|
@@ -168,9 +168,15 @@ def node_configuration_questionaire(dirs: dict, instance_name: str) -> dict:
|
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
# Check if we can login to the server to retrieve collaboration settings
|
|
171
|
-
client = NodeClient(
|
|
171
|
+
client = NodeClient(
|
|
172
|
+
instance_name,
|
|
173
|
+
config["api_key"],
|
|
174
|
+
config["server_url"],
|
|
175
|
+
config["port"],
|
|
176
|
+
config["api_path"],
|
|
177
|
+
)
|
|
172
178
|
try:
|
|
173
|
-
client.authenticate(
|
|
179
|
+
client.authenticate()
|
|
174
180
|
except Exception as e:
|
|
175
181
|
error(f"Could not authenticate with server: {e}")
|
|
176
182
|
error("Please check (1) your API key and (2) if your server is online")
|
|
@@ -494,7 +500,7 @@ def algo_store_configuration_questionaire(instance_name: str) -> dict:
|
|
|
494
500
|
default_v6_server_uri = (
|
|
495
501
|
f"http://localhost:{Ports.DEV_SERVER.value}{DEFAULT_API_PATH}"
|
|
496
502
|
)
|
|
497
|
-
default_root_username = "
|
|
503
|
+
default_root_username = "admin"
|
|
498
504
|
|
|
499
505
|
v6_server_uri = q.text(
|
|
500
506
|
"What is the Vantage6 server linked to the algorithm store? "
|
vantage6/cli/dev/create.py
CHANGED
|
@@ -38,9 +38,7 @@ def create_client(ctx: NodeContext) -> UserClient:
|
|
|
38
38
|
return UserClient(host, port, api_path, log_level="warn")
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
def create_client_and_authenticate(
|
|
42
|
-
ctx: NodeContext, ask_mfa: bool = False
|
|
43
|
-
) -> UserClient:
|
|
41
|
+
def create_client_and_authenticate(ctx: NodeContext) -> UserClient:
|
|
44
42
|
"""
|
|
45
43
|
Generate a client and authenticate with the server.
|
|
46
44
|
|
|
@@ -48,8 +46,6 @@ def create_client_and_authenticate(
|
|
|
48
46
|
----------
|
|
49
47
|
ctx : NodeContext
|
|
50
48
|
Context of the node loaded from the configuration file
|
|
51
|
-
ask_mfa : bool, optional
|
|
52
|
-
Whether to ask for MFA code, by default False
|
|
53
49
|
|
|
54
50
|
Returns
|
|
55
51
|
-------
|
|
@@ -59,14 +55,7 @@ def create_client_and_authenticate(
|
|
|
59
55
|
client = create_client(ctx)
|
|
60
56
|
|
|
61
57
|
try:
|
|
62
|
-
|
|
63
|
-
except KeyboardInterrupt:
|
|
64
|
-
error("Authentication aborted.")
|
|
65
|
-
exit(1)
|
|
66
|
-
|
|
67
|
-
try:
|
|
68
|
-
client.authenticate(username, password, mfa_code=mfa_code)
|
|
69
|
-
|
|
58
|
+
client.authenticate()
|
|
70
59
|
except Exception as exc:
|
|
71
60
|
error("Could not authenticate with server!")
|
|
72
61
|
debug(exc)
|
|
@@ -75,21 +64,6 @@ def create_client_and_authenticate(
|
|
|
75
64
|
return client
|
|
76
65
|
|
|
77
66
|
|
|
78
|
-
def _get_auth_data() -> tuple[str, str, str]:
|
|
79
|
-
"""
|
|
80
|
-
Get authentication data from the user.
|
|
81
|
-
|
|
82
|
-
Returns
|
|
83
|
-
-------
|
|
84
|
-
tuple[str, str, str]
|
|
85
|
-
Tuple containing username, password and MFA code
|
|
86
|
-
"""
|
|
87
|
-
username = q.text("Username:").unsafe_ask()
|
|
88
|
-
password = q.password("Password:").unsafe_ask()
|
|
89
|
-
mfa_code = q.text("MFA code:").unsafe_ask()
|
|
90
|
-
return username, password, mfa_code
|
|
91
|
-
|
|
92
|
-
|
|
93
67
|
def select_node(name: str, system_folders: bool) -> tuple[str, str]:
|
|
94
68
|
"""
|
|
95
69
|
Let user select node through questionnaire if name is not given.
|
|
@@ -59,21 +59,13 @@ from vantage6.cli.node.common import select_node, create_client_and_authenticate
|
|
|
59
59
|
default=False,
|
|
60
60
|
help="Overwrite existing private key if present",
|
|
61
61
|
)
|
|
62
|
-
@click.option(
|
|
63
|
-
"--mfa",
|
|
64
|
-
"ask_mfa",
|
|
65
|
-
flag_value=True,
|
|
66
|
-
default=False,
|
|
67
|
-
help="Ask for multi-factor authentication code. Use this if MFA is enabled on the server.",
|
|
68
|
-
)
|
|
69
62
|
def cli_node_create_private_key(
|
|
70
63
|
name: str,
|
|
71
64
|
config: str,
|
|
72
65
|
system_folders: bool,
|
|
73
66
|
upload: bool,
|
|
74
|
-
organization_name: str,
|
|
67
|
+
organization_name: str | None,
|
|
75
68
|
overwrite: bool,
|
|
76
|
-
ask_mfa: bool,
|
|
77
69
|
) -> None:
|
|
78
70
|
"""
|
|
79
71
|
Create and upload a new private key
|
|
@@ -97,7 +89,7 @@ def cli_node_create_private_key(
|
|
|
97
89
|
# Authenticate with the server to obtain organization name if it wasn't
|
|
98
90
|
# provided
|
|
99
91
|
if organization_name is None:
|
|
100
|
-
client = create_client_and_authenticate(ctx
|
|
92
|
+
client = create_client_and_authenticate(ctx)
|
|
101
93
|
organization_name = client.whoami.organization_name
|
|
102
94
|
|
|
103
95
|
# create directory where private key goes if it doesn't exist yet
|
|
@@ -13,18 +13,6 @@ from vantage6.cli.test.common.diagnostic_runner import DiagnosticRunner
|
|
|
13
13
|
"--port", type=int, default=Ports.DEV_SERVER.value, help="Port of the server"
|
|
14
14
|
)
|
|
15
15
|
@click.option("--api-path", type=str, default="/api", help="API path of the server")
|
|
16
|
-
@click.option(
|
|
17
|
-
"--username",
|
|
18
|
-
type=str,
|
|
19
|
-
default="dev_admin",
|
|
20
|
-
help="Username of vantage6 user account to create the task with",
|
|
21
|
-
)
|
|
22
|
-
@click.option(
|
|
23
|
-
"--password",
|
|
24
|
-
type=str,
|
|
25
|
-
default="password",
|
|
26
|
-
help="Password of vantage6 user account to create the task with",
|
|
27
|
-
)
|
|
28
16
|
@click.option(
|
|
29
17
|
"--collaboration",
|
|
30
18
|
type=int,
|
|
@@ -56,25 +44,16 @@ from vantage6.cli.test.common.diagnostic_runner import DiagnosticRunner
|
|
|
56
44
|
default=None,
|
|
57
45
|
help="Path to the private key for end-to-end encryption",
|
|
58
46
|
)
|
|
59
|
-
@click.option(
|
|
60
|
-
"--mfa-code",
|
|
61
|
-
type=str,
|
|
62
|
-
help="Multi-factor authentication code. Use this if MFA is enabled on the "
|
|
63
|
-
"server.",
|
|
64
|
-
)
|
|
65
47
|
def cli_test_features(
|
|
66
48
|
host: str,
|
|
67
49
|
port: int,
|
|
68
50
|
api_path: str,
|
|
69
|
-
username: str,
|
|
70
|
-
password: str,
|
|
71
51
|
collaboration: int,
|
|
72
52
|
organizations: list[int] | None,
|
|
73
53
|
all_nodes: bool,
|
|
74
54
|
online_only: bool,
|
|
75
55
|
no_vpn: bool,
|
|
76
56
|
private_key: str | None,
|
|
77
|
-
mfa_code: str | None,
|
|
78
57
|
) -> list[dict]:
|
|
79
58
|
"""
|
|
80
59
|
Run diagnostic checks on an existing vantage6 network.
|
|
@@ -90,7 +69,7 @@ def cli_test_features(
|
|
|
90
69
|
organizations = None
|
|
91
70
|
|
|
92
71
|
client = UserClient(host=host, port=port, path=api_path, log_level="critical")
|
|
93
|
-
client.authenticate(
|
|
72
|
+
client.authenticate()
|
|
94
73
|
client.setup_encryption(private_key)
|
|
95
74
|
diagnose = DiagnosticRunner(client, collaboration, organizations, online_only)
|
|
96
75
|
res = diagnose(base=True, vpn=not no_vpn)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: vantage6
|
|
3
|
-
Version: 5.0.
|
|
3
|
+
Version: 5.0.0a19
|
|
4
4
|
Summary: vantage6 command line interface
|
|
5
5
|
Home-page: https://github.com/vantage6/vantage6
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -16,8 +16,8 @@ Requires-Dist: questionary==1.10.0
|
|
|
16
16
|
Requires-Dist: rich==13.5.2
|
|
17
17
|
Requires-Dist: schema==0.7.5
|
|
18
18
|
Requires-Dist: sqlalchemy==2.0.37
|
|
19
|
-
Requires-Dist: vantage6-common==5.0.
|
|
20
|
-
Requires-Dist: vantage6-client==5.0.
|
|
19
|
+
Requires-Dist: vantage6-common==5.0.0a19
|
|
20
|
+
Requires-Dist: vantage6-client==5.0.0a19
|
|
21
21
|
Provides-Extra: dev
|
|
22
22
|
Requires-Dist: coverage==6.4.4; extra == "dev"
|
|
23
23
|
Requires-Dist: black; extra == "dev"
|
|
@@ -42,7 +42,6 @@ Requires-Dist: pre-commit; extra == "dev"
|
|
|
42
42
|
[](https://discord.gg/yAyFf6Y)
|
|
43
43
|
[](https://research-software-directory.org/software/vantage6)
|
|
44
44
|
|
|
45
|
-
|
|
46
45
|
</h3>
|
|
47
46
|
|
|
48
47
|
<p align="center">
|
|
@@ -130,7 +129,7 @@ For example, you can create a new organization by running:
|
|
|
130
129
|
from vantage6.client import Client
|
|
131
130
|
|
|
132
131
|
client = Client('http://127.0.0.1', 7601, '/api', log_level='debug')
|
|
133
|
-
client.authenticate(
|
|
132
|
+
client.authenticate()
|
|
134
133
|
client.setup_encryption(None)
|
|
135
134
|
|
|
136
135
|
client.organization.create(
|
|
@@ -195,10 +194,10 @@ And finally there are some images released for algorithm development:
|
|
|
195
194
|
|
|
196
195
|
## :gift_heart: Join the community!
|
|
197
196
|
|
|
198
|
-
We hope to continue developing, improving, and supporting **vantage6** with the help of
|
|
199
|
-
the federated learning community. If you are interested in contributing, first of all,
|
|
200
|
-
thank you! Second, please take a look at our
|
|
201
|
-
[contributing guidelines](https://docs.vantage6.ai/en/main/devops/contribute.html)
|
|
197
|
+
We hope to continue developing, improving, and supporting **vantage6** with the help of
|
|
198
|
+
the federated learning community. If you are interested in contributing, first of all,
|
|
199
|
+
thank you! Second, please take a look at our
|
|
200
|
+
[contributing guidelines](https://docs.vantage6.ai/en/main/devops/contribute.html)
|
|
202
201
|
and our [code of conduct](CODE_OF_CONDUCT.md).
|
|
203
202
|
|
|
204
203
|
<a href="https://github.com/vantage6/vantage6/graphs/contributors">
|
|
@@ -2,13 +2,13 @@ tests_cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
2
2
|
tests_cli/test_example.py,sha256=0fw_v-lgZEacshWSDwLNyLMA1_xc48bKUGM3ll-n1L0,146
|
|
3
3
|
tests_cli/test_node_cli.py,sha256=ajFdG1sTa9H7PjqK2dhcp3k59HGsJyO6ZoRfxgIUHcA,16842
|
|
4
4
|
tests_cli/test_server_cli.py,sha256=Yv6k0mkqElrpPgFtro_OH2Bjixz7mDXioxhvXr9VsAQ,6550
|
|
5
|
-
tests_cli/test_wizard.py,sha256=
|
|
6
|
-
vantage6/cli/__build__,sha256=
|
|
5
|
+
tests_cli/test_wizard.py,sha256=D0bIMqYJ8vgl4_hTQOH5Tb8JAFt1bIfPzU9zNSvYf8o,5009
|
|
6
|
+
vantage6/cli/__build__,sha256=lADxshy1J9f6PT6rupNVehjr56LKTkcc_l5MW0yn92c,2
|
|
7
7
|
vantage6/cli/__init__.py,sha256=ZXbeQ_-g2-M4XYteWZkoO5lMFYhqjm5doQgGy1fq8i0,125
|
|
8
8
|
vantage6/cli/_version.py,sha256=iDijqhgy5jzZ0LAyzW1LlXeeuMcHWMyg9D8xbXtV7Ck,696
|
|
9
9
|
vantage6/cli/cli.py,sha256=B0F328FSBBslwplMPk8lIlr0r-taKuCgb8v9DIdyE3Q,5699
|
|
10
10
|
vantage6/cli/configuration_manager.py,sha256=CHGyYkHT8sIaEZjRrmWuiiDPfFdpFEbpl-yV5jG7OgM,3563
|
|
11
|
-
vantage6/cli/configuration_wizard.py,sha256=
|
|
11
|
+
vantage6/cli/configuration_wizard.py,sha256=XyR1Pa0pjYuO90D9F5KmBGV1Yb9PQl27Cdk67uzUmLE,20939
|
|
12
12
|
vantage6/cli/globals.py,sha256=ZmZHYG5Zm38L5eBSNXUaEznmL9bZHOU6F86aYAExq0I,1732
|
|
13
13
|
vantage6/cli/utils.py,sha256=Jfr6IeHMQDk_wU5X7rJ1dRY118dhVVX8PwzwMYMv9Vw,2481
|
|
14
14
|
vantage6/cli/algorithm/create.py,sha256=kRT1BlBcb0fDaB2Q988WxtA6EyAZmOW5QoU2uhbwBIo,2075
|
|
@@ -28,11 +28,11 @@ vantage6/cli/context/algorithm_store.py,sha256=RimxNcoqfWeu2WQede6wsOu1rx-azzXIP
|
|
|
28
28
|
vantage6/cli/context/base_server.py,sha256=paKSzNrKWD-J6eakHAtGELk2cD05A8NqoCAuQfF7c2s,2972
|
|
29
29
|
vantage6/cli/context/node.py,sha256=vEmlWtx7V0e5yqRp9Yi-FhIzSDd4LgnXPVXKYn2n048,7370
|
|
30
30
|
vantage6/cli/context/server.py,sha256=vBGJWNsJoVcIryX5OLiWnFklNRcjOVkhqm2U5tqW5b0,3946
|
|
31
|
-
vantage6/cli/dev/create.py,sha256=
|
|
31
|
+
vantage6/cli/dev/create.py,sha256=yjG3y2phQw-yIiR2AIy1BpUG3oPVa-b0t7oeqCe1prA,19305
|
|
32
32
|
vantage6/cli/dev/remove.py,sha256=R_OU_LXLDCnoD-2xnegg4lh0B3t8EgpqzDqueLx16io,3730
|
|
33
33
|
vantage6/cli/node/attach.py,sha256=cmouPrkbIbg21_wlAe-L-ecmrKVxiDkzGmEtRaCnKQY,276
|
|
34
34
|
vantage6/cli/node/clean.py,sha256=uCty2GNuwoTybs1nIOygQLxtbleQ-rnnS6_4ieWVmCw,1199
|
|
35
|
-
vantage6/cli/node/create_private_key.py,sha256=
|
|
35
|
+
vantage6/cli/node/create_private_key.py,sha256=iGLK8x1aOmeObq-vZxlveosiqx1R0myfjU64R5lR0ho,5005
|
|
36
36
|
vantage6/cli/node/files.py,sha256=V7bJeR8weX0Llpp6y9wQoNrRsvlotEE6e70aTJp9j6M,1331
|
|
37
37
|
vantage6/cli/node/list.py,sha256=_WZ8EBIEUlzFhVp3cR2MK5FUuQicMEZHhD8npMwKSpM,1664
|
|
38
38
|
vantage6/cli/node/new.py,sha256=wuv8mdL4sLV91TJMIksU8dx2LlcUFrA1oORyiICruMw,2039
|
|
@@ -42,7 +42,7 @@ vantage6/cli/node/set_api_key.py,sha256=2kB8wveTy9_N8kX4huVhJhY86Ppd2BI8v-d7MRXQ
|
|
|
42
42
|
vantage6/cli/node/start.py,sha256=mV4vDBBtFcxva4MJdg5ymsstefDM4bV4pmhSsVX1o4k,12407
|
|
43
43
|
vantage6/cli/node/stop.py,sha256=Hf5z2r6ttbW-DeU0cdHNXIJcgL-eIVRv8i7zZLo4foY,4159
|
|
44
44
|
vantage6/cli/node/version.py,sha256=X921xyIvIPYObPac2Si5msZ2tay5ySidnPWmGj1ilZw,1959
|
|
45
|
-
vantage6/cli/node/common/__init__.py,sha256=
|
|
45
|
+
vantage6/cli/node/common/__init__.py,sha256=sAjXbmiSlRxA7rbW9aV2AxfxKsMb4Nr5R2sFqAtmnxQ,2762
|
|
46
46
|
vantage6/cli/rabbitmq/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
47
47
|
vantage6/cli/rabbitmq/definitions.py,sha256=CcS9jG7ZGB6LjzHQqZ2FliDurPItUvNSjHrOYptORZg,637
|
|
48
48
|
vantage6/cli/rabbitmq/queue_manager.py,sha256=KGDGHy4NBN8O9xhjzfI7mh65i9lOQIqQwrOFqvGFdHI,7545
|
|
@@ -60,13 +60,13 @@ vantage6/cli/server/version.py,sha256=aXAztHEky_F2jPbfPdHPfsAY7rdTurl0_3S6bL94_Q
|
|
|
60
60
|
vantage6/cli/server/common/__init__.py,sha256=htv0mFYa4GhIHdzA2xqUUgKhHcMh09UQERlIjIgrwOM,2062
|
|
61
61
|
vantage6/cli/template/algo_store_config.j2,sha256=XR-ly-47p6egH8lVh4lZZDh3YSV4kFnkZprdsfSkS2Y,552
|
|
62
62
|
vantage6/cli/template/node_config.j2,sha256=EyVKeyW0qAyvdUNSXTHUzPKRNunAMyn-cDTKiSyTbDc,730
|
|
63
|
-
vantage6/cli/template/server_config.j2,sha256=
|
|
63
|
+
vantage6/cli/template/server_config.j2,sha256=K7svQM6HTmMrlKPVW9cbNPloH7LicBoLdIEiarD6CP8,765
|
|
64
64
|
vantage6/cli/template/server_import_config.j2,sha256=9WT2XeG9-ADoYLb4ahXhof3i9Fcvg0oqwNPyFwLJpvc,1827
|
|
65
|
-
vantage6/cli/test/feature_tester.py,sha256=
|
|
65
|
+
vantage6/cli/test/feature_tester.py,sha256=AGXhq2VDgYFRHfgy2dLmEtt7BPzrSccodVZhIBE8AtY,2211
|
|
66
66
|
vantage6/cli/test/integration_test.py,sha256=MctR_t-WEyxzFpMdc6ByTcX1BQglZiT5-CIOQXTBBWo,4034
|
|
67
67
|
vantage6/cli/test/common/diagnostic_runner.py,sha256=F8vEaCD6HeKWDcQGVzRkPYxdvEk9owqfciOVdN3bHbw,6607
|
|
68
|
-
vantage6-5.0.
|
|
69
|
-
vantage6-5.0.
|
|
70
|
-
vantage6-5.0.
|
|
71
|
-
vantage6-5.0.
|
|
72
|
-
vantage6-5.0.
|
|
68
|
+
vantage6-5.0.0a19.dist-info/METADATA,sha256=uBTY7_jM6Jr-dX_eUtJrUpneLioXfsTrWaPKI-MWpe8,10859
|
|
69
|
+
vantage6-5.0.0a19.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
70
|
+
vantage6-5.0.0a19.dist-info/entry_points.txt,sha256=YFBvwjxoeAGxYyPC-YevEgOBBYRGaXkS6jiOGGCLNy0,157
|
|
71
|
+
vantage6-5.0.0a19.dist-info/top_level.txt,sha256=CYDIBS8jEfFq5YCs_Fuit54K9-3wdosZppTrsymIoUk,19
|
|
72
|
+
vantage6-5.0.0a19.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|