vantage6 4.7.1__py3-none-any.whl → 4.8.0__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.

vantage6/cli/_version.py CHANGED
@@ -7,7 +7,7 @@ with open(os.path.join(here, "__build__")) as fp:
7
7
  __build__ = json.load(fp)
8
8
 
9
9
  # Module version
10
- version_info = (4, 7, 1, "final", __build__, 0)
10
+ version_info = (4, 8, 0, "final", __build__, 0)
11
11
 
12
12
  # Module version stage suffix map
13
13
  _specifier_ = {"alpha": "a", "beta": "b", "candidate": "rc", "final": ""}
@@ -3,7 +3,13 @@ import questionary as q
3
3
  from pathlib import Path
4
4
 
5
5
  from vantage6.common import generate_apikey
6
- from vantage6.common.globals import DATABASE_TYPES, InstanceType, NodePolicy, Ports
6
+ from vantage6.common.globals import (
7
+ DATABASE_TYPES,
8
+ InstanceType,
9
+ NodePolicy,
10
+ Ports,
11
+ DEFAULT_API_PATH,
12
+ )
7
13
  from vantage6.common.client.node_client import NodeClient
8
14
  from vantage6.common.context import AppContext
9
15
  from vantage6.common import error, warning, info
@@ -105,7 +111,7 @@ def node_configuration_questionaire(dirs: dict, instance_name: str) -> dict:
105
111
  ).ask()
106
112
 
107
113
  is_policies = q.confirm(
108
- "Do you want to add limit the algorithms allowed to run on your node? This "
114
+ "Do you want to limit the algorithms allowed to run on your node? This "
109
115
  "should always be done for production scenarios.",
110
116
  default=True,
111
117
  ).ask()
@@ -269,9 +275,7 @@ def _get_allowed_algorithm_stores() -> list[str]:
269
275
  return allowed_algorithm_stores
270
276
 
271
277
 
272
- def _get_common_server_config(
273
- instance_type: InstanceType, instance_name: str, include_api_path: bool = True
274
- ) -> dict:
278
+ def _get_common_server_config(instance_type: InstanceType, instance_name: str) -> dict:
275
279
  """
276
280
  Part of the questionaire that is common to all server types (vantage6
277
281
  server and algorithm store server).
@@ -282,8 +286,6 @@ def _get_common_server_config(
282
286
  Type of server instance.
283
287
  instance_name : str
284
288
  Name of the server instance.
285
- include_api_path : bool
286
- Whether to include the api path in the questionaire.
287
289
 
288
290
  Returns
289
291
  -------
@@ -312,21 +314,6 @@ def _get_common_server_config(
312
314
  ]
313
315
  )
314
316
 
315
- # TODO v5+ remove api_path. It complicates configuration
316
- if include_api_path:
317
- config.update(
318
- q.prompt(
319
- [
320
- {
321
- "type": "text",
322
- "name": "api_path",
323
- "message": "Path of the api:",
324
- "default": "/api",
325
- }
326
- ]
327
- )
328
- )
329
-
330
317
  config.update(
331
318
  q.prompt(
332
319
  [
@@ -369,6 +356,8 @@ def _get_common_server_config(
369
356
  ],
370
357
  }
371
358
 
359
+ config["api_path"] = DEFAULT_API_PATH
360
+
372
361
  return config
373
362
 
374
363
 
@@ -387,9 +376,7 @@ def server_configuration_questionaire(instance_name: str) -> dict:
387
376
  Dictionary with the new server configuration
388
377
  """
389
378
 
390
- config = _get_common_server_config(
391
- InstanceType.SERVER, instance_name, include_api_path=True
392
- )
379
+ config = _get_common_server_config(InstanceType.SERVER, instance_name)
393
380
 
394
381
  constant_jwt_secret = q.confirm("Do you want a constant JWT secret?").ask()
395
382
  if constant_jwt_secret:
