arkitekt-next 0.8.25__py3-none-any.whl → 0.8.27__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/apps/service/fakts_next.py +3 -3
- arkitekt_next/base_models.py +28 -2
- arkitekt_next/service_registry.py +9 -6
- {arkitekt_next-0.8.25.dist-info → arkitekt_next-0.8.27.dist-info}/METADATA +3 -3
- {arkitekt_next-0.8.25.dist-info → arkitekt_next-0.8.27.dist-info}/RECORD +8 -8
- {arkitekt_next-0.8.25.dist-info → arkitekt_next-0.8.27.dist-info}/LICENSE +0 -0
- {arkitekt_next-0.8.25.dist-info → arkitekt_next-0.8.27.dist-info}/WHEEL +0 -0
- {arkitekt_next-0.8.25.dist-info → arkitekt_next-0.8.27.dist-info}/entry_points.txt +0 -0
|
@@ -46,7 +46,7 @@ def build_arkitekt_next_fakts_next(
|
|
|
46
46
|
),
|
|
47
47
|
cache=FileCache(
|
|
48
48
|
cache_file=f".arkitekt_next/cache/{identifier}-{version}_fakts_cache.json",
|
|
49
|
-
hash=manifest.hash(),
|
|
49
|
+
hash=manifest.hash() + url,
|
|
50
50
|
skip_cache=no_cache,
|
|
51
51
|
),
|
|
52
52
|
)
|
|
@@ -71,7 +71,7 @@ def build_arkitekt_next_redeem_fakts_next(
|
|
|
71
71
|
),
|
|
72
72
|
cache=FileCache(
|
|
73
73
|
cache_file=f".arkitekt_next/cache/{identifier}-{version}_fakts_cache.json",
|
|
74
|
-
hash=manifest.hash(),
|
|
74
|
+
hash=manifest.hash() + url,
|
|
75
75
|
),
|
|
76
76
|
)
|
|
77
77
|
|
|
@@ -92,6 +92,6 @@ def build_arkitekt_next_token_fakts_next(
|
|
|
92
92
|
),
|
|
93
93
|
cache=FileCache(
|
|
94
94
|
cache_file=f".arkitekt_next/cache/{identifier}-{version}_fakts_cache.json",
|
|
95
|
-
hash=manifest.hash(),
|
|
95
|
+
hash=manifest.hash() + url,
|
|
96
96
|
),
|
|
97
97
|
)
|
arkitekt_next/base_models.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""Models for ArkitektNext. Thiese include extensiosn for the Fakts Manifest and the User model."""
|
|
2
2
|
|
|
3
3
|
from hashlib import sha256
|
|
4
|
+
import json
|
|
4
5
|
from pydantic import BaseModel, Field, field_validator
|
|
5
6
|
from typing import List, Optional
|
|
6
7
|
|
|
@@ -92,8 +93,33 @@ class Manifest(BaseModel):
|
|
|
92
93
|
extra = "forbid"
|
|
93
94
|
|
|
94
95
|
def hash(self):
|
|
95
|
-
"""Hash the manifest
|
|
96
|
-
|
|
96
|
+
"""Hash the manifest
|
|
97
|
+
|
|
98
|
+
A manifest describes all the metadata of an app. This method
|
|
99
|
+
hashes the manifest to create a unique hash for the current configuration of the app.
|
|
100
|
+
This hash can be used to check if the app has changed since the last time it was run,
|
|
101
|
+
and can be used to invalidate caches.
|
|
102
|
+
|
|
103
|
+
Returns:
|
|
104
|
+
str: The hash of the manifest
|
|
105
|
+
|
|
106
|
+
"""
|
|
107
|
+
|
|
108
|
+
unsorted_dict = self.model_dump()
|
|
109
|
+
|
|
110
|
+
# sort the requirements
|
|
111
|
+
unsorted_dict["requirements"] = sorted(
|
|
112
|
+
unsorted_dict["requirements"], key=lambda x: x["key"]
|
|
113
|
+
)
|
|
114
|
+
# sort the scopes
|
|
115
|
+
unsorted_dict["scopes"] = sorted(unsorted_dict["scopes"])
|
|
116
|
+
|
|
117
|
+
# JSON encode the dictionary
|
|
118
|
+
json_dd = json.dumps(unsorted_dict, sort_keys=True)
|
|
119
|
+
print(json_dd)
|
|
120
|
+
|
|
121
|
+
# Hash the JSON encoded dictionary
|
|
122
|
+
return sha256(json_dd.encode()).hexdigest()
|
|
97
123
|
|
|
98
124
|
|
|
99
125
|
@field_validator("identifier")
|
|
@@ -19,17 +19,17 @@ class Registration(BaseModel):
|
|
|
19
19
|
builder: Callable[[Herre, Fakts, Params], object]
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
basic_requirements =
|
|
22
|
+
basic_requirements = {"lok": Requirement(
|
|
23
23
|
key="lok",
|
|
24
24
|
service="live.arkitekt.lok",
|
|
25
25
|
description="An instance of ArkitektNext Lok to authenticate the user",
|
|
26
|
-
)
|
|
26
|
+
)}
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
class ServiceBuilderRegistry:
|
|
30
30
|
def __init__(self):
|
|
31
31
|
self.service_builders = {}
|
|
32
|
-
self.
|
|
32
|
+
self.requirements_map = basic_requirements
|
|
33
33
|
|
|
34
34
|
def register(
|
|
35
35
|
self,
|
|
@@ -37,8 +37,11 @@ class ServiceBuilderRegistry:
|
|
|
37
37
|
service_builder: Callable[[Herre, Fakts], object],
|
|
38
38
|
requirement: Requirement,
|
|
39
39
|
):
|
|
40
|
-
self.service_builders
|
|
41
|
-
|
|
40
|
+
if name not in self.service_builders:
|
|
41
|
+
self.service_builders[name] = service_builder
|
|
42
|
+
|
|
43
|
+
if name not in self.requirements_map:
|
|
44
|
+
self.requirements_map[name] = requirement
|
|
42
45
|
|
|
43
46
|
def get(self, name):
|
|
44
47
|
return self.services.get(name)
|
|
@@ -52,7 +55,7 @@ class ServiceBuilderRegistry:
|
|
|
52
55
|
}
|
|
53
56
|
|
|
54
57
|
def get_requirements(self):
|
|
55
|
-
return self.
|
|
58
|
+
return self.requirements_map.values()
|
|
56
59
|
|
|
57
60
|
|
|
58
61
|
class SetupInfo:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: arkitekt-next
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.27
|
|
4
4
|
Summary: client for the arkitekt_next platform
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: jhnnsrs
|
|
@@ -22,14 +22,14 @@ Requires-Dist: dokker (>=1.0.0)
|
|
|
22
22
|
Requires-Dist: fakts-next (>=1.0.2)
|
|
23
23
|
Requires-Dist: fluss-next (>=0.1.89) ; extra == "all"
|
|
24
24
|
Requires-Dist: herre-next (>=1.0.2)
|
|
25
|
-
Requires-Dist: kabinet (>=0.1.
|
|
25
|
+
Requires-Dist: kabinet (>=0.1.37) ; (python_version >= "3.9" and python_version < "4.0") and (extra == "all")
|
|
26
26
|
Requires-Dist: koil (>=1.0.0)
|
|
27
27
|
Requires-Dist: lovekit (>=0.1.15) ; (python_version >= "3.10" and python_version < "4.0") and (extra == "all")
|
|
28
28
|
Requires-Dist: mikro-next (>=0.1.45) ; (python_version >= "3.10" and python_version < "4.0") and (extra == "all")
|
|
29
29
|
Requires-Dist: namegenerator (>=1.0.6) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "blok")
|
|
30
30
|
Requires-Dist: netifaces (>=0.11.0) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "blok")
|
|
31
31
|
Requires-Dist: reaktion-next (>=0.1.79) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "all")
|
|
32
|
-
Requires-Dist: rekuest-next (>=0.2.
|
|
32
|
+
Requires-Dist: rekuest-next (>=0.2.39) ; (python_version >= "3.8" and python_version < "4.0") and (extra == "cli" or extra == "all")
|
|
33
33
|
Requires-Dist: rich-click (>=1.6.1) ; extra == "cli" or extra == "all"
|
|
34
34
|
Requires-Dist: semver (>=3.0.1) ; extra == "cli" or extra == "all"
|
|
35
35
|
Requires-Dist: turms (>=0.6.0) ; (python_version >= "3.9" and python_version < "4.0") and (extra == "cli" or extra == "all")
|
|
@@ -2,13 +2,13 @@ arkitekt_next/__blok__.py,sha256=gQqlPrUPSeB-b3XkvXRwDoRWMfG-vYN-3a2pWHNjz_E,156
|
|
|
2
2
|
arkitekt_next/__init__.py,sha256=ovVo9gHr15RHJW3NS82p8vs6NWJ4CGNTPCog16bhmU4,1694
|
|
3
3
|
arkitekt_next/apps/__init__.py,sha256=cx_5Y-RkJFkSQJH-hUEC_L3eW1jU2E426c4e6_csIyM,42
|
|
4
4
|
arkitekt_next/apps/service/__init__.py,sha256=p4iRwiFBKRq2lfbjDBzUR_GMhPWjkjWTa01ohuKz_L4,157
|
|
5
|
-
arkitekt_next/apps/service/fakts_next.py,sha256=
|
|
5
|
+
arkitekt_next/apps/service/fakts_next.py,sha256=ouPBl_FPjyRTmNdaCtK2TQfTRzCqiahyVyaXrSmRZAo,2942
|
|
6
6
|
arkitekt_next/apps/service/fakts_qt.py,sha256=_ayxmyjm8qPAsUmBzydYIaX63jHP4mcZ9B0i8NzPC5g,1984
|
|
7
7
|
arkitekt_next/apps/service/grant_registry.py,sha256=h0jRKBd9EAXiVV6aHVtzNAlm1yiWPigg0qka68y6yKM,876
|
|
8
8
|
arkitekt_next/apps/service/herre.py,sha256=jtHugrkKr8Yo26GYVm9qNZkK2hAD3_v_rMimaV3GrC4,811
|
|
9
9
|
arkitekt_next/apps/service/herre_qt.py,sha256=42APOZl0SnX0FWl6K-TC9CcZUO-BSXMXyH6B31A0y3U,1679
|
|
10
10
|
arkitekt_next/apps/types.py,sha256=zr3x75txS3b8orpCYYnnYAaO2mFxGgS8EZfbwh_wDfg,1286
|
|
11
|
-
arkitekt_next/base_models.py,sha256=
|
|
11
|
+
arkitekt_next/base_models.py,sha256=RuXSw1-gVzneBYakTc9-9FxzoUFRfnPlJER72JbqHCQ,5772
|
|
12
12
|
arkitekt_next/bloks/__init__.py,sha256=_4EeR63d6avQUWLG4mK2n_FvogTPQ_Jx6f2_RvNbWeA,29
|
|
13
13
|
arkitekt_next/bloks/admin.py,sha256=mRTfjIR1vsfY1ghgjWLjKYFAOh1pGCmQ_IEt2QOR3og,1353
|
|
14
14
|
arkitekt_next/bloks/arkitekt.py,sha256=ZyyHocaoPPCBZnbpBCkDzB2woXb1-ZbENr51UFERn2Q,1546
|
|
@@ -129,11 +129,11 @@ arkitekt_next/qt/builders.py,sha256=zQLn-mJJnfLHSDjfAJ7gfzv66cnQz_yNX9yKTEdapi4,
|
|
|
129
129
|
arkitekt_next/qt/magic_bar.py,sha256=_H74_s5Nqj20FpvzLSCxRwZMuZxqobkmn_sdwhpqzCg,17632
|
|
130
130
|
arkitekt_next/qt/types.py,sha256=RzliCycvB_i7SZcXgahfXCJ9ft8QNsJKkrzpNbXF9qQ,4042
|
|
131
131
|
arkitekt_next/qt/utils.py,sha256=MgBPtPmCSBkIuATov3UgREESwxAHh77lWNNxyE7Qs48,773
|
|
132
|
-
arkitekt_next/service_registry.py,sha256=
|
|
132
|
+
arkitekt_next/service_registry.py,sha256=_ajPWQKA5clfQ_Nb7V-qr_k2ypw9F5iQMDaLpfwVh4A,3736
|
|
133
133
|
arkitekt_next/tqdm.py,sha256=lQcJI5Q6Py7Gy88hOCiJujjPEEGd8G2k1mOVJJ6oYe8,1531
|
|
134
134
|
arkitekt_next/utils.py,sha256=QETdzn_GIMSw6LdaXL89bqvqp9MGwEBK8Lj54MpnMwc,2396
|
|
135
|
-
arkitekt_next-0.8.
|
|
136
|
-
arkitekt_next-0.8.
|
|
137
|
-
arkitekt_next-0.8.
|
|
138
|
-
arkitekt_next-0.8.
|
|
139
|
-
arkitekt_next-0.8.
|
|
135
|
+
arkitekt_next-0.8.27.dist-info/LICENSE,sha256=YZ2oRjC248t-GpoEyw7J13vwKYNG6zhYMaEAix6EzF0,1089
|
|
136
|
+
arkitekt_next-0.8.27.dist-info/METADATA,sha256=4qKmQpm9Rpjm6NZ9xklRD1s9wHrefrQesrn7RTNXICc,6072
|
|
137
|
+
arkitekt_next-0.8.27.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
138
|
+
arkitekt_next-0.8.27.dist-info/entry_points.txt,sha256=-hxikQx4xZ6TiOnWVDOlTN_kcAISgGFvTHXIchsCHSc,60
|
|
139
|
+
arkitekt_next-0.8.27.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|