arkitekt-next 0.8.1__py3-none-any.whl → 0.8.3__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,11 +3,11 @@ from arkitekt_next.cli.options import *
3
3
  import asyncio
4
4
  from arkitekt_next.cli.ui import construct_run_panel
5
5
  from importlib import import_module
6
- from rekuest.postmans.utils import arkiuse
6
+ from rekuest_next.postmans.utils import arkiuse
7
7
  from arkitekt_next.cli.utils import import_builder
8
- from rekuest.api.schema import (
8
+ from rekuest_next.api.schema import (
9
9
  NodeKind,
10
- ReserveBindsInput,
10
+ BindsInput
11
11
  )
12
12
  from rich.table import Table
13
13
  from rich.console import Console
@@ -21,45 +21,7 @@ async def call_app(
21
21
  arg: Dict[str, Any],
22
22
  ):
23
23
  async with app:
24
- await app.rekuest.agent.aregister_definitions()
25
-
26
- run_task = asyncio.create_task(app.rekuest.run())
27
-
28
- template = app.rekuest.agent.interface_template_map[template_string]
29
-
30
- async with arkiuse(
31
- hash=template.node.hash,
32
- binds=ReserveBindsInput(templates=[template.id], clients=[]),
33
- postman=app.rekuest.postman,
34
- ) as a:
35
- if template.node.kind == NodeKind.GENERATOR:
36
- async for i in a.astream(kwargs=arg):
37
- table = Table(title=f"Yields of {template.node.name}")
38
- table.add_column("key")
39
- table.add_column("value")
40
-
41
- for key, value in i.items():
42
- table.add_row(key, value)
43
-
44
- console.print(table)
45
-
46
- else:
47
- i = await a.aassign(kwargs=arg)
48
- table = Table(title=f"Returns of {template.node.name}")
49
- table.add_column("key")
50
- table.add_column("value")
51
-
52
- for key, value in i.items():
53
- table.add_row(key, value)
54
-
55
- console.print(table)
56
-
57
- run_task.cancel()
58
-
59
- try:
60
- await run_task
61
- except asyncio.CancelledError:
62
- pass
24
+ raise NotImplementedError("Not implemented yet")
63
25
 
64
26
 
65
27
  @click.command("prod")
@@ -36,13 +36,10 @@ def requirements(
36
36
  machine_readable: bool,
37
37
  builder: str = "arkitekt_next.builders.easy",
38
38
  ):
39
- """Runs the app in production mode
39
+ """Checks the requirements of the app
40
40
 
41
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
42
  """
45
- from rekuest.definition.registry import get_default_definition_registry
46
43
 
47
44
  manifest = get_manifest(ctx)
48
45
  console = get_console(ctx)
@@ -70,7 +67,7 @@ def requirements(
70
67
  )
71
68
 
72
69
  x = {
73
- key: item.dict(by_alias=True) for key, item in app.manifest.requirements.items()
70
+ key: item.model_dump(by_alias=True) for key, item in app.manifest.requirements.items()
74
71
  }
75
72
  if machine_readable:
76
73
  print("--START_REQUIREMENTS--" + json.dumps(x) + "--END_REQUIREMENTS--")
@@ -42,7 +42,7 @@ def templates(
42
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
43
 
44
44
  """
45
- from rekuest.definition.registry import get_default_definition_registry
45
+
46
46
 
47
47
  manifest = get_manifest(ctx)
48
48
  console = get_console(ctx)
@@ -1,3 +1,4 @@
1
+ from importlib.metadata import version
1
2
  from arkitekt_next.cli.constants import compile_dockerfiles
2
3
  from arkitekt_next.cli.types import Flavour
3
4
  from arkitekt_next.cli.utils import build_relative_dir
@@ -46,6 +47,13 @@ import os
46
47
  is_flag=True,
47
48
  default=False,
48
49
  )
