arkitekt-next 0.7.11__py3-none-any.whl → 0.7.13__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 arkitekt-next might be problematic. Click here for more details.

@@ -3,7 +3,7 @@ import rich_click as click
3
3
 
4
4
  import rich_click as click
5
5
  from .variables import variables
6
- from .definitions import definitions
6
+ from .templates import templates
7
7
 
8
8
 
9
9
  @click.group()
@@ -19,4 +19,4 @@ def inspect(ctx):
19
19
 
20
20
 
21
21
  inspect.add_command(variables, "variables")
22
- inspect.add_command(definitions, "definitions")
22
+ inspect.add_command(templates, "templates")
@@ -0,0 +1,90 @@
1
+ import rich_click as click
2
+ from importlib import import_module
3
+ from arkitekt_next.apps.types import App
4
+ from arkitekt_next.cli.commands.run.utils import import_builder
5
+ from arkitekt_next.cli.vars import get_console, get_manifest
6
+ from arkitekt_next.cli.options import with_builder
7
+ import json
8
+ import os
9
+
10
+
11
+ async def run_app(app):
12
+ async with app:
13
+ await app.rekuest.run()
14
+
15
+
16
+ @click.command("prod")
17
+ @click.pass_context
18
+ @click.option(
19
+ "--pretty",
20
+ "-p",
21
+ help="Should we just output json?",
22
+ is_flag=True,
23
+ default=False,
24
+ )
25
+ @click.option(
26
+ "--machine-readable",
27
+ "-mr",
28
+ help="Should we just output json?",
29
+ is_flag=True,
30
+ default=False,
31
+ )
32
+ @with_builder
33
+ def templates(
34
+ ctx,
35
+ pretty: bool,
36
+ machine_readable: bool,
37
+ builder: str = "arkitekt_next.builders.easy",
38
+ ):
39
+ """Runs the app in production mode
40
+
41
+ \n
42
+ You can specify the builder to use with the --builder flag. By default, the easy builder is used, which is designed to be easy to use and to get started with.
43
+
44
+ """
45
+ from rekuest.definition.registry import get_default_definition_registry
46
+
47
+ manifest = get_manifest(ctx)
48
+ console = get_console(ctx)
49
+
50
+ entrypoint = manifest.entrypoint
51
+ identifier = manifest.identifier
52
+ entrypoint_file = f"{manifest.entrypoint}.py"
53
+ os.path.realpath(entrypoint_file)
54
+
55
+ builder_func = import_builder(builder)
56
+
57
+ entrypoint = manifest.entrypoint
58
+
59
+ with console.status("Loading entrypoint module..."):
60
+ try:
61
+ import_module(entrypoint)
62
+ except ModuleNotFoundError as e:
63
+ console.print(f"Could not find entrypoint module {entrypoint}")
64
+ raise e
65
+
66
+ app: App = builder_func(
67
+ identifier=identifier,
68
+ version="dev",
69
+ logo=manifest.logo,
70
+ )
71
+
72
+ rekuest = app.services.get("rekuest")
73
+ if rekuest is None:
74
+ console.print("No rekuest service found in app")
75
+ return
76
+
77
+ x = {
78
+ key: item.dict()
79
+ for key, item in rekuest.agent.extensions[
80
+ "default"
81
+ ].definition_registry.templates.items()
82
+ }
83
+ if machine_readable:
84
+ print("--START_TEMPLATES--" + json.dumps(x) + "--END_TEMPLATES--")
85
+
86
+ else:
87
+ if pretty:
88
+ console.print(json.dumps(x, indent=2))
89
+ else:
90
+ print(json.dumps(x))
@@ -93,7 +93,7 @@ def inspect_definitions(build_id: str) -> Inspection:
93
93
  try:
94
94
  # Run 'docker inspect' with the container ID or name
95
95
  result = subprocess.run(
96
- ["docker", "run", build_id, "arkitekt_next", "inspect", "definitions"],
96
+ ["docker", "run", build_id, "arkitekt-next", "inspect", "templates", "-mr"],
97
97
  stdout=subprocess.PIPE,
98
98
  stderr=subprocess.PIPE,
99
99
  check=True,
@@ -101,21 +101,19 @@ def inspect_definitions(build_id: str) -> Inspection:
101
101
  )
