arkitekt-next 0.23.0__tar.gz → 0.25.0__tar.gz
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-0.23.0 → arkitekt_next-0.25.0}/PKG-INFO +6 -6
- arkitekt_next-0.25.0/arkitekt_next/pytest/__init__.py +1 -0
- arkitekt_next-0.25.0/arkitekt_next/pytest/fixtures.py +86 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/qt/builders.py +34 -19
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/qt/types.py +31 -24
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/pyproject.toml +12 -9
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/.gitignore +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/LICENSE +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/README.md +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/__init__.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/app/__init__.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/app/app.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/app/fakts.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/builders.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/__init__.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/call/__init__.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/call/local.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/call/main.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/call/remote.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/gen/__init__.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/gen/compile.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/gen/init.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/gen/main.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/gen/watch.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/init/__init__.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/init/main.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/inspect/__init__.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/inspect/implementations.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/inspect/main.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/inspect/requirements.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/inspect/variables.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/kabinet/__init__.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/kabinet/build.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/kabinet/init.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/kabinet/io.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/kabinet/main.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/kabinet/publish.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/kabinet/stage.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/kabinet/types.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/kabinet/utils.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/kabinet/validate.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/manifest/__init__.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/manifest/inspect.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/manifest/main.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/manifest/scopes.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/manifest/version.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/run/__init__.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/run/dev.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/run/main.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/run/prod.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/run/utils.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/constants.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/dockerfiles/vanilla.dockerfile +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/errors.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/inspect.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/io.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/main.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/options.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/fluss.schema.graphql +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/gucker.schema.graphql +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/kabinet.schema.graphql +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/kluster.schema.graphql +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/konviktion.schema.graphql +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/kuay.schema.graphql +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/mikro.schema.graphql +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/mikro_next.schema.graphql +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/napari.schema.graphql +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/omero_ark.schema.graphql +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/port.schema.graphql +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/rekuest.schema.graphql +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/rekuest_next.schema.graphql +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/unlok.schema.graphql +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/templates/filter.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/templates/simple.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/texts.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/types.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/ui.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/utils.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/validators.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/vars.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/versions/v1.yaml +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/constants.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/init_registry.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/inspect.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/protocols.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/py.typed +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/qt/__init__.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/qt/assets/dark/gear.png +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/qt/assets/dark/green pulse.gif +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/qt/assets/dark/orange pulse.gif +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/qt/assets/dark/pink pulse.gif +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/qt/assets/dark/red pulse.gif +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/qt/assets/light/gear.png +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/qt/assets/light/green pulse.gif +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/qt/assets/light/orange pulse.gif +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/qt/assets/light/pink pulse.gif +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/qt/assets/light/red pulse.gif +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/qt/magic_bar.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/qt/utils.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/service_registry.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/tqdm.py +0 -0
- {arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: arkitekt-next
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.25.0
|
|
4
4
|
Summary: client for the arkitekt_next platform
|
|
5
5
|
Author-email: jhnnsrs <jhnnsrs@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -8,14 +8,14 @@ License-File: LICENSE
|
|
|
8
8
|
Requires-Python: <4,>=3.11
|
|
9
9
|
Requires-Dist: click>=8.2.0
|
|
10
10
|
Requires-Dist: dokker>=2.3.0
|
|
11
|
-
Requires-Dist: fakts-next>=2.
|
|
11
|
+
Requires-Dist: fakts-next>=2.2.0
|
|
12
12
|
Requires-Dist: kabinet>=0.7.0
|
|
13
|
-
Requires-Dist: koil>=2.0.
|
|
14
|
-
Requires-Dist: rath>=3.
|
|
15
|
-
Requires-Dist: rekuest-next>=0.
|
|
13
|
+
Requires-Dist: koil>=2.0.5
|
|
14
|
+
Requires-Dist: rath>=3.7.0
|
|
15
|
+
Requires-Dist: rekuest-next>=0.15.0
|
|
16
16
|
Requires-Dist: rich-click>=1.8.8
|
|
17
17
|
Requires-Dist: semver>=3.0.4
|
|
18
|
-
Requires-Dist: turms>=0.
|
|
18
|
+
Requires-Dist: turms>=0.10.0
|
|
19
19
|
Requires-Dist: watchfiles>=1.0.5
|
|
20
20
|
Provides-Extra: all
|
|
21
21
|
Requires-Dist: fluss-next>=0.2.0; extra == 'all'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .fixtures import *
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
from typing import Generator
|
|
2
|
+
import pytest
|
|
3
|
+
from arkitekt_next.cli.main import cli
|
|
4
|
+
from click.testing import CliRunner
|
|
5
|
+
from arkitekt_server.create import temp_server, ArkitektServerConfig
|
|
6
|
+
from dokker import Deployment
|
|
7
|
+
from dataclasses import dataclass
|
|
8
|
+
from arkitekt_next.app import App
|
|
9
|
+
from fakts_next.grants.remote import FaktsEndpoint
|
|
10
|
+
from arkitekt_next import easy
|
|
11
|
+
from dokker import local
|
|
12
|
+
|
|
13
|
+
from arkitekt_next.service_registry import get_default_service_registry
|
|
14
|
+
import pytest
|
|
15
|
+
|
|
16
|
+
def pytest_addoption(parser: pytest.Parser) -> None:
|
|
17
|
+
"""Register custom command line options for pytest."""
|
|
18
|
+
parser.addoption(
|
|
19
|
+
"--test-against",
|
|
20
|
+
action="store",
|
|
21
|
+
default="temp",
|
|
22
|
+
help="Base URL of the Arkitekt server to use in tests",
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@pytest.fixture(scope="session")
|
|
27
|
+
def running_server(request: pytest.FixtureRequest) -> Generator[Deployment, None, None]:
|
|
28
|
+
""" Generates a local Arkitekt server deployment for testing purposes. """
|
|
29
|
+
|
|
30
|
+
if not request.config.getoption("--test-against") == "temp":
|
|
31
|
+
raise ValueError("Invalid test environment specified. Currently only 'temp' is supported.")
|
|
32
|
+
|
|
33
|
+
config = ArkitektServerConfig()
|
|
34
|
+
|
|
35
|
+
with temp_server() as temp_path:
|
|
36
|
+
|
|
37
|
+
setup = local(temp_path / "docker-compose.yaml")
|
|
38
|
+
|
|
39
|
+
setup.add_health_check(
|
|
40
|
+
url=lambda spec: f"http://localhost:{spec.find_service('gateway').get_port_for_internal(80).published}/lok/ht",
|
|
41
|
+
service="lok",
|
|
42
|
+
timeout=5,
|
|
43
|
+
max_retries=10,
|
|
44
|
+
)
|
|
45
|
+
with setup as setup:
|
|
46
|
+
setup.down()
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
setup.up()
|
|
50
|
+
|
|
51
|
+
setup.check_health()
|
|
52
|
+
yield setup
|
|
53
|
+
setup.down()
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
@dataclass
|
|
58
|
+
class EasyApp:
|
|
59
|
+
"""Dataclass to hold the Arkitekt server deployment."""
|
|
60
|
+
deployment: Deployment
|
|
61
|
+
app: App
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
@pytest.fixture(scope="session")
|
|
65
|
+
def test_app(running_server: Deployment) -> Generator[EasyApp, None, None]:
|
|
66
|
+
"""Fixture to ensure the Arkitekt server is running."""
|
|
67
|
+
|
|
68
|
+
async def device_code_hook(endpoint: FaktsEndpoint, device_code: str):
|
|
69
|
+
|
|
70
|
+
await running_server.arun(
|
|
71
|
+
"lok", f"uv run python manage.py validatecode {device_code} --user demo --org arkitektio"
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
registry = get_default_service_registry()
|
|
76
|
+
|
|
77
|
+
assert registry, "Service registry must be initialized"
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
with easy(url=f"http://localhost:{running_server.spec.find_service('gateway').get_port_for_internal(80).published}", device_code_hook=device_code_hook) as app:
|
|
82
|
+
|
|
83
|
+
yield EasyApp(
|
|
84
|
+
deployment=running_server,
|
|
85
|
+
app=app
|
|
86
|
+
)
|
|
@@ -1,38 +1,41 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
import os
|
|
3
|
+
from typing import List, Optional
|
|
4
|
+
|
|
5
|
+
from qtpy import QtWidgets, QtCore
|
|
6
|
+
|
|
1
7
|
from arkitekt_next.app.fakts import (
|
|
2
8
|
build_device_code_fakts,
|
|
3
9
|
build_redeem_fakts,
|
|
4
10
|
build_token_fakts,
|
|
5
11
|
)
|
|
6
|
-
from arkitekt_next.
|
|
7
|
-
from
|
|
12
|
+
from arkitekt_next.constants import DEFAULT_ARKITEKT_URL
|
|
13
|
+
from arkitekt_next.init_registry import InitHookRegistry, get_default_init_hook_registry
|
|
14
|
+
from arkitekt_next.qt.types import QtApp
|
|
8
15
|
from arkitekt_next.service_registry import (
|
|
9
16
|
ServiceBuilderRegistry,
|
|
10
17
|
get_default_service_registry,
|
|
11
18
|
)
|
|
12
|
-
from arkitekt_next.
|
|
13
|
-
from
|
|
14
|
-
from typing import List, Optional
|
|
15
|
-
import os
|
|
16
|
-
import logging
|
|
17
|
-
from arkitekt_next.qt.types import QtApp
|
|
19
|
+
from arkitekt_next.utils import create_arkitekt_next_folder
|
|
20
|
+
from fakts_next.models import Manifest
|
|
18
21
|
|
|
19
22
|
|
|
20
23
|
def qt(
|
|
21
|
-
identifier: str,
|
|
24
|
+
identifier: str | None = None,
|
|
22
25
|
version: str = "0.0.1",
|
|
23
26
|
logo: Optional[str] = None,
|
|
24
27
|
scopes: Optional[List[str]] = None,
|
|
25
28
|
url: str = DEFAULT_ARKITEKT_URL,
|
|
26
|
-
headless: bool = False,
|
|
27
29
|
log_level: str = "ERROR",
|
|
28
|
-
parent: Optional[
|
|
30
|
+
parent: Optional[QtCore.QObject] = None,
|
|
29
31
|
token: Optional[str] = None,
|
|
30
32
|
no_cache: bool = False,
|
|
31
33
|
redeem_token: Optional[str] = None,
|
|
32
34
|
app_kind: str = "development",
|
|
33
|
-
|
|
35
|
+
service_registry: Optional[ServiceBuilderRegistry] = None,
|
|
34
36
|
description: Optional[str] = None,
|
|
35
|
-
|
|
37
|
+
instance_id: str = "main",
|
|
38
|
+
init_hook_registry: Optional[InitHookRegistry] = None,
|
|
36
39
|
) -> QtApp:
|
|
37
40
|
"""Creates a next app
|
|
38
41
|
|
|
@@ -100,7 +103,11 @@ def qt(
|
|
|
100
103
|
NextApp
|
|
101
104
|
A built app, that can be used to interact with the ArkitektNext server
|
|
102
105
|
"""
|
|
103
|
-
|
|
106
|
+
service_registry = service_registry or get_default_service_registry()
|
|
107
|
+
init_hook_registry = init_hook_registry or get_default_init_hook_registry()
|
|
108
|
+
|
|
109
|
+
if identifier is None:
|
|
110
|
+
identifier = __file__.split("/")[-1].replace(".py", "")
|
|
104
111
|
|
|
105
112
|
url = os.getenv("FAKTS_URL", url)
|
|
106
113
|
token = os.getenv("FAKTS_TOKEN", token)
|
|
@@ -110,9 +117,9 @@ def qt(
|
|
|
110
117
|
identifier=identifier,
|
|
111
118
|
scopes=scopes if scopes else ["openid"],
|
|
112
119
|
logo=logo,
|
|
113
|
-
requirements=
|
|
114
|
-
description=description,
|
|
120
|
+
requirements=service_registry.get_requirements(),
|
|
115
121
|
)
|
|
122
|
+
|
|
116
123
|
if token:
|
|
117
124
|
fakts_next = build_token_fakts(
|
|
118
125
|
manifest=manifest,
|
|
@@ -122,16 +129,21 @@ def qt(
|
|
|
122
129
|
|
|
123
130
|
elif redeem_token:
|
|
124
131
|
fakts_next = build_redeem_fakts(
|
|
125
|
-
manifest=manifest,
|
|
132
|
+
manifest=manifest,
|
|
133
|
+
redeem_token=redeem_token,
|
|
134
|
+
url=url,
|
|
126
135
|
)
|
|
127
136
|
else:
|
|
128
137
|
fakts_next = build_device_code_fakts(
|
|
129
138
|
manifest=manifest,
|
|
130
139
|
url=url,
|
|
131
140
|
no_cache=no_cache,
|
|
141
|
+
headless=False,
|
|
132
142
|
)
|
|
133
143
|
|
|
134
|
-
params =
|
|
144
|
+
params = {
|
|
145
|
+
"instance_id": instance_id,
|
|
146
|
+
}
|
|
135
147
|
|
|
136
148
|
create_arkitekt_next_folder(with_cache=True)
|
|
137
149
|
|
|
@@ -143,10 +155,13 @@ def qt(
|
|
|
143
155
|
logging.basicConfig(level=log_level)
|
|
144
156
|
|
|
145
157
|
app = QtApp(
|
|
158
|
+
parent=parent,
|
|
146
159
|
fakts=fakts_next,
|
|
147
|
-
services=
|
|
160
|
+
services=service_registry.build_service_map(fakts=fakts_next, params=params),
|
|
148
161
|
)
|
|
149
162
|
|
|
163
|
+
init_hook_registry.run_all(app)
|
|
164
|
+
|
|
150
165
|
app.enter()
|
|
151
166
|
|
|
152
167
|
return app
|
|
@@ -1,26 +1,20 @@
|
|
|
1
1
|
from arkitekt_next.app.app import App
|
|
2
|
-
from typing import
|
|
2
|
+
from typing import Callable, TypeVar, ParamSpec, Any, Optional, Type
|
|
3
|
+
from types import TracebackType
|
|
4
|
+
from koil.qt import async_to_qt
|
|
5
|
+
from koil import run_spawned
|
|
6
|
+
from qtpy import QtCore
|
|
7
|
+
|
|
8
|
+
R = TypeVar("R")
|
|
9
|
+
P = ParamSpec("P")
|
|
3
10
|
|
|
4
11
|
|
|
5
12
|
class QtApp(App):
|
|
6
13
|
"""An app that is built with the easy builder"""
|
|
7
14
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"on_error": [],
|
|
12
|
-
"on_message": [],
|
|
13
|
-
"on_warning": [],
|
|
14
|
-
"on_info": [],
|
|
15
|
-
"on_debug": [],
|
|
16
|
-
"on_enter": [],
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
def register_hook(self, hook_name: str, hook: Callable):
|
|
20
|
-
"""Register a hook"""
|
|
21
|
-
self.hooks[hook_name].append(hook)
|
|
22
|
-
|
|
23
|
-
def register(self, *args, **kwargs):
|
|
15
|
+
parent: QtCore.QObject
|
|
16
|
+
|
|
17
|
+
def register(self, *args: Any, **kwargs: Any) -> None:
|
|
24
18
|
"""Register a function with the app (not in the Qt event loop)
|
|
25
19
|
|
|
26
20
|
This is useful for functions that do not need access to the Qt event loop
|
|
@@ -31,7 +25,7 @@ class QtApp(App):
|
|
|
31
25
|
"""
|
|
32
26
|
self.services["rekuest"].register(*args, **kwargs)
|
|
33
27
|
|
|
34
|
-
def register_in_qt_loop(self, function: Callable, **kwargs):
|
|
28
|
+
def register_in_qt_loop(self, function: Callable[..., Any], **kwargs: Any):
|
|
35
29
|
"""Register a function in the Qt event loop
|
|
36
30
|
|
|
37
31
|
This is useful for functions that need to be resolved in the Qt event loop and are
|
|
@@ -40,13 +34,13 @@ class QtApp(App):
|
|
|
40
34
|
|
|
41
35
|
"""
|
|
42
36
|
|
|
43
|
-
from rekuest_next.qt.builders import qtinloopactifier
|
|
37
|
+
from rekuest_next.qt.builders import qtinloopactifier # type: ignore
|
|
44
38
|
|
|
45
39
|
return self.services["rekuest"].register(
|
|
46
40
|
function, actifier=qtinloopactifier, **kwargs
|
|
47
41
|
)
|
|
48
42
|
|
|
49
|
-
def register_with_qt_future(self, function: Callable, **kwargs):
|
|
43
|
+
def register_with_qt_future(self, function: Callable[..., Any], **kwargs: Any):
|
|
50
44
|
"""Register a function with a future that can be resolved in the Qt event loop
|
|
51
45
|
|
|
52
46
|
This is useful for functions that need to be resolved in the Qt event loop, but
|
|
@@ -90,19 +84,27 @@ class QtApp(App):
|
|
|
90
84
|
|
|
91
85
|
|
|
92
86
|
"""
|
|
93
|
-
from rekuest_next.qt.builders import qtwithfutureactifier
|
|
87
|
+
from rekuest_next.qt.builders import qtwithfutureactifier # type: ignore
|
|
94
88
|
|
|
95
89
|
return self.services["rekuest"].register(
|
|
96
90
|
function, actifier=qtwithfutureactifier, **kwargs
|
|
97
91
|
)
|
|
98
92
|
|
|
99
|
-
def register_with_qt_generator(self, function: Callable, **kwargs):
|
|
100
|
-
from rekuest_next.qt.builders import qtwithgeneratoractifier
|
|
93
|
+
def register_with_qt_generator(self, function: Callable[..., Any], **kwargs: Any):
|
|
94
|
+
from rekuest_next.qt.builders import qtwithgeneratoractifier # type: ignore
|
|
101
95
|
|
|
102
96
|
return self.services["rekuest"].register(
|
|
103
97
|
function, actifier=qtwithgeneratoractifier, **kwargs
|
|
104
98
|
)
|
|
105
99
|
|
|
100
|
+
def wrap(self, function: Callable[P, R]) -> async_to_qt[R, P]:
|
|
101
|
+
""" """
|
|
102
|
+
|
|
103
|
+
async def wrappable(*args: P.args, **kwargs: P.kwargs) -> R:
|
|
104
|
+
return await run_spawned(function, *args, **kwargs)
|
|
105
|
+
|
|
106
|
+
return async_to_qt(wrappable, parent=self.parent)
|
|
107
|
+
|
|
106
108
|
def run(self):
|
|
107
109
|
"""Run the app"""
|
|
108
110
|
self.services["rekuest"].run()
|
|
@@ -114,6 +116,11 @@ class QtApp(App):
|
|
|
114
116
|
|
|
115
117
|
return self
|
|
116
118
|
|
|
117
|
-
async def __aexit__(
|
|
119
|
+
async def __aexit__(
|
|
120
|
+
self,
|
|
121
|
+
exc_type: Optional[Type[BaseException]],
|
|
122
|
+
exc_value: Optional[BaseException],
|
|
123
|
+
traceback: Optional[TracebackType],
|
|
124
|
+
) -> None:
|
|
118
125
|
for service in self.services.values():
|
|
119
126
|
await service.__aexit__(exc_type, exc_value, traceback)
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "arkitekt-next"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.25.0"
|
|
4
4
|
description = "client for the arkitekt_next platform"
|
|
5
5
|
authors = [{ name = "jhnnsrs", email = "jhnnsrs@gmail.com" }]
|
|
6
6
|
requires-python = ">=3.11,<4"
|
|
7
7
|
readme = "README.md"
|
|
8
8
|
license = "MIT"
|
|
9
9
|
dependencies = [
|
|
10
|
-
"fakts-next>=2.
|
|
10
|
+
"fakts-next>=2.2.0",
|
|
11
11
|
"dokker>=2.3.0",
|
|
12
|
-
"koil>=2.0.
|
|
13
|
-
"rath>=3.
|
|
12
|
+
"koil>=2.0.5",
|
|
13
|
+
"rath>=3.7.0",
|
|
14
14
|
"click>=8.2.0",
|
|
15
|
-
"rekuest-next>=0.
|
|
15
|
+
"rekuest-next>=0.15.0",
|
|
16
16
|
"kabinet>=0.7.0",
|
|
17
17
|
"semver>=3.0.4",
|
|
18
18
|
"rich-click>=1.8.8",
|
|
19
19
|
"watchfiles>=1.0.5",
|
|
20
|
-
"turms>=0.
|
|
20
|
+
"turms>=0.10.0",
|
|
21
21
|
]
|
|
22
22
|
|
|
23
23
|
[project.optional-dependencies]
|
|
@@ -56,6 +56,9 @@ blok = [
|
|
|
56
56
|
[project.scripts]
|
|
57
57
|
arkitekt-next = "arkitekt_next.cli.main:cli"
|
|
58
58
|
|
|
59
|
+
[project.entry-points.pytest11]
|
|
60
|
+
arkitekt_next = "arkitekt_next.pytest"
|
|
61
|
+
|
|
59
62
|
[tool.uv]
|
|
60
63
|
dev-dependencies = [
|
|
61
64
|
"autoflake>=1.7.7,<2",
|
|
@@ -64,7 +67,7 @@ dev-dependencies = [
|
|
|
64
67
|
"pytest-cov>=4.0.0,<5",
|
|
65
68
|
"pytest-aiohttp>=1.0.4,<2",
|
|
66
69
|
"rich-click>=1.8",
|
|
67
|
-
"mikro-next>=0.
|
|
70
|
+
"mikro-next>=0.13.0",
|
|
68
71
|
"python-semantic-release>=9.21.1",
|
|
69
72
|
"qtpy>=2.4.3",
|
|
70
73
|
"arkitekt-server>=1.3",
|
|
@@ -73,11 +76,11 @@ dev-dependencies = [
|
|
|
73
76
|
"rekuest-next>=0.13.1",
|
|
74
77
|
"kabinet>=0.6.0",
|
|
75
78
|
"alpaka>=0.4.0",
|
|
76
|
-
"kraph>=0.
|
|
79
|
+
"kraph>=0.4.0",
|
|
77
80
|
"fluss-next>=0.7.0",
|
|
78
81
|
"lovekit>=1.1.0",
|
|
79
82
|
"unlok-next>=1.1.1",
|
|
80
|
-
"reaktion-next>=0.
|
|
83
|
+
"reaktion-next>=0.4.0",
|
|
81
84
|
]
|
|
82
85
|
|
|
83
86
|
[tool.hatch.build.targets.sdist]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/inspect/__init__.py
RENAMED
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/inspect/implementations.py
RENAMED
|
File without changes
|
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/inspect/requirements.py
RENAMED
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/inspect/variables.py
RENAMED
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/kabinet/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/kabinet/validate.py
RENAMED
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/manifest/__init__.py
RENAMED
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/manifest/inspect.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/commands/manifest/version.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/dockerfiles/vanilla.dockerfile
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/fluss.schema.graphql
RENAMED
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/gucker.schema.graphql
RENAMED
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/kabinet.schema.graphql
RENAMED
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/kluster.schema.graphql
RENAMED
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/konviktion.schema.graphql
RENAMED
|
File without changes
|
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/mikro.schema.graphql
RENAMED
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/mikro_next.schema.graphql
RENAMED
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/napari.schema.graphql
RENAMED
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/omero_ark.schema.graphql
RENAMED
|
File without changes
|
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/rekuest.schema.graphql
RENAMED
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/rekuest_next.schema.graphql
RENAMED
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/cli/schemas/unlok.schema.graphql
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{arkitekt_next-0.23.0 → arkitekt_next-0.25.0}/arkitekt_next/qt/assets/light/orange pulse.gif
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|