vantage6 5.0.0a17__tar.gz → 5.0.0a19__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.

Potentially problematic release.


This version of vantage6 might be problematic. Click here for more details.

Files changed (77) hide show
  1. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/PKG-INFO +6 -7
  2. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/tests_cli/test_wizard.py +3 -2
  3. vantage6-5.0.0a19/vantage6/cli/__build__ +1 -0
  4. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/configuration_wizard.py +9 -3
  5. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/dev/create.py +0 -1
  6. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/node/common/__init__.py +2 -28
  7. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/node/create_private_key.py +2 -10
  8. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/template/server_config.j2 +0 -1
  9. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/test/feature_tester.py +1 -22
  10. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6.egg-info/PKG-INFO +6 -7
  11. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6.egg-info/requires.txt +2 -2
  12. vantage6-5.0.0a17/vantage6/cli/__build__ +0 -1
  13. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/setup.cfg +0 -0
  14. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/setup.py +0 -0
  15. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/tests_cli/__init__.py +0 -0
  16. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/tests_cli/test_example.py +0 -0
  17. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/tests_cli/test_node_cli.py +0 -0
  18. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/tests_cli/test_server_cli.py +0 -0
  19. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/__init__.py +0 -0
  20. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/_version.py +0 -0
  21. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/algorithm/create.py +0 -0
  22. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/algorithm/update.py +0 -0
  23. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/algostore/attach.py +0 -0
  24. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/algostore/files.py +0 -0
  25. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/algostore/list.py +0 -0
  26. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/algostore/new.py +0 -0
  27. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/algostore/remove.py +0 -0
  28. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/algostore/start.py +0 -0
  29. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/algostore/stop.py +0 -0
  30. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/cli.py +0 -0
  31. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/common/decorator.py +0 -0
  32. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/common/start.py +0 -0
  33. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/common/utils.py +0 -0
  34. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/configuration_manager.py +0 -0
  35. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/context/__init__.py +0 -0
  36. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/context/algorithm_store.py +0 -0
  37. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/context/base_server.py +0 -0
  38. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/context/node.py +0 -0
  39. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/context/server.py +0 -0
  40. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/dev/remove.py +0 -0
  41. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/globals.py +0 -0
  42. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/node/attach.py +0 -0
  43. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/node/clean.py +0 -0
  44. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/node/files.py +0 -0
  45. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/node/list.py +0 -0
  46. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/node/new.py +0 -0
  47. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/node/remove.py +0 -0
  48. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/node/restart.py +0 -0
  49. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/node/set_api_key.py +0 -0
  50. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/node/start.py +0 -0
  51. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/node/stop.py +0 -0
  52. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/node/version.py +0 -0
  53. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/rabbitmq/__init__.py +0 -0
  54. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/rabbitmq/definitions.py +0 -0
  55. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/rabbitmq/queue_manager.py +0 -0
  56. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/rabbitmq/rabbitmq.config +0 -0
  57. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/server/attach.py +0 -0
  58. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/server/common/__init__.py +0 -0
  59. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/server/files.py +0 -0
  60. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/server/import_.py +0 -0
  61. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/server/list.py +0 -0
  62. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/server/new.py +0 -0
  63. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/server/remove.py +0 -0
  64. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/server/shell.py +0 -0
  65. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/server/start.py +0 -0
  66. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/server/stop.py +0 -0
  67. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/server/version.py +0 -0
  68. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/template/algo_store_config.j2 +0 -0
  69. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/template/node_config.j2 +0 -0
  70. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/template/server_import_config.j2 +0 -0
  71. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/test/common/diagnostic_runner.py +0 -0
  72. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/test/integration_test.py +0 -0
  73. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6/cli/utils.py +0 -0
  74. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6.egg-info/SOURCES.txt +0 -0
  75. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6.egg-info/dependency_links.txt +0 -0
  76. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6.egg-info/entry_points.txt +0 -0
  77. {vantage6-5.0.0a17 → vantage6-5.0.0a19}/vantage6.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vantage6