50
+ @click.option(
51
+ "--arkitekt-version",
52
+ "-av",
53
+ help="Which Arkitekt-version should we use to mount in the container?",
54
+ default=None,
55
+ type=str,
56
+ )
49
57
  @click.pass_context
50
58
  def init(
51
59
  ctx: Context,
@@ -54,6 +62,7 @@ def init(
54
62
  flavour: str,
55
63
  template: str,
56
64
  devcontainer: bool,
65
+ arkitekt_version: str = None,
57
66
  ) -> None:
58
67
  """Runs the port wizard to generate a dockerfile to be used with port"""
59
68
 
@@ -78,6 +87,15 @@ def init(
78
87
  dockerfile="Dockerfile",
79
88
  )
80
89
 
90
+
91
+ try:
92
+ package_version = arkitekt_version or version('arkitekt_next')
93
+ print(f"Detected Arkitekt Package version: {package_version}")
94
+ except:
95
+ raise click.ClickException("Could not detect the Arkitekt package version (maybe you are running a dev version). Please provide it with the --arkitekt-version flag")
96
+
97
+
98
+
81
99
  with open(config_file, "w") as file:
82
100
  yaml.dump(fl.dict(), file)
83
101
 
@@ -85,7 +103,7 @@ def init(
85
103
  dockerfile_content = f.read()
86
104
 
87
105
  with open(dockerfile, "w") as f:
88
- f.write(dockerfile_content)
106
+ f.write(dockerfile_content.format(__arkitekt_version__=package_version))
89
107
 
90
108
  if devcontainer or click.confirm("Do you want to create a devcontainer.json file?"):
91
109
  create_devcontainer_file(manifest, flavour, dockerfile)
@@ -8,8 +8,8 @@ from watchfiles.filters import PythonFilter
8
8
  import os
9
9
  import sys
10
10
  import inspect
11
- from rekuest.definition.registry import get_default_definition_registry
12
- from rekuest.agents.hooks import get_default_hook_registry
11
+ from rekuest_next.definition.registry import get_default_definition_registry
12
+ from rekuest_next.agents.hooks import get_default_hook_registry
13
13
  from typing import MutableSet, Tuple, Any, Set
14
14
  from arkitekt_next.cli.ui import construct_changes_group, construct_app_group
15
15
  from arkitekt_next.cli.commands.run.utils import import_builder
@@ -1,7 +1,6 @@
1
1
  FROM python:3.11-slim-buster
2
- ARG ARKITEKT_VERSION=0.8.0
3
2
 
4
- RUN pip install "arkitekt-next[all]>=${ARKITEKT_VERSION}"
3
+ RUN pip install "arkitekt-next[all]>={__arkitekt_version__}"
5
4
 
6
5
  RUN mkdir /app
7
6
  WORKDIR /app
@@ -14,6 +14,7 @@ from rekuest_next.api.schema import TemplateInput
14
14
  ALLOWED_BUILDER_KEYS = [
15
15
  "tag",
16
16
  "dockerfile",
17
+ "package_version",
17
18
  ]
18
19
 
19
20
 
@@ -229,8 +230,6 @@ class Flavour(BaseModel):
229
230
  "-f",
230
231
  "{dockerfile}",
231
232
  ".",
232
- "--build-arg",
233
- "ARKITEKT_VERSION={package_version}",
234
233
  ]
235
234
  )
236
235
 
@@ -248,18 +247,10 @@ class Flavour(BaseModel):
248
247
  def generate_build_command(self, tag: str, relative_dir: str):
249
248
  """Generates the build command for this flavour"""
250
249
 
251
- try:
252
- package_version = version('arkitekt_next')
253
- print(f"Detected Arkitekt Package version: {package_version}")
254
- except:
255
- package_version = "0.8.0"
256
- print("Could not detect Arkitekt Package version. Using 0.8.0")
257
-
258
-
259
250
 
260
251
  dockerfile = os.path.join(relative_dir, self.dockerfile)
261
252
 
