arkitekt-next 0.9.4__py3-none-any.whl → 0.10.1__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/__blok__.py +2 -2
- arkitekt_next/__init__.py +38 -37
- arkitekt_next/apps/__init__.py +1 -1
- arkitekt_next/apps/{types.py → protocols.py} +22 -9
- arkitekt_next/apps/service/fakts_next.py +15 -30
- arkitekt_next/base_models.py +3 -3
- arkitekt_next/bloks/admin.py +0 -2
- arkitekt_next/bloks/base.py +2 -0
- arkitekt_next/bloks/channel.py +27 -0
- arkitekt_next/bloks/services/channel.py +12 -0
- arkitekt_next/builders.py +9 -8
- arkitekt_next/cli/commands/call/main.py +2 -1
- arkitekt_next/cli/commands/call/remote.py +4 -1
- arkitekt_next/cli/commands/inspect/requirements.py +3 -8
- arkitekt_next/cli/commands/inspect/templates.py +6 -9
- arkitekt_next/cli/commands/run/dev.py +3 -4
- arkitekt_next/cli/commands/run/utils.py +1 -1
- arkitekt_next/cli/ui.py +2 -4
- arkitekt_next/cli/utils.py +1 -1
- arkitekt_next/constants.py +0 -2
- arkitekt_next/init_registry.py +16 -92
- arkitekt_next/qt/builders.py +2 -2
- arkitekt_next/qt/magic_bar.py +1 -1
- arkitekt_next/qt/types.py +1 -1
- arkitekt_next/service_registry.py +52 -46
- arkitekt_next/tqdm.py +68 -7
- arkitekt_next/utils.py +7 -6
- {arkitekt_next-0.9.4.dist-info → arkitekt_next-0.10.1.dist-info}/METADATA +39 -39
- {arkitekt_next-0.9.4.dist-info → arkitekt_next-0.10.1.dist-info}/RECORD +45 -44
- {arkitekt_next-0.9.4.dist-info → arkitekt_next-0.10.1.dist-info}/WHEEL +1 -1
- arkitekt_next-0.10.1.dist-info/entry_points.txt +2 -0
- arkitekt_next/cli/configs/base.yaml +0 -867
- arkitekt_next-0.9.4.dist-info/entry_points.txt +0 -3
- {arkitekt_next-0.9.4.dist-info → arkitekt_next-0.10.1.dist-info/licenses}/LICENSE +0 -0
arkitekt_next/init_registry.py
CHANGED
|
@@ -1,22 +1,7 @@
|
|
|
1
1
|
import contextvars
|
|
2
2
|
from functools import wraps
|
|
3
|
-
from
|
|
4
|
-
from
|
|
5
|
-
from fakts_next import Fakts
|
|
6
|
-
from .base_models import Manifest, Requirement
|
|
7
|
-
from typing import Callable, Dict, Optional, Protocol, TypeVar, overload
|
|
8
|
-
import importlib
|
|
9
|
-
import sys
|
|
10
|
-
import os
|
|
11
|
-
import traceback
|
|
12
|
-
import logging
|
|
13
|
-
import pkgutil
|
|
14
|
-
from typing import runtime_checkable, TYPE_CHECKING, Any
|
|
15
|
-
|
|
16
|
-
if TYPE_CHECKING:
|
|
17
|
-
from arkitekt_next.apps import App
|
|
18
|
-
else:
|
|
19
|
-
App = Any
|
|
3
|
+
from typing import Callable, Dict, Optional, TypeVar, overload, cast
|
|
4
|
+
from arkitekt_next.apps.protocols import App
|
|
20
5
|
|
|
21
6
|
Params = Dict[str, str]
|
|
22
7
|
|
|
@@ -38,68 +23,10 @@ def get_current_init_hook_registry(allow_global=True):
|
|
|
38
23
|
return current_init_hook_registry.get(get_default_init_hook_registry())
|
|
39
24
|
|
|
40
25
|
|
|
41
|
-
class Registration(BaseModel):
|
|
42
|
-
name: str
|
|
43
|
-
requirement: Requirement
|
|
44
|
-
builder: Callable[[Herre, Fakts, Params], object]
|
|
45
|
-
schema_loader: Callable[[str], object]
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
@runtime_checkable
|
|
49
|
-
class ArkitektService(Protocol):
|
|
50
|
-
|
|
51
|
-
def get_service_name(self):
|
|
52
|
-
pass
|
|
53
|
-
|
|
54
|
-
def build_service(
|
|
55
|
-
self, fakts: Fakts, herre: Herre, params: Params, manifest: Manifest
|
|
56
|
-
):
|
|
57
|
-
pass
|
|
58
|
-
|
|
59
|
-
def get_requirements(self):
|
|
60
|
-
pass
|
|
61
|
-
|
|
62
|
-
def get_graphql_schema(self):
|
|
63
|
-
pass
|
|
64
|
-
|
|
65
|
-
def get_turms_project(self):
|
|
66
|
-
pass
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
class BaseArkitektService:
|
|
70
|
-
|
|
71
|
-
def get_service_name(self):
|
|
72
|
-
raise NotImplementedError("get_service_name not implemented")
|
|
73
|
-
|
|
74
|
-
def build_service(
|
|
75
|
-
self, fakts: Fakts, herre: Herre, params: Params, manifest: Manifest
|
|
76
|
-
):
|
|
77
|
-
raise NotImplementedError("build_service not implemented")
|
|
78
|
-
|
|
79
|
-
def get_requirements(self):
|
|
80
|
-
raise NotImplementedError("get_requirements not implemented")
|
|
81
|
-
|
|
82
|
-
def get_graphql_schema(self):
|
|
83
|
-
return None
|
|
84
|
-
|
|
85
|
-
def get_turms_project(self):
|
|
86
|
-
return None
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
basic_requirements = [
|
|
90
|
-
Requirement(
|
|
91
|
-
key="lok",
|
|
92
|
-
service="live.arkitekt.lok",
|
|
93
|
-
description="An instance of ArkitektNext Lok to authenticate the user",
|
|
94
|
-
)
|
|
95
|
-
]
|
|
96
|
-
|
|
97
|
-
|
|
98
26
|
InitHook = Callable[[App], None]
|
|
99
27
|
|
|
100
28
|
|
|
101
29
|
class InitHookRegisty:
|
|
102
|
-
|
|
103
30
|
def __init__(self):
|
|
104
31
|
self.init_hooks: Dict[str, InitHook] = {}
|
|
105
32
|
|
|
@@ -109,7 +36,6 @@ class InitHookRegisty:
|
|
|
109
36
|
name: Optional[str] = None,
|
|
110
37
|
only_cli: bool = False,
|
|
111
38
|
):
|
|
112
|
-
|
|
113
39
|
if name is None:
|
|
114
40
|
name = function.__name__
|
|
115
41
|
|
|
@@ -123,43 +49,41 @@ class InitHookRegisty:
|
|
|
123
49
|
hook(app)
|
|
124
50
|
|
|
125
51
|
|
|
126
|
-
T = TypeVar("T")
|
|
52
|
+
T = TypeVar("T", bound=InitHook)
|
|
127
53
|
|
|
128
54
|
|
|
129
55
|
@overload
|
|
130
56
|
def init(
|
|
131
|
-
|
|
57
|
+
*func: T,
|
|
132
58
|
) -> T: ...
|
|
133
59
|
|
|
134
60
|
|
|
135
61
|
@overload
|
|
136
62
|
def init(
|
|
137
|
-
|
|
63
|
+
*,
|
|
64
|
+
only_cli: bool = False,
|
|
65
|
+
init_hook_registry: InitHookRegisty | None = None,
|
|
138
66
|
) -> Callable[[T], T]: ...
|
|
139
67
|
|
|
140
68
|
|
|
141
69
|
def init(
|
|
142
|
-
*func,
|
|
70
|
+
*func: T,
|
|
143
71
|
only_cli: bool = False,
|
|
144
|
-
init_hook_registry: InitHookRegisty = None,
|
|
145
|
-
):
|
|
72
|
+
init_hook_registry: InitHookRegisty | None = None,
|
|
73
|
+
) -> T | Callable[[T], T]:
|
|
146
74
|
"""Register a function as an init hook. This function will be called when the app is initialized."""
|
|
147
|
-
init_hook_registry = init_hook_registry or
|
|
75
|
+
init_hook_registry = init_hook_registry or get_default_init_hook_registry()
|
|
148
76
|
|
|
149
77
|
if len(func) > 1:
|
|
150
78
|
raise ValueError("You can only register one function or actor at a time.")
|
|
151
79
|
if len(func) == 1:
|
|
152
80
|
function_or_actor = func[0]
|
|
153
81
|
|
|
154
|
-
|
|
155
|
-
def wrapped_function(*args, **kwargs):
|
|
156
|
-
return function_or_actor(*args, **kwargs)
|
|
157
|
-
|
|
158
|
-
init_hook_registry.register(wrapped_function)
|
|
82
|
+
init_hook_registry.register(function_or_actor)
|
|
159
83
|
|
|
160
|
-
|
|
84
|
+
setattr(function_or_actor, "__is_init_hook__", True)
|
|
161
85
|
|
|
162
|
-
return
|
|
86
|
+
return function_or_actor
|
|
163
87
|
|
|
164
88
|
else:
|
|
165
89
|
|
|
@@ -171,8 +95,8 @@ def init(
|
|
|
171
95
|
|
|
172
96
|
init_hook_registry.register(wrapped_function, only_cli=only_cli)
|
|
173
97
|
|
|
174
|
-
|
|
98
|
+
setattr(function_or_actor, "__is_init_hook__", True)
|
|
175
99
|
|
|
176
100
|
return wrapped_function
|
|
177
101
|
|
|
178
|
-
return real_decorator
|
|
102
|
+
return cast(Callable[[T], T], real_decorator)
|
arkitekt_next/qt/builders.py
CHANGED
|
@@ -5,7 +5,7 @@ from arkitekt_next.apps.service.fakts_qt import build_arkitekt_next_qt_fakts_nex
|
|
|
5
5
|
from arkitekt_next.apps.service.herre_qt import build_arkitekt_next_qt_herre_next
|
|
6
6
|
from arkitekt_next.utils import create_arkitekt_next_folder
|
|
7
7
|
from arkitekt_next.base_models import Manifest
|
|
8
|
-
from arkitekt_next.apps.
|
|
8
|
+
from arkitekt_next.apps.protocols import App
|
|
9
9
|
from arkitekt_next.service_registry import (
|
|
10
10
|
ServiceBuilderRegistry,
|
|
11
11
|
get_default_service_registry,
|
|
@@ -27,7 +27,7 @@ from arkitekt_next.apps.service.fakts_next import (
|
|
|
27
27
|
from arkitekt_next.apps.service.herre import build_arkitekt_next_herre_next
|
|
28
28
|
from arkitekt_next.utils import create_arkitekt_next_folder
|
|
29
29
|
from arkitekt_next.base_models import Manifest
|
|
30
|
-
from arkitekt_next.apps.
|
|
30
|
+
from arkitekt_next.apps.protocols import App
|
|
31
31
|
from arkitekt_next.service_registry import (
|
|
32
32
|
ServiceBuilderRegistry,
|
|
33
33
|
)
|
arkitekt_next/qt/magic_bar.py
CHANGED
|
@@ -3,7 +3,7 @@ from qtpy import QtWidgets, QtGui, QtCore
|
|
|
3
3
|
from arkitekt_next.qt.types import QtApp
|
|
4
4
|
from koil.qt import async_to_qt
|
|
5
5
|
|
|
6
|
-
from arkitekt_next.apps.
|
|
6
|
+
from arkitekt_next.apps.protocols import App
|
|
7
7
|
from .utils import get_image_path
|
|
8
8
|
from typing import Optional, Callable
|
|
9
9
|
import logging
|
arkitekt_next/qt/types.py
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import contextvars
|
|
2
|
-
from functools import wraps
|
|
3
|
-
from pydantic import BaseModel, Field
|
|
4
2
|
from herre_next import Herre
|
|
5
3
|
from fakts_next import Fakts
|
|
4
|
+
from koil.composition.base import KoiledModel
|
|
6
5
|
from .base_models import Manifest, Requirement
|
|
7
|
-
from typing import Callable, Dict, Optional, Protocol, TypeVar, overload
|
|
6
|
+
from typing import Any, Callable, Dict, Optional, Protocol, Set, TypeVar, overload
|
|
8
7
|
from typing import runtime_checkable
|
|
8
|
+
from pydantic import BaseModel
|
|
9
9
|
|
|
10
10
|
Params = Dict[str, str]
|
|
11
11
|
|
|
@@ -16,17 +16,13 @@ current_service_registry = contextvars.ContextVar(
|
|
|
16
16
|
GLOBAL_SERVICE_REGISTRY = None
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
def get_default_service_registry():
|
|
19
|
+
def get_default_service_registry() -> "ServiceBuilderRegistry":
|
|
20
20
|
global GLOBAL_SERVICE_REGISTRY
|
|
21
21
|
if GLOBAL_SERVICE_REGISTRY is None:
|
|
22
22
|
GLOBAL_SERVICE_REGISTRY = ServiceBuilderRegistry()
|
|
23
23
|
return GLOBAL_SERVICE_REGISTRY
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
def get_current_service_registry(allow_global=True):
|
|
27
|
-
return current_service_registry.get(get_default_service_registry())
|
|
28
|
-
|
|
29
|
-
|
|
30
26
|
class Registration(BaseModel):
|
|
31
27
|
name: str
|
|
32
28
|
requirement: Requirement
|
|
@@ -36,42 +32,68 @@ class Registration(BaseModel):
|
|
|
36
32
|
|
|
37
33
|
@runtime_checkable
|
|
38
34
|
class ArkitektService(Protocol):
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
def get_service_name(self) -> str:
|
|
36
|
+
"""Get the service name. This is used to identify the service in the
|
|
37
|
+
service registry. The service name should be unique across all services.
|
|
38
|
+
"""
|
|
39
|
+
...
|
|
42
40
|
|
|
43
41
|
def build_service(
|
|
44
42
|
self, fakts: Fakts, herre: Herre, params: Params, manifest: Manifest
|
|
45
|
-
):
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
43
|
+
) -> Optional[KoiledModel]:
|
|
44
|
+
"""Build the service. This is used to build the service and return
|
|
45
|
+
the service instance. The service instance should be a KoiledModel
|
|
46
|
+
that is used to interact with the service.
|
|
47
|
+
"""
|
|
48
|
+
...
|
|
49
|
+
|
|
50
|
+
def get_requirements(self) -> list[Requirement]:
|
|
51
|
+
"""Get the requirements for the service. This is used to get the
|
|
52
|
+
requirements for the service. The requirements should be a list of
|
|
53
|
+
Requirement objects that are used to identify the service in the
|
|
54
|
+
service registry. The requirements should be unique across all
|
|
55
|
+
"""
|
|
56
|
+
...
|
|
57
|
+
|
|
58
|
+
def get_graphql_schema(self) -> Optional[str]:
|
|
59
|
+
"""Get the GraphQL schema for the service. This is used to get the
|
|
60
|
+
GraphQL schema for the service. The GraphQL schema should be a
|
|
61
|
+
GraphQL schema object that is used to interact with the service.
|
|
62
|
+
"""
|
|
52
63
|
pass
|
|
53
64
|
|
|
54
|
-
def get_turms_project(self):
|
|
65
|
+
def get_turms_project(self) -> Optional[Dict[str, Any]]:
|
|
66
|
+
"""Get the Turms project for the service. This is used to get the
|
|
67
|
+
Turms project for the service. The Turms project should be a
|
|
68
|
+
Turms project object that is used to interact with the service.
|
|
69
|
+
"""
|
|
55
70
|
pass
|
|
56
71
|
|
|
57
72
|
|
|
58
73
|
class BaseArkitektService:
|
|
74
|
+
"""Base class for Arkitekt services. This class is used to define the
|
|
75
|
+
interface for Arkitekt services. It is used to define the service name,
|
|
76
|
+
build the service, and get the requirements for the service."""
|
|
59
77
|
|
|
60
|
-
def get_service_name(self):
|
|
78
|
+
def get_service_name(self) -> str:
|
|
61
79
|
raise NotImplementedError("get_service_name not implemented")
|
|
62
80
|
|
|
63
81
|
def build_service(
|
|
64
82
|
self, fakts: Fakts, herre: Herre, params: Params, manifest: Manifest
|
|
65
|
-
):
|
|
83
|
+
) -> Optional[KoiledModel]:
|
|
66
84
|
raise NotImplementedError("build_service not implemented")
|
|
67
85
|
|
|
68
|
-
def get_requirements(self):
|
|
86
|
+
def get_requirements(self) -> list[Requirement]:
|
|
69
87
|
raise NotImplementedError("get_requirements not implemented")
|
|
70
88
|
|
|
71
|
-
def get_graphql_schema(self):
|
|
89
|
+
def get_graphql_schema(self) -> Optional[str]:
|
|
72
90
|
return None
|
|
73
91
|
|
|
74
|
-
def get_turms_project(self):
|
|
92
|
+
def get_turms_project(self) -> Optional[Dict[str, Any]]:
|
|
93
|
+
"""Get the Turms project for the service. This is used to get the
|
|
94
|
+
Turms project for the service. The Turms project should be a
|
|
95
|
+
Turms project object that is used to interact with the service.
|
|
96
|
+
"""
|
|
75
97
|
return None
|
|
76
98
|
|
|
77
99
|
|
|
@@ -93,7 +115,6 @@ class ServiceBuilderRegistry:
|
|
|
93
115
|
self,
|
|
94
116
|
service: ArkitektService,
|
|
95
117
|
):
|
|
96
|
-
|
|
97
118
|
name = service.get_service_name()
|
|
98
119
|
|
|
99
120
|
if name not in self.service_builders:
|
|
@@ -106,8 +127,8 @@ class ServiceBuilderRegistry:
|
|
|
106
127
|
raise ValueError(f"Requirement {requirement.key} already registered)")
|
|
107
128
|
self.additional_requirements[requirement.key] = requirement
|
|
108
129
|
|
|
109
|
-
def get(self, name):
|
|
110
|
-
return self.
|
|
130
|
+
def get(self, name: str) -> Optional[ArkitektService]:
|
|
131
|
+
return self.service_builders.get(name)
|
|
111
132
|
|
|
112
133
|
def build_service_map(
|
|
113
134
|
self, fakts: Fakts, herre: Herre, params: Params, manifest: Manifest
|
|
@@ -124,7 +145,6 @@ class ServiceBuilderRegistry:
|
|
|
124
145
|
}
|
|
125
146
|
|
|
126
147
|
def get_requirements(self):
|
|
127
|
-
|
|
128
148
|
requirements = [
|
|
129
149
|
Requirement(
|
|
130
150
|
key="lok",
|
|
@@ -132,7 +152,7 @@ class ServiceBuilderRegistry:
|
|
|
132
152
|
description="An instance of ArkitektNext Lok to authenticate the user",
|
|
133
153
|
)
|
|
134
154
|
]
|
|
135
|
-
taken_requirements = set()
|
|
155
|
+
taken_requirements: Set[str] = set()
|
|
136
156
|
|
|
137
157
|
for service in self.service_builders.values():
|
|
138
158
|
for requirement in service.get_requirements():
|
|
@@ -154,31 +174,17 @@ class SetupInfo:
|
|
|
154
174
|
services: Dict[str, object]
|
|
155
175
|
|
|
156
176
|
|
|
157
|
-
import os
|
|
158
|
-
import importlib.util
|
|
159
|
-
import pkgutil
|
|
160
|
-
import traceback
|
|
161
|
-
import logging
|
|
162
|
-
|
|
163
177
|
T = TypeVar("T")
|
|
164
178
|
|
|
165
179
|
|
|
166
|
-
@overload
|
|
167
|
-
def require(
|
|
168
|
-
key: str,
|
|
169
|
-
service: str = None,
|
|
170
|
-
description: str = None,
|
|
171
|
-
) -> Callable[[T], T]: ...
|
|
172
|
-
|
|
173
|
-
|
|
174
180
|
def require(
|
|
175
181
|
key: str,
|
|
176
|
-
service: str
|
|
177
|
-
description: str = None,
|
|
182
|
+
service: str,
|
|
183
|
+
description: str | None = None,
|
|
178
184
|
service_registry: Optional[ServiceBuilderRegistry] = None,
|
|
179
185
|
):
|
|
180
186
|
"""Register a requirement with the service registry"""
|
|
181
|
-
service_hook_registry = service_registry or
|
|
187
|
+
service_hook_registry = service_registry or get_default_service_registry()
|
|
182
188
|
|
|
183
189
|
requirement = Requirement(key=key, service=service, description=description)
|
|
184
190
|
service_hook_registry.register_requirement(requirement)
|
arkitekt_next/tqdm.py
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
"""
|
|
1
|
+
"""Small extension to tqdm that reports progress to arkitekt_next through the
|
|
2
2
|
assignation context"""
|
|
3
3
|
|
|
4
|
+
from typing import Any, Iterable, Mapping, TypeVar
|
|
4
5
|
from tqdm import tqdm as _tqdm
|
|
5
|
-
from rekuest_next.actors.vars import
|
|
6
|
+
from rekuest_next.actors.vars import get_current_assignation_helper
|
|
6
7
|
|
|
8
|
+
T = TypeVar("T")
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
|
|
11
|
+
class tqdm(_tqdm[T]):
|
|
9
12
|
"""A tqdm that reports progress to arkitekt_next through the
|
|
10
13
|
assignation context
|
|
11
14
|
|
|
@@ -18,15 +21,70 @@ class tqdm(_tqdm):
|
|
|
18
21
|
|
|
19
22
|
"""
|
|
20
23
|
|
|
21
|
-
def __init__(
|
|
24
|
+
def __init__(
|
|
25
|
+
self,
|
|
26
|
+
iterable: Iterable[T],
|
|
27
|
+
desc: str | None = None,
|
|
28
|
+
total: float | None = None,
|
|
29
|
+
leave: bool | None = True,
|
|
30
|
+
file: Any | None = None,
|
|
31
|
+
ncols: int | None = None,
|
|
32
|
+
mininterval: float = 0.1,
|
|
33
|
+
maxinterval: float = 10.0,
|
|
34
|
+
miniters: float | None = None,
|
|
35
|
+
ascii: bool | str | None = None,
|
|
36
|
+
disable: bool | None = False,
|
|
37
|
+
unit: str = "it",
|
|
38
|
+
unit_scale: bool | float = False,
|
|
39
|
+
dynamic_ncols: bool = False,
|
|
40
|
+
smoothing: float = 0.3,
|
|
41
|
+
bar_format: str | None = None,
|
|
42
|
+
initial: float = 0,
|
|
43
|
+
position: int | None = None,
|
|
44
|
+
postfix: Mapping[str, object] | str | None = None,
|
|
45
|
+
unit_divisor: float = 1000,
|
|
46
|
+
write_bytes: bool = False,
|
|
47
|
+
lock_args: tuple[bool | None, float | None] | tuple[bool | None] | None = None,
|
|
48
|
+
nrows: int | None = None,
|
|
49
|
+
colour: str | None = None,
|
|
50
|
+
delay: float | None = 0,
|
|
51
|
+
gui: bool = False,
|
|
52
|
+
) -> None:
|
|
22
53
|
"""The tqdm constructor"""
|
|
23
|
-
super().__init__(
|
|
54
|
+
super().__init__(
|
|
55
|
+
iterable,
|
|
56
|
+
desc=desc,
|
|
57
|
+
total=total,
|
|
58
|
+
leave=leave,
|
|
59
|
+
file=file,
|
|
60
|
+
ncols=ncols,
|
|
61
|
+
mininterval=mininterval,
|
|
62
|
+
maxinterval=maxinterval,
|
|
63
|
+
miniters=miniters,
|
|
64
|
+
ascii=ascii,
|
|
65
|
+
disable=disable,
|
|
66
|
+
unit=unit,
|
|
67
|
+
unit_scale=unit_scale,
|
|
68
|
+
dynamic_ncols=dynamic_ncols,
|
|
69
|
+
smoothing=smoothing,
|
|
70
|
+
bar_format=bar_format,
|
|
71
|
+
initial=initial,
|
|
72
|
+
position=position,
|
|
73
|
+
postfix=postfix,
|
|
74
|
+
unit_divisor=unit_divisor,
|
|
75
|
+
write_bytes=write_bytes,
|
|
76
|
+
lock_args=lock_args,
|
|
77
|
+
nrows=nrows,
|
|
78
|
+
colour=colour,
|
|
79
|
+
delay=delay,
|
|
80
|
+
gui=gui,
|
|
81
|
+
)
|
|
24
82
|
|
|
25
|
-
self._assignationhelper =
|
|
83
|
+
self._assignationhelper = get_current_assignation_helper()
|
|
26
84
|
|
|
27
85
|
self.last_arkitekt_next_perc = 0
|
|
28
86
|
|
|
29
|
-
def update(self, *args, **kwargs):
|
|
87
|
+
def update(self, *args: Any, **kwargs: Any):
|
|
30
88
|
"""An update method that reports progress to arkitekt_next through the
|
|
31
89
|
assignation context and the current assignation helper
|
|
32
90
|
|
|
@@ -35,6 +93,9 @@ class tqdm(_tqdm):
|
|
|
35
93
|
The return value of tqdm.update
|
|
36
94
|
"""
|
|
37
95
|
z = super().update(*args, **kwargs)
|
|
96
|
+
|
|
97
|
+
self._assignationhelper = get_current_assignation_helper()
|
|
98
|
+
|
|
38
99
|
if self._assignationhelper:
|
|
39
100
|
if self.last_arkitekt_next_perc + 0.05 < self.last_print_n / self.total:
|
|
40
101
|
self.last_arkitekt_next_perc = self.last_print_n / self.total
|
arkitekt_next/utils.py
CHANGED
|
@@ -43,10 +43,11 @@ def create_arkitekt_next_folder(with_cache: bool = True) -> str:
|
|
|
43
43
|
def create_devcontainer_file(
|
|
44
44
|
manifest: Manifest,
|
|
45
45
|
flavour: str,
|
|
46
|
-
docker_file_path,
|
|
47
|
-
devcontainer_path=".devcontainer",
|
|
46
|
+
docker_file_path: str,
|
|
47
|
+
devcontainer_path: str = ".devcontainer",
|
|
48
48
|
) -> None:
|
|
49
|
-
"""Creates a devcontainer.json file
|
|
49
|
+
"""Creates a devcontainer.json file that matches the docker file
|
|
50
|
+
inside the flavour folder.
|
|
50
51
|
|
|
51
52
|
Parameters
|
|
52
53
|
----------
|
|
@@ -67,9 +68,9 @@ def create_devcontainer_file(
|
|
|
67
68
|
devcontainer_content["build"]["dockerfile"] = os.path.relpath(
|
|
68
69
|
docker_file_path, flavour_container
|
|
69
70
|
)
|
|
70
|
-
devcontainer_content["build"][
|
|
71
|
-
"
|
|
72
|
-
|
|
71
|
+
devcontainer_content["build"]["context"] = (
|
|
72
|
+
"../.." # This is the root of the project
|
|
73
|
+
)
|
|
73
74
|
devcontainer_content["runArgs"] = ["--network=host"]
|
|
74
75
|
|
|
75
76
|
json.dump(devcontainer_content, open(devcontainer_file, "w"), indent=4)
|
|
@@ -1,58 +1,59 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: arkitekt-next
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.10.1
|
|
4
4
|
Summary: client for the arkitekt_next platform
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Requires-Python:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
Author-email: jhnnsrs <jhnnsrs@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Python: <4,>=3.11
|
|
9
|
+
Requires-Dist: click>=8.2.0
|
|
10
|
+
Requires-Dist: dokker>=2.1.2
|
|
11
|
+
Requires-Dist: fakts-next>=1.2.2
|
|
12
|
+
Requires-Dist: herre-next>=1.2.0
|
|
13
|
+
Requires-Dist: koil>=2.0.4
|
|
14
|
+
Requires-Dist: rath>=3.4
|
|
15
15
|
Provides-Extra: all
|
|
16
|
+
Requires-Dist: fluss-next>=0.2.0; extra == 'all'
|
|
17
|
+
Requires-Dist: kabinet>=0.2.0; extra == 'all'
|
|
18
|
+
Requires-Dist: mikro-next>=0.2.0; extra == 'all'
|
|
19
|
+
Requires-Dist: reaktion-next>=0.2.0; extra == 'all'
|
|
20
|
+
Requires-Dist: rekuest-next>=0.3.1; extra == 'all'
|
|
21
|
+
Requires-Dist: rich-click>=1.6.1; extra == 'all'
|
|
22
|
+
Requires-Dist: semver>=3.0.1; extra == 'all'
|
|
23
|
+
Requires-Dist: turms>=0.8.2; extra == 'all'
|
|
24
|
+
Requires-Dist: unlok-next>=0.2.0; extra == 'all'
|
|
25
|
+
Requires-Dist: watchfiles>=0.18.1; extra == 'all'
|
|
16
26
|
Provides-Extra: alpaka
|
|
27
|
+
Requires-Dist: alpaka>=0.2.0; extra == 'alpaka'
|
|
17
28
|
Provides-Extra: blok
|
|
29
|
+
Requires-Dist: blok>=0.1.0; extra == 'blok'
|
|
18
30
|
Provides-Extra: cli
|
|
31
|
+
Requires-Dist: rekuest-next>=0.3.1; extra == 'cli'
|
|
32
|
+
Requires-Dist: turms>=0.8.2; extra == 'cli'
|
|
19
33
|
Provides-Extra: elektro
|
|
34
|
+
Requires-Dist: elektro>=0.5.0; extra == 'elektro'
|
|
20
35
|
Provides-Extra: extended
|
|
36
|
+
Requires-Dist: alpaka>=0.2.0; extra == 'extended'
|
|
37
|
+
Requires-Dist: kraph>=0.2.0; extra == 'extended'
|
|
21
38
|
Provides-Extra: fluss
|
|
39
|
+
Requires-Dist: fluss-next>=0.2.0; extra == 'fluss'
|
|
22
40
|
Provides-Extra: kabinet
|
|
41
|
+
Requires-Dist: kabinet>=0.4.0; extra == 'kabinet'
|
|
23
42
|
Provides-Extra: kraph
|
|
43
|
+
Requires-Dist: kraph>=0.2.0; extra == 'kraph'
|
|
24
44
|
Provides-Extra: lovekit
|
|
45
|
+
Requires-Dist: lovekit>=0.2.0; extra == 'lovekit'
|
|
25
46
|
Provides-Extra: mikro
|
|
47
|
+
Requires-Dist: mikro-next>=0.3.1; extra == 'mikro'
|
|
26
48
|
Provides-Extra: reaktion
|
|
49
|
+
Requires-Dist: reaktion-next>=0.2.0; extra == 'reaktion'
|
|
27
50
|
Provides-Extra: rekuest
|
|
28
|
-
|
|
51
|
+
Requires-Dist: rekuest-next>=0.6.0; extra == 'rekuest'
|
|
29
52
|
Provides-Extra: unlok
|
|
30
|
-
Requires-Dist:
|
|
31
|
-
Requires-Dist: blok (>=0.1.0) ; (python_version >= "3.9" and python_version < "4.0") and (extra == "blok")
|
|
32
|
-
Requires-Dist: cryptography (>=40.0.8) ; (python_version >= "3.9") and (extra == "blok")
|
|
33
|
-
Requires-Dist: dokker (>=1.0.0)
|
|
34
|
-
Requires-Dist: elektro (>=0.5.0) ; (python_version >= "3.9") and (extra == "elektro")
|
|
35
|
-
Requires-Dist: fakts-next (>=1.1.0)
|
|
36
|
-
Requires-Dist: fluss-next (>=0.2.0) ; (python_version >= "3.9") and (extra == "fluss" or extra == "all")
|
|
37
|
-
Requires-Dist: herre-next (>=1.1.0)
|
|
38
|
-
Requires-Dist: kabinet (>=0.2.0) ; (python_version >= "3.9" and python_version < "4.0") and (extra == "kabinet" or extra == "all")
|
|
39
|
-
Requires-Dist: koil (>=1.0.3)
|
|
40
|
-
Requires-Dist: kraph (>=0.2.0) ; (python_version >= "3.9") and (extra == "kraph" or extra == "extended")
|
|
41
|
-
Requires-Dist: lovekit (>=0.2.0) ; (python_version >= "3.10") and (extra == "lovekit" or extra == "stream")
|
|
42
|
-
Requires-Dist: mikro-next (>=0.2.0) ; (python_version >= "3.11" and python_version < "4.0") and (extra == "mikro" or extra == "all")
|
|
43
|
-
Requires-Dist: namegenerator (>=1.0.6) ; (python_version >= "3.9") and (extra == "blok")
|
|
44
|
-
Requires-Dist: netifaces (>=0.11.0) ; (python_version >= "3.9") and (extra == "blok")
|
|
45
|
-
Requires-Dist: rath (>=1.1.1)
|
|
46
|
-
Requires-Dist: reaktion-next (>=0.2.0) ; (python_version >= "3.9") and (extra == "reaktion" or extra == "all")
|
|
47
|
-
Requires-Dist: rekuest-next (>=0.3.1) ; (python_version >= "3.9") and (extra == "cli" or extra == "rekuest" or extra == "all")
|
|
48
|
-
Requires-Dist: rich-click (>=1.6.1) ; extra == "cli" or extra == "all" or extra == "blok"
|
|
49
|
-
Requires-Dist: semver (>=3.0.1) ; extra == "cli" or extra == "all"
|
|
50
|
-
Requires-Dist: turms (>=0.8.2) ; (python_version >= "3.9") and (extra == "cli" or extra == "all")
|
|
51
|
-
Requires-Dist: unlok-next (>=0.2.0) ; (python_version >= "3.9") and (extra == "unlok" or extra == "all")
|
|
52
|
-
Requires-Dist: watchfiles (>=0.18.1) ; extra == "cli" or extra == "all"
|
|
53
|
+
Requires-Dist: unlok-next>=0.2.0; extra == 'unlok'
|
|
53
54
|
Description-Content-Type: text/markdown
|
|
54
55
|
|
|
55
|
-
#
|
|
56
|
+
# arkitekt-next
|
|
56
57
|
|
|
57
58
|
[](https://codecov.io/gh/jhnnsrs/arkitekt_next)
|
|
58
59
|
[](https://pypi.org/project/arkitekt_next/)
|
|
@@ -65,7 +66,7 @@ streaming analysis for mikroscopy
|
|
|
65
66
|
|
|
66
67
|
## Idea
|
|
67
68
|
|
|
68
|
-
|
|
69
|
+
arkitekt-next is the python client for the arkitekt_next platform. It allows you to utilize the full extent of the platform from your python code.
|
|
69
70
|
To understand the idea behind arkitekt_next, you need to understand the idea behind the arkitekt_next platform.
|
|
70
71
|
(More on this in the [documentation](https://arkitekt.live))
|
|
71
72
|
|
|
@@ -169,4 +170,3 @@ def complex_call(x: ComplexStrucuture) -> int:
|
|
|
169
170
|
```
|
|
170
171
|
|
|
171
172
|
Check out the arkitekt_next [documentation](https://arkitekt.live) for usage of this libary
|
|
172
|
-
|