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

arkitekt_next/__init__.py CHANGED
@@ -38,8 +38,10 @@ try:
38
38
  aiterate_raw,
39
39
  find,
40
40
  )
41
+ from .inspect import inspect
41
42
  except ImportError as e:
42
43
  raise e
44
+ inspect = missing_install("rekuest_next", e)
43
45
  publish = missing_install("rekuest_next", e)
44
46
  apublish = missing_install("rekuest_next", e)
45
47
  structure = missing_install("rekuest_next", e)
@@ -86,6 +88,7 @@ __all__ = [
86
88
  "breakpoint",
87
89
  "abreakpoint",
88
90
  "aiterate",
91
+ "inspect",
89
92
  "iterate",
90
93
  "aiterate_raw",
91
94
  "call",
arkitekt_next/builders.py CHANGED
@@ -100,7 +100,6 @@ def easy(
100
100
  service_registry = service_registry or get_default_service_registry()
101
101
  init_hook_registry = init_hook_registry or get_default_init_hook_registry()
102
102
 
103
-
104
103
  if identifier is None:
105
104
  identifier = __file__.split("/")[-1].replace(".py", "")
106
105
 
@@ -115,7 +114,6 @@ def easy(
115
114
  requirements=service_registry.get_requirements(),
116
115
  )
117
116
 
118
-
119
117
  if token:
120
118
  fakts_next = build_arkitekt_next_token_fakts_next(
121
119
  manifest=manifest,
@@ -140,7 +138,8 @@ def easy(
140
138
  herre_next = build_arkitekt_next_herre_next(fakts_next=fakts_next)
141
139
 
142
140
  params = {
143
- "instance_id": instance_id,}
141
+ "instance_id": instance_id,
142
+ }
144
143
 
145
144
  create_arkitekt_next_folder(with_cache=True)
146
145
 
@@ -176,7 +175,6 @@ def interactive(
176
175
  token: Optional[str] = None,
177
176
  no_cache: bool = False,
178
177
  redeem_token: Optional[str] = None,
179
- app_kind: str = "development",
180
178
  registry: Optional[ServiceBuilderRegistry] = None,
181
179
  sync_mode: bool = True,
182
180
  ) -> App:
@@ -193,7 +191,7 @@ def interactive(
193
191
  token=token,
194
192
  no_cache=no_cache,
195
193
  redeem_token=redeem_token,
196
-
194
+ service_registry=registry,
197
195
  )
198
196
 
199
197
  if sync_mode:
@@ -202,7 +200,8 @@ def interactive(
202
200
  # to avoid having to use await for every call. This is the default
203
201
  # behaviour for the app, but can be overwritten by setting
204
202
  # app.koil.sync_in_async = False
205
- app._koil.sync_in_async = True
203
+ if app.__koil:
204
+ app.__koil.sync_in_async = True
206
205
  app.enter()
207
206
 
208
207
  return app
@@ -0,0 +1,29 @@
1
+ import typing
2
+ from rekuest_next.structures.default import get_default_structure_registry
3
+ import subprocess
4
+ import sys
5
+ import webbrowser
6
+ import os
7
+ from rath.scalars import ID
8
+
9
+
10
+ def open_orkestrator_link(link: str):
11
+ webbrowser.open(link)
12
+
13
+
14
+ class IDBearer(typing.Protocol):
15
+ id: ID
16
+
17
+
18
+ def inspect(x: IDBearer) -> None:
19
+ """
20
+ Inspects the given object by opening it in the orkestrator.
21
+
22
+
23
+
24
+ """
25
+ structure_reg = get_default_structure_registry()
26
+
27
+ identifier = structure_reg.get_identifier_for_cls(type(x))
28
+
29
+ open_orkestrator_link(f"orkestrator://{identifier}/{x.id}")
@@ -1,4 +1,3 @@
1
- from typing import Any, Protocol
2
1
  """
3
2
  This module contains the types for the apps
4
3
  depending on the builder used.
@@ -10,8 +9,9 @@ an import exception to the app.
10
9
 
11
10
  """
12
11
 
12
+ from typing import Any, Protocol, cast
13
13
  import logging
14
- from typing import Any, Dict, TYPE_CHECKING
14
+ from typing import Dict, TYPE_CHECKING
15
15
  from koil import unkoil
16
16
  from koil.composition import KoiledModel
17
17
  from arkitekt_next.base_models import Manifest
@@ -26,15 +26,9 @@ if TYPE_CHECKING:
26
26
  logger = logging.getLogger(__name__)
27
27
 
28
28
 
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
29
  class App(Protocol):
37
30
  """An app that is built with the easy builder"""
31
+
38
32
  fakts: Fakts
39
33
  herre: Herre
40
34
  manifest: Manifest
@@ -45,7 +39,7 @@ class App(Protocol):
45
39
  """Get the rekuest service"""
46
40
  if "rekuest" not in self.services:
47
41
  raise ValueError("Rekuest service is not available")
48
- return self.services["rekuest"]
42
+ return cast("RekuestNext", self.services["rekuest"])
49
43
 
50
44
  def run(self):
51
45
  return unkoil(self.rekuest.arun)
@@ -80,5 +74,4 @@ class Builder(Protocol):
80
74
  This protocol defines the methods that a builder class must implement.
81
75
  """
82
76
 
83
- def __call__(self, *args: Any, **kwds: Any) -> Any:
84
- return super().__call__(*args, **kwds)
77
+ def __call__(self, *args: Any, **kwds: Any) -> Any: ...
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: arkitekt-next
3
- Version: 0.12.2
3
+ Version: 0.13.0
4
4
  Summary: client for the arkitekt_next platform
5
5
  Author-email: jhnnsrs <jhnnsrs@gmail.com>
6
6
  License-Expression: MIT
@@ -1,10 +1,11 @@
1
1
  arkitekt_next/__blok__.py,sha256=1u-ggUla503bHMWsnHLOucmUMF4JuHNQRKuG1Vc343Q,1901
2
- arkitekt_next/__init__.py,sha256=HOKaWJpoMBgHx9Xo8WaO6vY-RhF_bQ6aUQh3p5r20B4,3108
2
+ arkitekt_next/__init__.py,sha256=6id-PHkRWAvHSSUpOg9rS7pTKYGherVpCO-Fy_ZVVvE,3205
3
3
  arkitekt_next/base_models.py,sha256=GlxtMcV4YbeY8wkbK943HsIFzB8caEsDOfzJ2EDLJ9s,4247
4
- arkitekt_next/builders.py,sha256=7FsGNpLa9mGhSW9UTAXt1ZJLdlIvbsPy7qQxYD0LEmU,7627
4
+ arkitekt_next/builders.py,sha256=VjVipPc4EIpeHVQPSwfBzxIt1pJMIU8AweYN2WP91Yg,7646
5
5
  arkitekt_next/constants.py,sha256=N_tP85BDHPiOG663wwaEyMWYiUGtL2T_h4wBVPgsSUU,87
6
6
  arkitekt_next/init_registry.py,sha256=RHAHBI1dJNpFrNZRiDxMHBj_p4GLq2Oj0GnY9Vs31os,3230
7
- arkitekt_next/protocols.py,sha256=A5xHlehqaoGNVmA8VFEMNUl8r0CeOJ1OUnlZ2OT_WhE,2061
7
+ arkitekt_next/inspect.py,sha256=iJKyN_9jlrsoEEgl_kMriEZ46uKDNV-vz6PwzqDRE3g,587
8
+ arkitekt_next/protocols.py,sha256=ZZFLOKtLlSjrKX4kWqZC-_C7QqSXN2MyeA8AbD9jfgo,2031
8
9
  arkitekt_next/service_registry.py,sha256=gA7c2JKWqZPme5VatVJWFlX0e8HPcxb2BkzZrBMGPUk,7307
9
10
  arkitekt_next/tqdm.py,sha256=KLGeviRa8iEx89OENMXOuoz8hRDKxDktwG3L8oPlR7I,3415
10
11
  arkitekt_next/utils.py,sha256=7kWfUU4jacD8sKgV2-GsZV547EXYpzDNx_7LnIrb0oU,2454
@@ -143,8 +144,8 @@ arkitekt_next/qt/assets/light/green pulse.gif,sha256=cUd2F3Qlvjb7SnsU-LjGgeLTa8K
143
144
  arkitekt_next/qt/assets/light/orange pulse.gif,sha256=0gDvrRed0mzZZPHB4tP6vptx7myUCAa_hEVGdjRhNy8,94769
144
145
  arkitekt_next/qt/assets/light/pink pulse.gif,sha256=rxd6ZTHSIG9JZuuHhi3jiSB_JYFBZpy7OWUeZETlhQ4,107513
145
146
  arkitekt_next/qt/assets/light/red pulse.gif,sha256=U7WLbZvSl5e-Ob5RmawtlC0Rh9VVHxkjDbGjj7NYVUo,108749
146
- arkitekt_next-0.12.2.dist-info/METADATA,sha256=leA2aYQ9y-YiSz64LTDt4KvMjum64Kas3gU35xktQ2k,5778
147
- arkitekt_next-0.12.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
148
- arkitekt_next-0.12.2.dist-info/entry_points.txt,sha256=IY-mUEDBU6QncqnYw-Ufw5bvNNXjqSlLf1uexZZCJhc,61
149
- arkitekt_next-0.12.2.dist-info/licenses/LICENSE,sha256=YZ2oRjC248t-GpoEyw7J13vwKYNG6zhYMaEAix6EzF0,1089
150
- arkitekt_next-0.12.2.dist-info/RECORD,,
147
+ arkitekt_next-0.13.0.dist-info/METADATA,sha256=VW7ONrep0p_hY3IFfYVm4ag-FAYjBxP9qVxX6MxXiTw,5778
148
+ arkitekt_next-0.13.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
149
+ arkitekt_next-0.13.0.dist-info/entry_points.txt,sha256=IY-mUEDBU6QncqnYw-Ufw5bvNNXjqSlLf1uexZZCJhc,61
150
+ arkitekt_next-0.13.0.dist-info/licenses/LICENSE,sha256=YZ2oRjC248t-GpoEyw7J13vwKYNG6zhYMaEAix6EzF0,1089
151
+ arkitekt_next-0.13.0.dist-info/RECORD,,