vantage6 5.0.0a34__py3-none-any.whl → 5.0.0a36__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.

Files changed (69) hide show
  1. vantage6/cli/algorithm/generate_algorithm_json.py +9 -9
  2. vantage6/cli/algorithm/update.py +1 -1
  3. vantage6/cli/algostore/attach.py +1 -0
  4. vantage6/cli/algostore/files.py +3 -2
  5. vantage6/cli/algostore/list.py +0 -3
  6. vantage6/cli/algostore/new.py +83 -2
  7. vantage6/cli/algostore/remove.py +18 -34
  8. vantage6/cli/algostore/start.py +10 -7
  9. vantage6/cli/algostore/stop.py +12 -50
  10. vantage6/cli/auth/attach.py +60 -0
  11. vantage6/cli/auth/files.py +16 -0
  12. vantage6/cli/auth/list.py +13 -0
  13. vantage6/cli/auth/new.py +80 -0
  14. vantage6/cli/auth/remove.py +31 -0
  15. vantage6/cli/auth/start.py +80 -0
  16. vantage6/cli/auth/stop.py +64 -0
  17. vantage6/cli/cli.py +67 -37
  18. vantage6/cli/common/new.py +28 -3
  19. vantage6/cli/common/remove.py +54 -0
  20. vantage6/cli/common/start.py +31 -2
  21. vantage6/cli/common/stop.py +79 -1
  22. vantage6/cli/common/utils.py +47 -4
  23. vantage6/cli/configuration_manager.py +57 -13
  24. vantage6/cli/configuration_wizard.py +18 -397
  25. vantage6/cli/context/__init__.py +3 -0
  26. vantage6/cli/context/auth.py +107 -0
  27. vantage6/cli/context/base_server.py +0 -4
  28. vantage6/cli/context/node.py +10 -17
  29. vantage6/cli/dev/clean.py +28 -0
  30. vantage6/cli/dev/common.py +34 -0
  31. vantage6/cli/dev/rebuild.py +39 -0
  32. vantage6/cli/dev/start.py +36 -0
  33. vantage6/cli/dev/stop.py +23 -0
  34. vantage6/cli/globals.py +24 -1
  35. vantage6/cli/node/attach.py +1 -0
  36. vantage6/cli/node/files.py +12 -25
  37. vantage6/cli/node/list.py +5 -4
  38. vantage6/cli/node/new.py +348 -28
  39. vantage6/cli/node/remove.py +14 -90
  40. vantage6/cli/node/restart.py +30 -51
  41. vantage6/cli/node/start.py +81 -304
  42. vantage6/cli/node/stop.py +36 -96
  43. vantage6/cli/node/version.py +5 -4
  44. vantage6/cli/prometheus/monitoring_manager.py +5 -3
  45. vantage6/cli/rabbitmq/queue_manager.py +13 -11
  46. vantage6/cli/server/attach.py +1 -0
  47. vantage6/cli/server/common/__init__.py +1 -27
  48. vantage6/cli/server/import_.py +1 -1
  49. vantage6/cli/server/new.py +83 -2
  50. vantage6/cli/server/remove.py +12 -33
  51. vantage6/cli/server/start.py +8 -6
  52. vantage6/cli/server/stop.py +10 -39
  53. vantage6/cli/template/algo_store_config.j2 +1 -1
  54. vantage6/cli/template/auth_config.j2 +230 -0
  55. vantage6/cli/template/node_config.j2 +336 -33
  56. vantage6/cli/template/node_config_nonk8s.j2 +33 -0
  57. vantage6/cli/test/common/diagnostic_runner.py +5 -3
  58. vantage6/cli/use/namespace.py +2 -1
  59. vantage6/cli/utils.py +0 -2
  60. {vantage6-5.0.0a34.dist-info → vantage6-5.0.0a36.dist-info}/METADATA +3 -3
  61. vantage6-5.0.0a36.dist-info/RECORD +86 -0
  62. vantage6/cli/dev/create.py +0 -693
  63. vantage6/cli/dev/data/km_dataset.csv +0 -2401
  64. vantage6/cli/dev/remove.py +0 -112
  65. vantage6/cli/node/clean.py +0 -46
  66. vantage6/cli/server/shell.py +0 -54
  67. vantage6-5.0.0a34.dist-info/RECORD +0 -75
  68. {vantage6-5.0.0a34.dist-info → vantage6-5.0.0a36.dist-info}/WHEEL +0 -0
  69. {vantage6-5.0.0a34.dist-info → vantage6-5.0.0a36.dist-info}/entry_points.txt +0 -0