@@ -498,9 +485,7 @@ def algo_store_configuration_questionaire(instance_name: str) -> dict:
498
485
  dict
499
486
  Dictionary with the new server configuration
500
487
  """
501
- config = _get_common_server_config(
502
- InstanceType.ALGORITHM_STORE, instance_name, include_api_path=False
503
- )
488
+ config = _get_common_server_config(InstanceType.ALGORITHM_STORE, instance_name)
504
489
 
505
490
  default_v6_server_uri = f"http://localhost:{Ports.DEV_SERVER.value}/api"
506
491
  default_root_username = "root"
@@ -266,6 +266,7 @@ def create_vserver_config(
266
266
  port: int,
267
267
  server_url: str,
268
268
  extra_config_file: Path,
269
+ ui_image: str | None,
269
270
  ui_port: int,
270
271
  store_port: int,
271
272
  ) -> Path:
@@ -281,6 +282,9 @@ def create_vserver_config(
281
282
  Url of the server this
282
283
  extra_config_file : Path
283
284
  Path to file with additional server configuration.
285
+ ui_image : str | None
286
+ UI docker image to specify in configuration files. Will be used on startup of
287
+ the network.
284
288
  ui_port : int
285
289
  Port to run the UI on.
286
290
  store_port : int
@@ -299,6 +303,10 @@ def create_vserver_config(
299
303
  )
300
304
 
301
305
  extra_config = _read_extra_config_file(extra_config_file)
306
+ if ui_image is not None:
307
+ if extra_config:
308
+ extra_config += "\n"
309
+ extra_config += f"images:\n ui: {ui_image}"
302
310
 
303
311
  template = environment.get_template("server_config.j2")
304
312
  server_config = template.render(
@@ -409,6 +417,7 @@ def demo_network(
409
417
  extra_server_config: Path,
410
418
  extra_node_config: Path,
411
419
  extra_store_config: Path,
420
+ ui_image: str,
412
421
  ui_port: int,
413
422
  algorithm_store_port: int,
414
423
  ) -> tuple[list[dict], Path, Path]:
@@ -430,6 +439,9 @@ def demo_network(
430
439
  Path to file with additional node configuration.
431
440
  extra_store_config : Path
432
441
  Path to file with additional algorithm store configuration.
442
+ ui_image : str | None
443
+ UI docker image to specify in configuration files. Will be used on startup of
444
+ the network.
433
445
  ui_port : int
434
446
  Port to run the UI on.
435
447
  algorithm_store_port : int
@@ -449,6 +461,7 @@ def demo_network(
449
461
  server_port,
450
462
  server_url,
451
463
  extra_server_config,
464
+ ui_image,
452
465
  ui_port,
453
466
  algorithm_store_port,
454
467
  )
@@ -504,6 +517,13 @@ def demo_network(
504
517
  help="Server docker image to use when setting up resources for "
505
518
  "the development server",
506
519
  )
520
+ @click.option(
521
+ "--ui-image",
522
+ type=str,
523
+ default=None,
524
+ help="UI docker image to specify in configuration files. Will be used on startup of"
525
+ " the network",
526
+ )
507
527
  @click.option(
508
528
  "--extra-server-config",
509
529
  type=click.Path(exists=True),
@@ -536,6 +556,7 @@ def create_demo_network(
536
556
  ui_port: int,
537
557
  algorithm_store_port: int,
538
558
  image: str = None,
559
+ ui_image: str = None,
539
560
  extra_server_config: Path = None,
540
561
  extra_node_config: Path = None,
541
562
  extra_store_config: Path = None,
@@ -557,6 +578,7 @@ def create_demo_network(
557
578
  extra_server_config,
558
579
  extra_node_config,
559
580
  extra_store_config,
581
+ ui_image,
560
582
  ui_port,
561
583
  algorithm_store_port,
562
584
  )
vantage6/cli/dev/start.py CHANGED
@@ -8,6 +8,7 @@ from vantage6.cli.context.algorithm_store import AlgorithmStoreContext
8
8
  from vantage6.cli.context.node import NodeContext
9
9
  from vantage6.cli.server.start import cli_server_start
10
10
  from vantage6.cli.dev.utils import get_dev_server_context
11
+ from vantage6.common.globals import DEFAULT_API_PATH
11
12
 
12
13
 
13
14
  @click.command()
@@ -96,7 +97,8 @@ def start_demo_network(
96
97
  client.authenticate(USERNAME, PASSWORD)
97
98
  existing_stores = client.store.list().get("data", [])
98
99
  existing_urls = [store["url"] for store in existing_stores]
99
- local_store_url = f"http://localhost:{store_ctx.config['port']}"
100
+ api_path = store_ctx.config.get("api_path", DEFAULT_API_PATH)
101
+ local_store_url = f"http://localhost:{store_ctx.config['port']}{api_path}"
100
102
  if not local_store_url in existing_urls:
101
103
  client.store.create(
102
104
  algorithm_store_url=local_store_url,
vantage6/cli/globals.py CHANGED
@@ -40,7 +40,7 @@ ALGORITHM_TEMPLATE_REPO = "gh:vantage6/v6-algorithm-template.git"
40
40
  DIAGNOSTICS_IMAGE = "harbor2.vantage6.ai/algorithms/diagnostic"
41
41
 
42
42
  # Address of community algorithm store
43
- COMMUNITY_STORE = "https://store.cotopaxi.vantage6.ai"
43
+ COMMUNITY_STORE = "https://store.cotopaxi.vantage6.ai/api"
44
44
 
45
45
 
46
46
  class ServerType(str, Enum):
@@ -87,7 +87,7 @@ class RabbitMQManager:
87
87
  volumes=volumes,
88
88
  ports=ports,
89
89
  detach=True,
90
- restart_policy={"Name": "always"},
90
+ restart_policy={"Name": "unless-stopped"},
91
91
  hostname=self.host,
92
92
  labels={
93
93
  f"{APPNAME}-type": "rabbitmq",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: vantage6
3
- Version: 4.7.1
3
+ Version: 4.8.0
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==1.4.46
19
- Requires-Dist: vantage6-common==4.7.1
20
- Requires-Dist: vantage6-client==4.7.1
19
+ Requires-Dist: vantage6-common==4.8.0
20
+ Requires-Dist: vantage6-client==4.8.0
21
21
  Provides-Extra: dev
22
22
  Requires-Dist: coverage==6.4.4; extra == "dev"
23
23
  Requires-Dist: black; extra == "dev"
@@ -40,6 +40,8 @@ Requires-Dist: pre-commit; extra == "dev"
40
40
  [![Codacy Badge](https://app.codacy.com/project/badge/Grade/2e60ac3b3f284620805f7399cba317be)](https://app.codacy.com/gh/vantage6/vantage6/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
41
41
  [![DOI](https://zenodo.org/badge/492818831.svg)](https://zenodo.org/badge/latestdoi/492818831)
42
42
  [![Discord](https://img.shields.io/discord/643526403207331841)](https://discord.gg/yAyFf6Y)
43
+ [![Research software directory](https://img.shields.io/badge/rsd-vantage6-deepskyblue)](https://research-software-directory.org/software/vantage6)
44
+
43
45
 
44
46
  </h3>
45
47
 
@@ -5,11 +5,11 @@ tests_cli/test_server_cli.py,sha256=61et2WpcVAr4SAsQTLJEeBy1RnewujMvFgFW6N_i7kg,
5
5
  tests_cli/test_wizard.py,sha256=eoa0WQ9yw7IjtaeAKzbK8-sOCBGow7gLrhhmUx024p8,4881
6
6
  vantage6/cli/__build__,sha256=X-zrZv_IbzjZUnhsbWlsecLbwjndTpG0ZynXOif7V-k,1
7
7
  vantage6/cli/__init__.py,sha256=-Ec-Z7ELDveGdSALXda3qdUGpkuKyJQfhN3eIm7koHE,127
8
- vantage6/cli/_version.py,sha256=aiDAnJ4bDnuUTbADE8SxVNtiEIb05bHjrZZYfII5eTY,696
8
+ vantage6/cli/_version.py,sha256=8xKecq261CBLwA7BtdniKWHbRoprZaHHOxz-dowlQbg,696
9
9
  vantage6/cli/cli.py,sha256=AecGqgdDI_IaAbedeRN9F8E3hvSpqfbG9Ot7LiAfBTs,6074
10
10
  vantage6/cli/configuration_manager.py,sha256=cN4tQpQjLG5GaGrsjEP-5ed_LqvPApIkNkM1J6ai3n0,3588
11
- vantage6/cli/configuration_wizard.py,sha256=_8KNvHaige6zsqu_9Oh9C9NsOogZb5fk2ofOhIN44Wc,20977
12
- vantage6/cli/globals.py,sha256=KSnXnQK7jidAe6E0j2CsL5myDskQzHqWFsCgi-0oXTs,1612
11
+ vantage6/cli/configuration_wizard.py,sha256=sgXKC_bZvZUtOlEQCVA_oe23aUiYHs0ITtHTD7ITcq8,20440
12
+ vantage6/cli/globals.py,sha256=8AWI55FBbumVQTuI1bJzKp5hiRWtiwsVgTTKqWgRBes,1616
13
13
  vantage6/cli/utils.py,sha256=8_PZeihjopYXQU10gMwIKr87yDAq-_z2LKi0BcdhNEc,2365
14
14
  vantage6/cli/algorithm/create.py,sha256=2Ks0JnWNldsn9Eg2h_lqn-yIMaJ-OYs-B3cv58tCiIs,1628
15
15
  vantage6/cli/algorithm/update.py,sha256=qN1YzUK5oiBvDepQOvUGpSVxf_eGaD1DRjh522ythE8,1224
@@ -28,9 +28,9 @@ vantage6/cli/context/algorithm_store.py,sha256=NsmrgDCTJ10KqQ209Q1sq-hBhuU_4LRqf
28
28
  vantage6/cli/context/base_server.py,sha256=paKSzNrKWD-J6eakHAtGELk2cD05A8NqoCAuQfF7c2s,2972
29
29
  vantage6/cli/context/node.py,sha256=lfaPlb8llgOR-fUG8VFebzh0IEynROyFN1HAg6p9gI0,7438
30
30
  vantage6/cli/context/server.py,sha256=vBGJWNsJoVcIryX5OLiWnFklNRcjOVkhqm2U5tqW5b0,3946
31
- vantage6/cli/dev/create.py,sha256=yimdQJge7W3Nxai2XVzY-aJJlg00gKIpJNHh_-DOcWQ,18409
31
+ vantage6/cli/dev/create.py,sha256=3QFZPtxgOu_lSO_zumaAWJhVpohFR_H4J2mIldUW1pk,19102
32
32
  vantage6/cli/dev/remove.py,sha256=1ZX5L3bqTsRUt8PkXUvH7tgSLR32viZ5Ve_Q1k-sQ5M,3055
33
- vantage6/cli/dev/start.py,sha256=-rkM6lcEq4Z-8woukHJrAHstpG4hb8Yzx2_C-g7j_sU,4318
33
+ vantage6/cli/dev/start.py,sha256=XrBnRxkGUM371ZBs3JQRqlONB2Lo-s2uTqblv4H3tXg,4447
34
34
  vantage6/cli/dev/stop.py,sha256=gPy87r8T3nqe7RFJjlYE9Bns8N3RiPPcdzNIFCoqGRY,1430
35
35
  vantage6/cli/dev/utils.py,sha256=DOTwPVXKZWhJfto9FG7EFgMhMaFJHXuhLDSlBCUCR1o,888
36
36
  vantage6/cli/dev/data/olympic_athletes_2016.csv,sha256=WGycwcwMKEyOyJc3aEo4EhrnBJiTSE0kZAr50j2qzGk,77699
@@ -48,7 +48,7 @@ vantage6/cli/node/version.py,sha256=eYJ4ayQsEsHPL00V88UY1LhmlnQCzF-Te4lrw4SFbHQ,
48
48
  vantage6/cli/node/common/__init__.py,sha256=pketeJOFViQIPpa9nCNe-q_6Mb55BJ2R2k_2jMQOeX4,2862
49
49
  vantage6/cli/rabbitmq/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
50
  vantage6/cli/rabbitmq/definitions.py,sha256=CcS9jG7ZGB6LjzHQqZ2FliDurPItUvNSjHrOYptORZg,637
51
- vantage6/cli/rabbitmq/queue_manager.py,sha256=xYx6zeGLKuNH8uba47xMUikzpgy9FrZJ6gQkIPCLNk8,7537
51
+ vantage6/cli/rabbitmq/queue_manager.py,sha256=KGDGHy4NBN8O9xhjzfI7mh65i9lOQIqQwrOFqvGFdHI,7545
52
52
  vantage6/cli/rabbitmq/rabbitmq.config,sha256=LYAQAEoXaF472XeJDYXc9JfWSETIzPRIR2W-JB2i7fU,136
53
53
  vantage6/cli/server/attach.py,sha256=ov5wJ0veZLKQTam-gBka5lDxcrmHscFZgHV1qFQkXZw,2003
54
54
  vantage6/cli/server/files.py,sha256=LJhFyYHcEnCgFhVAM-lX6_EnfhMJ7YPdN21kVIpmwkc,507
@@ -68,8 +68,8 @@ vantage6/cli/template/server_import_config.j2,sha256=9WT2XeG9-ADoYLb4ahXhof3i9Fc
68
68
  vantage6/cli/test/feature_tester.py,sha256=rdxRvDelVuOceXvbZh5dRc5Pdw4bVNiotj0m__RWN5Q,2563
69
69
  vantage6/cli/test/integration_test.py,sha256=yQVG72XKDNH_eOPTsf3pb65FCBwJzMxn5VNfUGemJBM,3808
70
70
  vantage6/cli/test/common/diagnostic_runner.py,sha256=x_4ikihgoSTKI914pqlgVziBSg5LpV6MheO6O_GBCeA,6657
71
- vantage6-4.7.1.dist-info/METADATA,sha256=2QIi0dIPi0spThX8SGc0CvQQXuAw6itrVjZMwe_NkSc,10319
72
- vantage6-4.7.1.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
73
- vantage6-4.7.1.dist-info/entry_points.txt,sha256=YFBvwjxoeAGxYyPC-YevEgOBBYRGaXkS6jiOGGCLNy0,157
74
- vantage6-4.7.1.dist-info/top_level.txt,sha256=CYDIBS8jEfFq5YCs_Fuit54K9-3wdosZppTrsymIoUk,19
75
- vantage6-4.7.1.dist-info/RECORD,,
71
+ vantage6-4.8.0.dist-info/METADATA,sha256=G1TnSaEgicYYWfuS5u_Plp8T2mdjF5OhusVCDm9dtjU,10467
72
+ vantage6-4.8.0.dist-info/WHEEL,sha256=bFJAMchF8aTQGUgMZzHJyDDMPTO3ToJ7x23SLJa1SVo,92
73
+ vantage6-4.8.0.dist-info/entry_points.txt,sha256=YFBvwjxoeAGxYyPC-YevEgOBBYRGaXkS6jiOGGCLNy0,157
74
+ vantage6-4.8.0.dist-info/top_level.txt,sha256=CYDIBS8jEfFq5YCs_Fuit54K9-3wdosZppTrsymIoUk,19
75
+ vantage6-4.8.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.44.0)
2
+ Generator: bdist_wheel (0.45.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5