102
102
 
103
103
  # Parse the JSON output
104
+ correct_part = result.stdout.split("--START_TEMPLATES--")[1].split(
105
+ "--END_TEMPLATES--"
106
+ )[0]
104
107
 
105
108
  try:
106
- output = json.loads(result.stdout)
109
+ output = json.loads(correct_part)
107
110
  except json.decoder.JSONDecodeError as e:
108
111
  combined_error = result.stdout + result.stderr
109
112
  raise InspectionError(
110
113
  f"Could not decode JSON output of docker inspect. {combined_error}"
111
114
  ) from e
112
115
 
113
- if "definitions" not in output:
114
- raise InspectionError(
115
- "Container not found or invalid JSON output for definitions"
116
- )
117
-
118
- return output["definitions"]
116
+ return output
119
117
  except subprocess.CalledProcessError as e:
120
118
  combined_error = e.stdout + e.stderr
121
119
 
@@ -10,7 +10,7 @@ from click import Context
10
10
 
11
11
  @click.group()
12
12
  @click.pass_context
13
- def port(ctx: Context) -> None:
13
+ def kabinet(ctx: Context) -> None:
14
14
  """Deploy the arkitekt_next app with Port
15
15
 
16
16
  The port deployer is an arkitekt_next plugin service, which allows you to deploy your arkitekt_next app to
@@ -23,9 +23,9 @@ def port(ctx: Context) -> None:
23
23
  pass
24
24
 
25
25
 
26
- port.add_command(build, "build")
27
- port.add_command(init, "init")
28
- port.add_command(validate, "validate")
29
- port.add_command(publish, "publish")
30
- port.add_command(stage, "stage")
31
- port.add_command(wizard, "wizard")
26
+ kabinet.add_command(build, "build")
27
+ kabinet.add_command(init, "init")
28
+ kabinet.add_command(validate, "validate")
29
+ kabinet.add_command(publish, "publish")
30
+ kabinet.add_command(stage, "stage")
31
+ kabinet.add_command(wizard, "wizard")
arkitekt_next/cli/main.py CHANGED
@@ -17,7 +17,7 @@ from arkitekt_next.cli.texts import *
17
17
  from arkitekt_next.cli.commands.run.main import run
18
18
  from arkitekt_next.cli.commands.gen.main import gen
19
19
  from arkitekt_next.cli.commands.server.main import server
20
- from arkitekt_next.cli.commands.port.main import port
20
+ from arkitekt_next.cli.commands.kabinet.main import kabinet
21
21
  from arkitekt_next.cli.commands.init.main import init
22
22
  from arkitekt_next.cli.commands.manifest.main import manifest
23
23
  from arkitekt_next.cli.commands.inspect.main import inspect
@@ -73,7 +73,7 @@ def cli(ctx):
73
73
  cli.add_command(init, "init")
74
74
  cli.add_command(run, "run")
75
75
  cli.add_command(gen, "gen")
76
- cli.add_command(port, "port")
76
+ cli.add_command(kabinet, "kabinet")
77
77
  cli.add_command(manifest, "manifest")
78
78
  cli.add_command(inspect, "inspect")
79
79
  cli.add_command(server, "server")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: arkitekt-next
3
- Version: 0.7.11
3
+ Version: 0.7.13
4
4
  Summary: client for the arkitekt_next platform
5
5
  License: MIT
6
6
  Author: jhnnsrs
@@ -17,12 +17,13 @@ Provides-Extra: all
17
17
  Provides-Extra: cli
18
18
  Requires-Dist: dokker (>=0.1.21)
19
19
  Requires-Dist: fakts (>=0.5.0)
20
- Requires-Dist: fluss-next (>=0.1.61) ; extra == "all"
20
+ Requires-Dist: fluss-next (>=0.1.63) ; extra == "all"
21
21
  Requires-Dist: herre (>=0.4.3)
22
- Requires-Dist: kabinet (>=0.1.19) ; extra == "all"
22
+ Requires-Dist: kabinet (>=0.1.2) ; extra == "all"
23
23
  Requires-Dist: koil (>=0.3.6)
24
- Requires-Dist: mikro-next (>=0.1.6) ; (python_version >= "3.10" and python_version < "4.0") and (extra == "all")
25
- Requires-Dist: reaktion-next (>=0.1.50) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "all")
24
+ Requires-Dist: mikro-next (>=0.1.9) ; (python_version >= "3.10" and python_version < "4.0") and (extra == "all")
25
+ Requires-Dist: reaktion-next (>=0.1.53) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "all")
26
+ Requires-Dist: rekuest-next (>=0.2.4) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "cli" or extra == "all")
26
27
  Requires-Dist: rich-click (>=1.6.1) ; extra == "cli" or extra == "all"
27
28
  Requires-Dist: semver (>=3.0.1) ; extra == "cli" or extra == "all"
28
29
  Requires-Dist: turms (>=0.5.0) ; (python_version >= "3.9" and python_version < "4.0") and (extra == "cli" or extra == "all")
@@ -30,24 +30,24 @@ arkitekt_next/cli/commands/gen/watch.py,sha256=nf4QckdTJOWxvKoeNRwvC4rXQ4xhIx8LC
30
30
  arkitekt_next/cli/commands/init/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
31
  arkitekt_next/cli/commands/init/main.py,sha256=1ACgJn3RH5UIbsaX3KxKmwwvw9bkmJJgSWG4JDHPfow,5936
32
32
  arkitekt_next/cli/commands/inspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
- arkitekt_next/cli/commands/inspect/definitions.py,sha256=IZO4g-lsTBTeOk3E5ybPtmBueagDpeCa7oOITrRv-M8,1335
34
- arkitekt_next/cli/commands/inspect/main.py,sha256=hYAhhotYacT1SpQropE0w4u10u4eUcjA3dxk6aZ6QB0,545
33
+ arkitekt_next/cli/commands/inspect/main.py,sha256=Eab0t-oQzrnVIQuj5Rzq4Jm__awfOSMACM2vLEZlvEE,537
34
+ arkitekt_next/cli/commands/inspect/templates.py,sha256=ikfkkl2nXINXc95IuTRrI2Y03erKyOV0iL12gV2zaw4,2312
35
35
  arkitekt_next/cli/commands/inspect/variables.py,sha256=LonDlbS2qH1v-jD6RfEhTv-mxmgeBMKqD3oO2iDJRjE,2698
36
+ arkitekt_next/cli/commands/kabinet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
+ arkitekt_next/cli/commands/kabinet/build.py,sha256=Nb9acnUvtICMyDrJ5VReOpVgURpm9o0tQ3XnB0YeBGc,7021
38
+ arkitekt_next/cli/commands/kabinet/init.py,sha256=NNEb5SITLNM1TBED0moyBhE-JGkkr0cvNh33A4OGnfc,2525
39
+ arkitekt_next/cli/commands/kabinet/main.py,sha256=U5EWekRTsMZZ34abWFfwilhzrd-zZtpZbl8RsLN_bC8,1008
40
+ arkitekt_next/cli/commands/kabinet/publish.py,sha256=zbjnoMliowje1nEuKFolFX5pZA2D_DzLjXlSxBbD88k,3596
41
+ arkitekt_next/cli/commands/kabinet/stage.py,sha256=eK_FgqTbGvaphmOH6jnllYWCkv0pI3qJaEnfWHoBvYs,1985
42
+ arkitekt_next/cli/commands/kabinet/utils.py,sha256=x27qR7ksCuvASHkEAEaDuUAeuzjrZpzIp1W4lOF5f_0,1644
43
+ arkitekt_next/cli/commands/kabinet/validate.py,sha256=MSSuwjdJKDtXB6rkjRmG-PPK6cVwTcOuCRpgPDQ0uVg,2490
44
+ arkitekt_next/cli/commands/kabinet/wizard.py,sha256=vbW-EAitypCl1HRjsgHRuwc18hQgOzAU8C__6SWuAzQ,9148
36
45
  arkitekt_next/cli/commands/manifest/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
46
  arkitekt_next/cli/commands/manifest/inspect.py,sha256=eqYYt3M8XiYCJONarikVVa8uK7Hh7DfB2b3fOOQ3dlk,1370
38
47
  arkitekt_next/cli/commands/manifest/main.py,sha256=mOjsZSQeYorm38u4mg3IHsK_h8fTVprYYtvKpbG93V8,662
39
48
  arkitekt_next/cli/commands/manifest/scopes.py,sha256=sw0HRy8GliEcmx3Sh6cPRpBkf1vxAGJwLgIO63ZB_t4,4879
40
49
  arkitekt_next/cli/commands/manifest/version.py,sha256=tA-a35QlcobUwoPsgGLQL9_D0E-HZvawsfO4l7DoX-Y,4832
41
50
  arkitekt_next/cli/commands/manifest/wizard.py,sha256=a8rIHgtmKuw-L4E3eO3kXwXv0TM2pN4Lq75y2QKXmcA,2498
42
- arkitekt_next/cli/commands/port/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
- arkitekt_next/cli/commands/port/build.py,sha256=K8-3Hu8OVsooMlNWPdSGRFEtNFsszmIKutH92TfdEDk,7078
44
- arkitekt_next/cli/commands/port/init.py,sha256=NNEb5SITLNM1TBED0moyBhE-JGkkr0cvNh33A4OGnfc,2525
45
- arkitekt_next/cli/commands/port/main.py,sha256=mPjnW9UT90SNb5opv7Ladpt3NFvN-AJ8csS0AVuLfPM,987
46
- arkitekt_next/cli/commands/port/publish.py,sha256=zbjnoMliowje1nEuKFolFX5pZA2D_DzLjXlSxBbD88k,3596
47
- arkitekt_next/cli/commands/port/stage.py,sha256=eK_FgqTbGvaphmOH6jnllYWCkv0pI3qJaEnfWHoBvYs,1985
48
- arkitekt_next/cli/commands/port/utils.py,sha256=x27qR7ksCuvASHkEAEaDuUAeuzjrZpzIp1W4lOF5f_0,1644
49
- arkitekt_next/cli/commands/port/validate.py,sha256=MSSuwjdJKDtXB6rkjRmG-PPK6cVwTcOuCRpgPDQ0uVg,2490
50
- arkitekt_next/cli/commands/port/wizard.py,sha256=vbW-EAitypCl1HRjsgHRuwc18hQgOzAU8C__6SWuAzQ,9148
51
51
  arkitekt_next/cli/commands/run/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
52
52
  arkitekt_next/cli/commands/run/dev.py,sha256=KRcAHM-MCsy2-Wv2UIONCzdezEF214rEVbRPWec33FE,9991
53
53
  arkitekt_next/cli/commands/run/main.py,sha256=0bNO3DqwbZ4ddMsDWbCGmlPD6Cs3Jlg4yh2-zilsEbY,552
@@ -69,7 +69,7 @@ arkitekt_next/cli/dockerfiles/vanilla.dockerfile,sha256=YtZqjFUUjp3-NSeB3OowElPJ
69
69
  arkitekt_next/cli/errors.py,sha256=zLTjaCbun6qM2nTldjyZd-DvykqKn5A3Gn80uYdx7Vc,93
70
70
  arkitekt_next/cli/inspect.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
71
71
  arkitekt_next/cli/io.py,sha256=Jp8F8vYPIcAow7IAh_tgWFrsM9KRaElipAH7wj26lIo,6899
72
- arkitekt_next/cli/main.py,sha256=AR75ck7wTAbuNMdpfoBwJeFjqKE1BDfaxbdHeQG3SaI,2317
72
+ arkitekt_next/cli/main.py,sha256=A_JgqAKmmmXNK-yxuuQ9bG6HX2I6pV2ccImCQ5fjfZQ,2329
73
73
  arkitekt_next/cli/options.py,sha256=TeHFBuoTdhI908DY2D7gw5pDFkuyCXUFgEr01TZn42I,3625
74
74
  arkitekt_next/cli/schemas/fluss.schema.graphql,sha256=MqrSpOxtWO9kWFCoUn9ySBPhIH3XozFiqrQl2zjEbiQ,35803
75
75
  arkitekt_next/cli/schemas/gucker.schema.graphql,sha256=r_KL-MoFRCGUobbtcBLCnpmFcali2A12TguynqQgmN4,152947
@@ -112,8 +112,8 @@ arkitekt_next/qt/utils.py,sha256=MgBPtPmCSBkIuATov3UgREESwxAHh77lWNNxyE7Qs48,773
112
112
  arkitekt_next/service_registry.py,sha256=Aq5bgu4UHRl1P6E2JOQ2gMCwFI8pQfASWte0BvtKE3g,3365
113
113
  arkitekt_next/tqdm.py,sha256=DlrxPluHao7TvW-Cqgt0UokRS-fM2_ZNiWiddqvCqCc,1488
114
114
  arkitekt_next/utils.py,sha256=WA3AtqQFcz2h-yOadAsQkkr0qKJmKcGMi2aclxaVI_o,1278
115
- arkitekt_next-0.7.11.dist-info/LICENSE,sha256=YZ2oRjC248t-GpoEyw7J13vwKYNG6zhYMaEAix6EzF0,1089
116
- arkitekt_next-0.7.11.dist-info/METADATA,sha256=2Sr_RBI8YtV3axmwGAQsXvxRuy4RqMbpoAHsgd9oo0g,5218
117
- arkitekt_next-0.7.11.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
118
- arkitekt_next-0.7.11.dist-info/entry_points.txt,sha256=-hxikQx4xZ6TiOnWVDOlTN_kcAISgGFvTHXIchsCHSc,60
119
- arkitekt_next-0.7.11.dist-info/RECORD,,
115
+ arkitekt_next-0.7.13.dist-info/LICENSE,sha256=YZ2oRjC248t-GpoEyw7J13vwKYNG6zhYMaEAix6EzF0,1089
116
+ arkitekt_next-0.7.13.dist-info/METADATA,sha256=e09I_r0w_ezMA0XMKXqXJvD6s4FlPtMjrhEXmKUN4x4,5349
117
+ arkitekt_next-0.7.13.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
118
+ arkitekt_next-0.7.13.dist-info/entry_points.txt,sha256=-hxikQx4xZ6TiOnWVDOlTN_kcAISgGFvTHXIchsCHSc,60
119
+ arkitekt_next-0.7.13.dist-info/RECORD,,
@@ -1,53 +0,0 @@
1
- import rich_click as click
2
- from importlib import import_module
3
- from arkitekt_next.cli.vars import get_console, get_manifest
4
- from arkitekt_next.cli.options import with_builder
5
- import json
6
-
7
-
8
- async def run_app(app):
9
- async with app:
10
- await app.rekuest.run()
11
-
12
-
13
- @click.command("prod")
14
- @click.pass_context
15
- @click.option(
16
- "--pretty",
17
- "-p",
18
- help="Should we just output json?",
19
- is_flag=True,
20
- default=False,
21
- )
22
- @with_builder
23
- def definitions(
24
- ctx,
25
- pretty: bool,
26
- builder=None,
27
- ):
28
- """Runs the app in production mode
29
-
30
- \n
31
- You can specify the builder to use with the --builder flag. By default, the easy builder is used, which is designed to be easy to use and to get started with.
32
-
33
- """
34
- from rekuest.definition.registry import get_default_definition_registry
35
-
36
- manifest = get_manifest(ctx)
37
- console = get_console(ctx)
38
-
39
- entrypoint = manifest.entrypoint
40
-
41
- with console.status("Loading entrypoint module..."):
42
- try:
43
- import_module(entrypoint)
44
- except ModuleNotFoundError as e:
45
- console.print(f"Could not find entrypoint module {entrypoint}")
46
- raise e
47
-
48
- definitions = get_default_definition_registry().dump()
49
-
50
- if pretty:
51
- console.print(json.dumps(definitions, indent=2))
52
- else:
53
- print(json.dumps(definitions))
File without changes
File without changes
File without changes
File without changes
File without changes