262
- return [v.format(tag=tag, dockerfile=dockerfile, package_version=package_version) for v in self.build_command]
253
+ return [v.format(tag=tag, dockerfile=dockerfile) for v in self.build_command]
263
254
 
264
255
  def check_relative_paths(self, flavour_folder: str):
265
256
  """Checks that the paths are relative to the flavour folder"""
arkitekt_next/tqdm.py CHANGED
@@ -2,7 +2,7 @@
2
2
  assignation context"""
3
3
 
4
4
  from tqdm import tqdm as _tqdm
5
- from rekuest.actors.vars import current_assignation_helper
5
+ from rekuest_next.actors.vars import current_assignation_helper
6
6
 
7
7
 
8
8
  class tqdm(_tqdm):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: arkitekt-next
3
- Version: 0.8.1
3
+ Version: 0.8.3
4
4
  Summary: client for the arkitekt_next platform
5
5
  License: MIT
6
6
  Author: jhnnsrs
@@ -50,7 +50,7 @@ arkitekt_next/bloks/tailscale.py,sha256=87cJv9m7N_I3y2ZRvv5WVepRhvIZk4ftUpwa0yUd
50
50
  arkitekt_next/builders.py,sha256=mzyvhDI9u73_6sn2tGL-ZJh7PwdL_M8PIKqPqgzd4z0,7273
51
51
  arkitekt_next/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
52
52
  arkitekt_next/cli/commands/call/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
- arkitekt_next/cli/commands/call/local.py,sha256=YDummInGSb6lGKGiTlMSuXbE-Sz6dbfng6CsZaChCew,3338
53
+ arkitekt_next/cli/commands/call/local.py,sha256=XkNa2WGLf7YczRobjnQSWhRCtt6fs--2qeIa6tTMUvY,2114
54
54
  arkitekt_next/cli/commands/call/main.py,sha256=SdxlvSgA17-M_gwItiFU_srbh-CNdHpCTv_DkpOLojE,500
55
55
  arkitekt_next/cli/commands/call/remote.py,sha256=KNOBAg61kaapAgTl0dnv6LVD4d2p0GSuohK4r3OFxXQ,2092
56
56
  arkitekt_next/cli/commands/gen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -62,12 +62,12 @@ arkitekt_next/cli/commands/init/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm
62
62
  arkitekt_next/cli/commands/init/main.py,sha256=1ZbZDBECZRxlcnulycdS15s-uQ5ngx4xP3T1v-gkJ3U,5435
63
63
  arkitekt_next/cli/commands/inspect/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
64
64
  arkitekt_next/cli/commands/inspect/main.py,sha256=Bu1vAZudkFCtjDnZAB8yQLDt-UKY9pJGhLBlEfDqtkw,626
65
- arkitekt_next/cli/commands/inspect/requirements.py,sha256=gQBx5OTsbLHTRwya4tMLOi8j_o28Gi4hRgvTWqGh5-4,2125
66
- arkitekt_next/cli/commands/inspect/templates.py,sha256=U99SLBYWiD-ZiIYV7pVWhQK3XWn1PLUIyTKzgSFF6MQ,2325
65
+ arkitekt_next/cli/commands/inspect/requirements.py,sha256=wj1-QTLY6rax-NxdDbctaS3tobo-W3g29FfnoM80Sr0,1894
66
+ arkitekt_next/cli/commands/inspect/templates.py,sha256=UjSqP7sirH6kG-s0h10augvUHI-sEGwgg4NNqcNCJBc,2254
67
67
  arkitekt_next/cli/commands/inspect/variables.py,sha256=LonDlbS2qH1v-jD6RfEhTv-mxmgeBMKqD3oO2iDJRjE,2698
68
68
  arkitekt_next/cli/commands/kabinet/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
69
69
  arkitekt_next/cli/commands/kabinet/build.py,sha256=JyMgvp5X0j2DE4w3aLPyM6ffSulfFZ1mNkS4--3wlZM,8671
70
- arkitekt_next/cli/commands/kabinet/init.py,sha256=FMozj1kzrgdoZ13VR9BrPU8aqSlSynRRyoTPSkerBzU,2970
70
+ arkitekt_next/cli/commands/kabinet/init.py,sha256=T6D7Vz05PUyyJ6noNqrMhVjz8hyZUfKv4Vgi1JVxz_k,3599
71
71
  arkitekt_next/cli/commands/kabinet/main.py,sha256=U5EWekRTsMZZ34abWFfwilhzrd-zZtpZbl8RsLN_bC8,1008
72
72
  arkitekt_next/cli/commands/kabinet/publish.py,sha256=zbjnoMliowje1nEuKFolFX5pZA2D_DzLjXlSxBbD88k,3596
73
73
  arkitekt_next/cli/commands/kabinet/stage.py,sha256=bXpC8fDmG6qFQVuLhqTCieOJnvFafj3Flg1BdIeciEw,2025
@@ -81,13 +81,13 @@ arkitekt_next/cli/commands/manifest/scopes.py,sha256=sw0HRy8GliEcmx3Sh6cPRpBkf1v
81
81
  arkitekt_next/cli/commands/manifest/version.py,sha256=tA-a35QlcobUwoPsgGLQL9_D0E-HZvawsfO4l7DoX-Y,4832
82
82
  arkitekt_next/cli/commands/manifest/wizard.py,sha256=a8rIHgtmKuw-L4E3eO3kXwXv0TM2pN4Lq75y2QKXmcA,2498
83
83
  arkitekt_next/cli/commands/run/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
84
- arkitekt_next/cli/commands/run/dev.py,sha256=mobsKX155O6NXGzLK-c4_l2RN4vlM4-1lj2gQaX9HeA,10033
84
+ arkitekt_next/cli/commands/run/dev.py,sha256=pNl5KkMn413t7iLbkuWjA9qH_rApiODnk2CwacL6bXY,10043
85
85
  arkitekt_next/cli/commands/run/main.py,sha256=0bNO3DqwbZ4ddMsDWbCGmlPD6Cs3Jlg4yh2-zilsEbY,552
86
86
  arkitekt_next/cli/commands/run/prod.py,sha256=EqDMa_eYNaffHZOBHGQEGNJVKdq8NHCgfoqK8yH63B4,1637
87
87
  arkitekt_next/cli/commands/run/utils.py,sha256=zH-MNNEfKgyOYQvwP6Ph8KUHVqH48fw3ZI6tiQ9unwQ,325
88
88
  arkitekt_next/cli/configs/base.yaml,sha256=9IJ7B4Fq3swHsLUbKn1MlhhzJKqDI1wnR5PAG_VKs8A,30097
89
89
  arkitekt_next/cli/constants.py,sha256=ONXKA8LRxXQkOQ56ZElVMZSTiaIH1LE_ikmUUKem98g,1410
90
- arkitekt_next/cli/dockerfiles/vanilla.dockerfile,sha256=Gz-EJ7u2vQl-wVO1xQkgX21pI2-C2Rhi7byi7rtVxCA,208
90
+ arkitekt_next/cli/dockerfiles/vanilla.dockerfile,sha256=0ujdG22rZ6v2n5TMHNA4HR5f1PP9KJvAQORz-DGHBpo,184
91
91
  arkitekt_next/cli/errors.py,sha256=zLTjaCbun6qM2nTldjyZd-DvykqKn5A3Gn80uYdx7Vc,93
92
92
  arkitekt_next/cli/inspect.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
93
93
  arkitekt_next/cli/io.py,sha256=uRhq3SCI-sCiRp9TXK_hFqu5xub1h49XNixFqybHCpc,6821
@@ -110,7 +110,7 @@ arkitekt_next/cli/schemas/unlok.schema.graphql,sha256=fXR846snIBIqkuQ-PlYnSkQjkF
110
110
  arkitekt_next/cli/templates/filter.py,sha256=mD2jdNEXrZNagC_8WtuTisGJrGIbJDSylCvh19cF49I,650
111
111
  arkitekt_next/cli/templates/simple.py,sha256=IbcThJ5LryXVFQUdzxfHQCtzSNxEQWTxbD__Ygxsp4M,1171
112
112
  arkitekt_next/cli/texts.py,sha256=080QLAe8dhklkfoA8Yk6fLrQeRoUrTQLgWCZiWl7bNk,689
113
- arkitekt_next/cli/types.py,sha256=lpZFJaFOtYG4YyLe2JFY274laM5WFdbb0FLYuEj2Olw,10813
113
+ arkitekt_next/cli/types.py,sha256=s6xhxNaoLxv_0SKPp_NoWHFbwZSRuGlId-HNm5Yf3F8,10443
114
114
  arkitekt_next/cli/ui.py,sha256=BR_AOsBIIHwojI5otBzT_560-ep5Dw1xAHKsO2zOOJQ,3493
115
115
  arkitekt_next/cli/utils.py,sha256=rl1hfQIVzepLHPN_ZWuvfVH-IIVqcSfiFGyfNtL1XCo,445
116
116
  arkitekt_next/cli/validators.py,sha256=XkLrOrDzBJwcG1keTawa_NJPt3QIBhb5KjepeH4N1KA,719
@@ -134,10 +134,10 @@ arkitekt_next/qt/magic_bar.py,sha256=o3Z9F2QutVd6JLEY4tEQ5-vfjIBXpgfYz8HXcWgaqfc
134
134
  arkitekt_next/qt/types.py,sha256=jI9UHt1Rn-fxGZfeImTO9-yHh0zJPzk7CwvpnUXdirg,1085
135
135
  arkitekt_next/qt/utils.py,sha256=MgBPtPmCSBkIuATov3UgREESwxAHh77lWNNxyE7Qs48,773
136
136
  arkitekt_next/service_registry.py,sha256=oryaRLS2kalmV1Qf4_SWdLotBopTsdHNaVlnt1TGZyI,3607
137
- arkitekt_next/tqdm.py,sha256=FgrwpAwFTXBTEPY4rS7K4Gs8Wdjp74mUk4_OEU8hWZM,1526
137
+ arkitekt_next/tqdm.py,sha256=lQcJI5Q6Py7Gy88hOCiJujjPEEGd8G2k1mOVJJ6oYe8,1531
138
138
  arkitekt_next/utils.py,sha256=csBRBnxnErMRTilNBYAtIe0lPBb6E3uplqwsVGs5Wkk,2390
139
- arkitekt_next-0.8.1.dist-info/LICENSE,sha256=YZ2oRjC248t-GpoEyw7J13vwKYNG6zhYMaEAix6EzF0,1089
140
- arkitekt_next-0.8.1.dist-info/METADATA,sha256=Htwl_oDy55g5Mu_kLq_c-ZIart__uHgWwqATY-oX_oc,6084
141
- arkitekt_next-0.8.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
142
- arkitekt_next-0.8.1.dist-info/entry_points.txt,sha256=-hxikQx4xZ6TiOnWVDOlTN_kcAISgGFvTHXIchsCHSc,60
143
- arkitekt_next-0.8.1.dist-info/RECORD,,
139
+ arkitekt_next-0.8.3.dist-info/LICENSE,sha256=YZ2oRjC248t-GpoEyw7J13vwKYNG6zhYMaEAix6EzF0,1089
140
+ arkitekt_next-0.8.3.dist-info/METADATA,sha256=fHlD7Znn3UZ7aIH6wakkoEVfkEOsL47TuaLKbh8K2vE,6084
141
+ arkitekt_next-0.8.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
142
+ arkitekt_next-0.8.3.dist-info/entry_points.txt,sha256=-hxikQx4xZ6TiOnWVDOlTN_kcAISgGFvTHXIchsCHSc,60
143
+ arkitekt_next-0.8.3.dist-info/RECORD,,