3
- Version: 5.0.0a17
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
@@ -26,7 +26,6 @@ Provides-Extra: dev
26
26
  [![Discord](https://img.shields.io/discord/643526403207331841)](https://discord.gg/yAyFf6Y)
27
27
  [![Research software directory](https://img.shields.io/badge/rsd-vantage6-deepskyblue)](https://research-software-directory.org/software/vantage6)
28
28
 
29
-
30
29
  </h3>
31
30
 
32
31
  <p align="center">
@@ -114,7 +113,7 @@ For example, you can create a new organization by running:
114
113
  from vantage6.client import Client
115
114
 
116
115
  client = Client('http://127.0.0.1', 7601, '/api', log_level='debug')
117
- client.authenticate('dev_admin', 'password')
116
+ client.authenticate()
118
117
  client.setup_encryption(None)
119
118
 
120
119
  client.organization.create(
@@ -179,10 +178,10 @@ And finally there are some images released for algorithm development:
179
178
 
180
179
  ## :gift_heart: Join the community!
181
180
 
182
- We hope to continue developing, improving, and supporting **vantage6** with the help of
183
- the federated learning community. If you are interested in contributing, first of all,
184
- thank you! Second, please take a look at our
185
- [contributing guidelines](https://docs.vantage6.ai/en/main/devops/contribute.html)
181
+ We hope to continue developing, improving, and supporting **vantage6** with the help of
182
+ the federated learning community. If you are interested in contributing, first of all,
183
+ thank you! Second, please take a look at our
184
+ [contributing guidelines](https://docs.vantage6.ai/en/main/devops/contribute.html)
186
185
  and our [code of conduct](CODE_OF_CONDUCT.md).
187
186
 
188
187
  <a href="https://github.com/vantage6/vantage6/graphs/contributors">
@@ -29,8 +29,10 @@ class WizardTest(unittest.TestCase):
29
29
  result[name] = None
30
30
  return result
31
31
 
32
- def test_node_wizard(self):
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",
@@ -0,0 +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(config["server_url"], config["port"], config["api_path"])
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(config["api_key"])
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 = "root"
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? "
@@ -314,7 +314,6 @@ def create_vserver_config(
314
314
  server_config = template.render(
315
315
  port=port,
316
316
  host_uri=server_url,
317
- jwt_secret_key=generate_apikey(),
318
317
  user_provided_config=extra_config,
319
318
  ui_port=ui_port,
320
319
  store_port=store_port,
@@ -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
- username, password, mfa_code = _get_auth_data()
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, ask_mfa)
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
@@ -25,7 +25,6 @@ logging:
25
25
  name: requests_oauthlib.oauth2_session
26
26
  port: {{ port }}
27
27
  uri: sqlite:///default.sqlite
28
- jwt_secret_key: {{ jwt_secret_key }}
29
28
  dev:
30
29
  host_uri: {{ host_uri }}
31
30
  server_url: http://localhost:{{ port }}/api
@@ -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(username=username, password=password, mfa_code=mfa_code)
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.0a17
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
@@ -26,7 +26,6 @@ Provides-Extra: dev
26
26
  [![Discord](https://img.shields.io/discord/643526403207331841)](https://discord.gg/yAyFf6Y)
27
27
  [![Research software directory](https://img.shields.io/badge/rsd-vantage6-deepskyblue)](https://research-software-directory.org/software/vantage6)
28
28
 
29
-
30
29
  </h3>
31
30
 
32
31
  <p align="center">
@@ -114,7 +113,7 @@ For example, you can create a new organization by running:
114
113
  from vantage6.client import Client
115
114
 
116
115
  client = Client('http://127.0.0.1', 7601, '/api', log_level='debug')
117
- client.authenticate('dev_admin', 'password')
116
+ client.authenticate()
118
117
  client.setup_encryption(None)
119
118
 
120
119
  client.organization.create(
@@ -179,10 +178,10 @@ And finally there are some images released for algorithm development:
179
178
 
180
179
  ## :gift_heart: Join the community!
181
180
 
182
- We hope to continue developing, improving, and supporting **vantage6** with the help of
183
- the federated learning community. If you are interested in contributing, first of all,
184
- thank you! Second, please take a look at our
185
- [contributing guidelines](https://docs.vantage6.ai/en/main/devops/contribute.html)
181
+ We hope to continue developing, improving, and supporting **vantage6** with the help of
182
+ the federated learning community. If you are interested in contributing, first of all,
183
+ thank you! Second, please take a look at our
184
+ [contributing guidelines](https://docs.vantage6.ai/en/main/devops/contribute.html)
186
185
  and our [code of conduct](CODE_OF_CONDUCT.md).
187
186
 
188
187
  <a href="https://github.com/vantage6/vantage6/graphs/contributors">
@@ -9,8 +9,8 @@ questionary==1.10.0
9
9
  rich==13.5.2
10
10
  schema==0.7.5
11
11
  sqlalchemy==2.0.37
12
- vantage6-common==5.0.0a17
13
- vantage6-client==5.0.0a17
12
+ vantage6-common==5.0.0a19
13
+ vantage6-client==5.0.0a19
14
14
 
15
15
  [dev]
16
16
  coverage==6.4.4
@@ -1 +0,0 @@
1
- 17
File without changes
File without changes