@@ -1,112 +0,0 @@
1
- # import subprocess
2
- # import itertools
3
- # from shutil import rmtree
4
- # from pathlib import Path
5
-
6
- # import click
7
- # import docker
8
- # from colorama import Fore, Style
9
-
10
- # from vantage6.cli.context.algorithm_store import AlgorithmStoreContext
11
- # from vantage6.common import info, error
12
- # from vantage6.common.globals import APPNAME
13
- # from vantage6.cli.context.server import ServerContext
14
- # from vantage6.cli.context.node import NodeContext
15
- # from vantage6.cli.server.remove import cli_server_remove
16
- # from vantage6.cli.utils import remove_file
17
- # from vantage6.common.globals import InstanceType
18
-
19
- # # from vantage6.cli.dev.utils import get_dev_server_context
20
-
21
-
22
- # @click.command()
23
- # @click.option("-n", "--name", default=None, help="Name of the configuration.")
24
- # @click.option(
25
- # "-c",
26
- # "--config",
27
- # default=None,
28
- # help="Path to configuration-file; overrides --name",
29
- # )
30
- # @click.pass_context
31
- # def remove_demo_network(
32
- # click_ctx: click.Context, name: str | None, config: str | None
33
- # ) -> None:
34
- # """Remove all related demo network files and folders.
35
-
36
- # Select a server configuration to remove that server and the nodes attached
37
- # to it.
38
- # """
39
- # ctx = get_dev_server_context(config, name)
40
-
41
- # # check that the server is not running
42
- # client = docker.from_env()
43
- # running_servers = client.containers.list(
44
- # filters={"label": f"{APPNAME}-type={InstanceType.SERVER}"}
45
- # )
46
- # running_server_names = [server.name for server in running_servers]
47
- # container_name = f"{APPNAME}-{name}-user-{InstanceType.SERVER}"
48
- # if container_name in running_server_names:
49
- # error(
50
- # f"Server {Fore.RED}{name}{Style.RESET_ALL} is still running! First stop "
51
- # "the network with 'v6 dev stop-demo-network'."
52
- # )
53
- # return
54
-
55
- # # remove the server
56
- # for handler in itertools.chain(ctx.log.handlers, ctx.log.root.handlers):
57
- # handler.close()
58
- # click_ctx.invoke(cli_server_remove, ctx=ctx, force=True)
59
-
60
- # # removing the server import config
61
- # info("Deleting demo import config file")
62
- # server_configs = ServerContext.instance_folders(
63
- # InstanceType.SERVER, ctx.name, system_folders=False
64
- # )
65
- # import_config_to_del = Path(server_configs["dev"]) / f"{ctx.name}.yaml"
66
- # remove_file(import_config_to_del, "import_configuration")
67
-
68
- # # also remove the server folder
69
- # server_configs = ServerContext.instance_folders(
70
- # InstanceType.SERVER, ctx.name, system_folders=False
71
- # )
72
- # server_folder = server_configs["data"]
73
- # if server_folder.is_dir():
74
- # rmtree(server_folder)
75
-
76
- # # remove the store folder
77
- # store_configs = AlgorithmStoreContext.instance_folders(
78
- # InstanceType.ALGORITHM_STORE, f"{ctx.name}_store", system_folders=False
79
- # )
80
- # store_folder = store_configs["data"]
81
- # if store_folder.is_dir():
82
- # rmtree(store_folder)
83
-
84
- # # remove the store config file
85
- # subprocess.run(
86
- # [
87
- # "v6",
88
- # "algorithm-store",
89
- # "remove",
90
- # "-n",
91
- # f"{ctx.name}_store",
92
- # "--force",
93
- # "--user",
94
- # ]
95
- # )
96
-
97
- # # remove the nodes
98
- # configs, _ = NodeContext.available_configurations(system_folders=False)
99
- # node_names = [
100
- # config.name for config in configs if config.name.startswith(f"{ctx.name}_node_")
101
- # ]
102
- # for name in node_names:
103
- # node_ctx = NodeContext(name, False)
104
- # for handler in itertools.chain(
105
- # node_ctx.log.handlers, node_ctx.log.root.handlers
106
- # ):
107
- # handler.close()
108
- # subprocess.run(["v6", "node", "remove", "-n", name, "--user", "--force"])
109
-
110
- # # remove data files attached to the network
111
- # data_dirs_nodes = NodeContext.instance_folders("node", "", False)["dev"]
112
- # rmtree(Path(data_dirs_nodes / ctx.name))
@@ -1,46 +0,0 @@
1
- import click
2
- import questionary as q
3
- import docker
4
-
5
- from colorama import Fore, Style
6
-
7
- from vantage6.common import error, info, debug
8
- from vantage6.common.docker.addons import check_docker_running
9
-
10
-
11
- @click.command()
12
- def cli_node_clean() -> None:
13
- """
14
- Erase temporary Docker volumes.
15
- """
16
- check_docker_running()
17
- client = docker.from_env()
18
-
19
- # retrieve all volumes
20
- volumes = client.volumes.list()
21
- candidates = []
22
- msg = "This would remove the following volumes: "
23
- for volume in volumes:
24
- if volume.name[-6:] == "tmpvol":
25
- candidates.append(volume)
26
- msg += volume.name + ","
27
- info(msg)
28
-
29
- try:
30
- confirm = q.confirm("Are you sure?").unsafe_ask()
31
- except KeyboardInterrupt:
32
- confirm = False
33
-
34
- if confirm:
35
- for volume in candidates:
36
- try:
37
- volume.remove()
38
- # info(volume.name)
39
- except docker.errors.APIError as e:
40
- error(
41
- f"Failed to remove volume {Fore.RED}'{volume.name}'"
42
- f"{Style.RESET_ALL}. Is it still in use?"
43
- )
44
- debug(e)
45
- exit(1)
46
- info("Done!")
@@ -1,54 +0,0 @@
1
- import subprocess
2
-
3
- import click
4
- import docker
5
- from colorama import Fore, Style
6
-
7
- from vantage6.common import debug as debug_msg, error, info
8
- from vantage6.common.docker.addons import check_docker_running
9
- from vantage6.common.globals import APPNAME, InstanceType
10
-
11
- from vantage6.cli.common.decorator import click_insert_context
12
- from vantage6.cli.context.server import ServerContext
13
-
14
-
15
- @click.command()
16
- @click_insert_context(type_=InstanceType.SERVER)
17
- def cli_server_shell(ctx: ServerContext) -> None:
18
- """
19
- Run an iPython shell within a running server. This can be used to modify
20
- the database.
21
-
22
- NOTE: using the shell is no longer recommended as there is no validation on
23
- the changes that you make. It is better to use the Python client or a
24
- graphical user interface instead.
25
- """
26
- # will print an error if not
27
- check_docker_running()
28
-
29
- docker_client = docker.from_env()
30
-
31
- running_servers = docker_client.containers.list(
32
- filters={"label": f"{APPNAME}-type={InstanceType.SERVER.value}"}
33
- )
34
-
35
- if ctx.docker_container_name not in [s.name for s in running_servers]:
36
- error(f"Server {Fore.RED}{ctx.name}{Style.RESET_ALL} is not running?")
37
- return
38
-
39
- try:
40
- subprocess.run(
41
- [
42
- "docker",
43
- "exec",
44
- "-it",
45
- ctx.docker_container_name,
46
- "vserver-local",
47
- "shell",
48
- "-c",
49
- "/mnt/config.yaml",
50
- ]
51
- )
52
- except Exception as e:
53
- info("Failed to start subprocess...")
54
- debug_msg(e)
@@ -1,75 +0,0 @@
1
- vantage6/cli/__init__.py,sha256=8KIgMPbZTNdkYlUrB8irpsUA7KdkFdLbNbMKixOP2dE,277
2
- vantage6/cli/cli.py,sha256=EeMfvBABKYauujZDR09IjpBgtbBg1sS1iJPuzre-AqM,6474
3
- vantage6/cli/config.py,sha256=Jqe3VcvoxPrFlvw7cuKt4-5oyL0YTZXvpNsqPybSAYk,7973
4
- vantage6/cli/configuration_manager.py,sha256=kgQNBaQdypKsqs18s6h1Zp4CwpgcBEqWsRuRC_ZWFPE,5079
5
- vantage6/cli/configuration_wizard.py,sha256=C-Z2e1oEKX2ZLIWO6y3kCwcyhtvxLC1ivcZM_8NDlDA,19613
6
- vantage6/cli/globals.py,sha256=1R1XivMfzU5QmZO-UsrCX1e3im9vdun6v2pw2NUM3JI,2223
7
- vantage6/cli/utils.py,sha256=mhCtsxCf8nOCaW3layW8aJGI0XAjGs0IuheCNj3o-IA,4397
8
- vantage6/cli/algorithm/create.py,sha256=kRT1BlBcb0fDaB2Q988WxtA6EyAZmOW5QoU2uhbwBIo,2075
9
- vantage6/cli/algorithm/generate_algorithm_json.py,sha256=huaqoadhz-2-Sy6SON9zFe_cAatvE7dtTQazvmNOgMA,19558
10
- vantage6/cli/algorithm/update.py,sha256=WwAfTnq0kTOgePUsBzGoo1AJQqGMn82E9Bjk1wf61CQ,1338
11
- vantage6/cli/algostore/attach.py,sha256=0WzLnKigJAelPpL5EaWcnRuUyQzMSofrrZfEzwDIvSw,311
12
- vantage6/cli/algostore/files.py,sha256=r89VRixK_K-c44qseq58Aa2Dqf1wEf8yompQRN5AVu4,580
13
- vantage6/cli/algostore/list.py,sha256=xBCnwGbuWY_rrx6jrFX8JVAEFXh8GwqwicqpxMiaSa8,418
14
- vantage6/cli/algostore/new.py,sha256=8ZUpW_K8m_R3MUSe9d6bl-ia3QWLeLXwmvmiv4JwpCI,1018
15
- vantage6/cli/algostore/remove.py,sha256=ieQLpo2ZpblpPxaeRXdB7IO0DzTtURnveYQltW7TTSw,1643
16
- vantage6/cli/algostore/start.py,sha256=YjhnkLjPLVhsxpQxzPgsYc7p8Un6YJ91_OpukTso2eE,2107
17
- vantage6/cli/algostore/stop.py,sha256=n6FTmXF7Np9gZgPJMF71YkRR3aK0PkK64MRjULysH_4,2927
18
- vantage6/cli/common/decorator.py,sha256=KF3uFjmn00qtTSD90BLczaX-gqvlt2Kud4PJGm7P4jU,3627
19
- vantage6/cli/common/new.py,sha256=kY34iuNEq5mXA-XRGY3TlomAvkzzArGjGGwjZFBrGc0,2017
20
- vantage6/cli/common/start.py,sha256=nhxQlqKe3g_sPISswq7tvV5Pf1rQMQWGL6BCpcgzXFQ,9078
21
- vantage6/cli/common/stop.py,sha256=bdo6pA4YLu0orQ4-Ii7P_hqwQJ75kO2WMkp-0gRKVsg,2645
22
- vantage6/cli/common/utils.py,sha256=AEptnTib104bTTmG6XTdDijDaz9IuV480BGcQqLMDEU,10550
23
- vantage6/cli/context/__init__.py,sha256=88LSA3h_v-t8PzjCrzl0vw1jkOdNUNr3nPo-L2e9onc,2684
24
- vantage6/cli/context/algorithm_store.py,sha256=qTNRrCo_EWVAfSC4eg_MohSf_Ra4U3tZvB8EwZZREEw,4044
25
- vantage6/cli/context/base_server.py,sha256=i0op_9mifKjJIP4I1Z-V3HRFf_WPOrBQGFvTL6pJZL8,2450
26
- vantage6/cli/context/node.py,sha256=RsCO12B21ypaGn96Dz6mriA-RjS9GyptF2bSbUShjcI,7453
27
- vantage6/cli/context/server.py,sha256=o2HMlDEg7RbU44AfwNPln8K64FX4SQ_IgULFY_GBhEI,4837
28
- vantage6/cli/dev/create.py,sha256=WBBPG9jyNvPQVb1koHX9y3VKQmlijlq-QBsYYzqqojg,21207
29
- vantage6/cli/dev/remove.py,sha256=kjmOqkMO0ZU5F-3KgQ05VlfQQCS5Ta6yLY32DU0rH7k,3917
30
- vantage6/cli/dev/data/km_dataset.csv,sha256=OrYF2ympb2QndiUOX_nTFGGB1HbAp2eOvZzrQ_PqJs4,31283
31
- vantage6/cli/node/attach.py,sha256=cmouPrkbIbg21_wlAe-L-ecmrKVxiDkzGmEtRaCnKQY,276
32
- vantage6/cli/node/clean.py,sha256=uCty2GNuwoTybs1nIOygQLxtbleQ-rnnS6_4ieWVmCw,1199
33
- vantage6/cli/node/create_private_key.py,sha256=gmgI9Gtcx3z0esxyLw-96HcrfmAJFOjjXbVvA9ZGN3g,5129
34
- vantage6/cli/node/files.py,sha256=V7bJeR8weX0Llpp6y9wQoNrRsvlotEE6e70aTJp9j6M,1331
35
- vantage6/cli/node/list.py,sha256=_WZ8EBIEUlzFhVp3cR2MK5FUuQicMEZHhD8npMwKSpM,1664
36
- vantage6/cli/node/new.py,sha256=D-zI20pneF8kmGZKTRj09IaMMsj7z2rhiGXegMZywik,2040
37
- vantage6/cli/node/remove.py,sha256=5gylLyMa8LoavQNQv71JuwrTZN2rJwLrphl4Z0Fu6_8,3658
38
- vantage6/cli/node/restart.py,sha256=bWx0n4tN8TWOy_o8lJkA7AR-H1UIbfAiPp93I5wXg1Y,3709
39
- vantage6/cli/node/set_api_key.py,sha256=OYCCJ8zrbc7uXyv0uLTejqD43xXELVvR01czzG46imo,1998
40
- vantage6/cli/node/start.py,sha256=hyRXp6IAuK_InKSicuDnBYwjJLUUPZUfC8d1nYPAdO4,12226
41
- vantage6/cli/node/stop.py,sha256=DkUtaYRghQz9UR9FG8zRUR4aK0GVlGJGs_8Y5jXSao4,4156
42
- vantage6/cli/node/version.py,sha256=X921xyIvIPYObPac2Si5msZ2tay5ySidnPWmGj1ilZw,1959
43
- vantage6/cli/node/common/__init__.py,sha256=gYbdDajTz5Sh-buChejB8-lkMXalL85mMsMbM0OlR1Q,2868
44
- vantage6/cli/prometheus/monitoring_manager.py,sha256=tNvguLonbVILqCDnHRizef5NwKnEOV0DuzTx0Bhd2HU,4906
45
- vantage6/cli/prometheus/prometheus.yml,sha256=Q4i9lVknITBodHUMgarRnEsXfXTNuSdI6a-9pW4YCoI,98
46
- vantage6/cli/rabbitmq/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
- vantage6/cli/rabbitmq/definitions.py,sha256=CcS9jG7ZGB6LjzHQqZ2FliDurPItUvNSjHrOYptORZg,637
48
- vantage6/cli/rabbitmq/queue_manager.py,sha256=KGDGHy4NBN8O9xhjzfI7mh65i9lOQIqQwrOFqvGFdHI,7545
49
- vantage6/cli/rabbitmq/rabbitmq.config,sha256=LYAQAEoXaF472XeJDYXc9JfWSETIzPRIR2W-JB2i7fU,136
50
- vantage6/cli/server/attach.py,sha256=q1E40nGCBEFUF1p94sZoU-Ud3OXAUy4-FJqcP7Gqa7U,322
51
- vantage6/cli/server/files.py,sha256=MsnLaY91F2m49mm_FpVboFrSsZiEsu175KioN1alZfk,568
52
- vantage6/cli/server/import_.py,sha256=VDzEdEBtCtyF_ofzb6sSkXTNwhzBcq1-ByaHb1jfdes,4523
53
- vantage6/cli/server/list.py,sha256=ioHQeBq5_SE6zNcyg9C7lqvcPwyHOyGPZ4SisFgq5-E,314
54
- vantage6/cli/server/new.py,sha256=DV5AmeAxnqV9VAmKXABbrm6-uHnIwtFRJqNQLaKkv_g,1017
55
- vantage6/cli/server/remove.py,sha256=6tfKfVa5dYnZAKQYo_VlGZTuiugi7sh2F3U2cZ7mCmQ,1627
56
- vantage6/cli/server/shell.py,sha256=47uGPupdG-2b8yhWvJoht-VJL29CodemcgXuo04CMBU,1601
57
- vantage6/cli/server/start.py,sha256=AreESfIl24cqCvBWs5vT-EBRxvRxdMs-iXQXXXOz3zI,2550
58
- vantage6/cli/server/stop.py,sha256=O7138HIE-vJGupRpUgf71cmrBc1PBjJGh9kH2P1a0p4,2997
59
- vantage6/cli/server/version.py,sha256=lqrPNKMbFO22W-NarJ2TjLd7fZT43hV-sFRbzMlBniw,1307
60
- vantage6/cli/server/common/__init__.py,sha256=htv0mFYa4GhIHdzA2xqUUgKhHcMh09UQERlIjIgrwOM,2062
61
- vantage6/cli/template/algo_store_config.j2,sha256=5XHkOv4YZU0umkC_11ilFiBXRWQtPeRgu1FfI4hJ6r0,7367
62
- vantage6/cli/template/node_config.j2,sha256=Y5IA5tyG9X8MDMnJ7_ZlMVMCIA6NkZOhwM_ykTOGT4g,784
63
- vantage6/cli/template/server_config.j2,sha256=tCgceSajZ-GVG8yEufFBPWkEJKKg3BfECQmO5TzTrgw,10036
64
- vantage6/cli/test/client_script.py,sha256=AHQ4fhzbtD-VcJAm0rxUDteepXNa4Bef9SKWnzobTd0,4825
65
- vantage6/cli/test/feature_tester.py,sha256=AsZam91KqaAo_yIFxyZ5Hmy1ZPw83d02BDyO4TzKFQo,2631
66
- vantage6/cli/test/integration_test.py,sha256=MctR_t-WEyxzFpMdc6ByTcX1BQglZiT5-CIOQXTBBWo,4034
67
- vantage6/cli/test/algo_test_scripts/algo_test_arguments.py,sha256=HIKAhJ5zKkWMGXpCb_KLukbcwbyeMK5j3wcqubalbyM,791
68
- vantage6/cli/test/algo_test_scripts/algo_test_script.py,sha256=jfzXPmpL0HlE_eq1jXLV3HuZgh_aV-ZOaawHcYIuwQE,2741
69
- vantage6/cli/test/common/diagnostic_runner.py,sha256=5-KgspYW0PncO_t_TrQzd_GSOXVwH-7bIVv-IHOxwQM,6598
70
- vantage6/cli/use/context.py,sha256=mEtOfbuLtYQlRh-ypif24WtOwgpcvXObX310mmXIkWY,1362
71
- vantage6/cli/use/namespace.py,sha256=MOd9H3GJwZ0cho0mmlHTRlGPLoQEiSnZIFDsFsvYw4Q,1643
72
- vantage6-5.0.0a34.dist-info/METADATA,sha256=1EPx21xNrr2y_KkPHz3bvTXtsDBMwL_5e1eAsXbFtdE,1779
73
- vantage6-5.0.0a34.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
74
- vantage6-5.0.0a34.dist-info/entry_points.txt,sha256=RKVCMsD70s_Gp6If89uDlCphsZ9uLIOMt1gciv8EMDQ,53
75
- vantage6-5.0.0a34.dist-info/RECORD,,