dokuments 3.1.0__tar.gz → 3.2.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.
- {dokuments-3.1.0 → dokuments-3.2.0}/.gitignore +3 -0
- {dokuments-3.1.0 → dokuments-3.2.0}/PKG-INFO +3 -3
- dokuments-3.2.0/dokuments/_tested.json +1 -0
- {dokuments-3.1.0 → dokuments-3.2.0}/dokuments/arkitekt.py +6 -1
- {dokuments-3.1.0 → dokuments-3.2.0}/dokuments/datalayer.py +1 -2
- {dokuments-3.1.0 → dokuments-3.2.0}/dokuments/io/download.py +6 -1
- {dokuments-3.1.0 → dokuments-3.2.0}/dokuments/links/upload.py +2 -2
- {dokuments-3.1.0 → dokuments-3.2.0}/pyproject.toml +13 -2
- {dokuments-3.1.0 → dokuments-3.2.0}/README.md +0 -0
- {dokuments-3.1.0 → dokuments-3.2.0}/dokuments/__init__.py +0 -0
- {dokuments-3.1.0 → dokuments-3.2.0}/dokuments/api/project.json +0 -0
- {dokuments-3.1.0 → dokuments-3.2.0}/dokuments/api/schema.graphql +0 -0
- {dokuments-3.1.0 → dokuments-3.2.0}/dokuments/api/schema.py +0 -0
- {dokuments-3.1.0 → dokuments-3.2.0}/dokuments/contrib/__init__.py +0 -0
- {dokuments-3.1.0 → dokuments-3.2.0}/dokuments/contrib/fakts/__init__.py +0 -0
- {dokuments-3.1.0 → dokuments-3.2.0}/dokuments/dokuments.py +0 -0
- {dokuments-3.1.0 → dokuments-3.2.0}/dokuments/io/__init__.py +0 -0
- {dokuments-3.1.0 → dokuments-3.2.0}/dokuments/py.typed +0 -0
- {dokuments-3.1.0 → dokuments-3.2.0}/dokuments/rath.py +0 -0
- {dokuments-3.1.0 → dokuments-3.2.0}/dokuments/scalars.py +0 -0
- {dokuments-3.1.0 → dokuments-3.2.0}/dokuments/traits.py +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: dokuments
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.2.0
|
|
4
4
|
Summary: The python client for dokuments, the arkitekt document service
|
|
5
5
|
Author-email: jhnnsrs <jhnnsrs@gmail.com>
|
|
6
6
|
Requires-Python: >=3.11
|
|
7
7
|
Requires-Dist: aiohttp<4,>=3.9.5
|
|
8
|
-
Requires-Dist: arkitekt-spec>=
|
|
8
|
+
Requires-Dist: arkitekt-spec>=12.9
|
|
9
9
|
Requires-Dist: fakts>=6.1
|
|
10
10
|
Requires-Dist: koil>=1.0.0
|
|
11
|
-
Requires-Dist: mikro>=
|
|
11
|
+
Requires-Dist: mikro>=14.0.1
|
|
12
12
|
Requires-Dist: rath>=4.1.1
|
|
13
13
|
Requires-Dist: websockets>=15.0.1
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version": "6.3.0"}
|
|
@@ -19,6 +19,7 @@ from rath.links.graphql_ws import GraphQLWSLink
|
|
|
19
19
|
from rath.links.split import SplitLink
|
|
20
20
|
|
|
21
21
|
from arkitekt_spec.declare.app import AppRegistry
|
|
22
|
+
from arkitekt_spec.declare.tested import tested_against
|
|
22
23
|
from arkitekt_spec.declare.widgets import SearchWidget
|
|
23
24
|
|
|
24
25
|
from dokuments.api.schema import File, SearchFilesQuery
|
|
@@ -37,6 +38,10 @@ registry = AppRegistry()
|
|
|
37
38
|
"""What dokuments brings to an app: its service, and the types it sends by id."""
|
|
38
39
|
|
|
39
40
|
|
|
41
|
+
TESTED = tested_against("dokuments")
|
|
42
|
+
"""The dokuments server this release wants: the one its release job tested it against."""
|
|
43
|
+
|
|
44
|
+
|
|
40
45
|
@registry.service(
|
|
41
46
|
schema=build_relative_path("api", "schema.graphql"),
|
|
42
47
|
turms=build_relative_path("api", "project.json"),
|
|
@@ -44,7 +49,7 @@ registry = AppRegistry()
|
|
|
44
49
|
def dokuments(
|
|
45
50
|
dokuments: Annotated[
|
|
46
51
|
Alias,
|
|
47
|
-
Require("live.arkitekt.dokuments", "Where the user's documents live"),
|
|
52
|
+
Require("live.arkitekt.dokuments", "Where the user's documents live", version=TESTED),
|
|
48
53
|
],
|
|
49
54
|
datalayer: Annotated[
|
|
50
55
|
Alias,
|
|
@@ -34,13 +34,12 @@ Example:
|
|
|
34
34
|
import contextvars
|
|
35
35
|
import ssl
|
|
36
36
|
from types import TracebackType
|
|
37
|
-
from typing import Optional
|
|
38
37
|
|
|
39
38
|
from fakts import Alias
|
|
40
39
|
from koil.composition import KoiledModel
|
|
41
40
|
|
|
42
41
|
|
|
43
|
-
current_dokuments_datalayer: contextvars.ContextVar[
|
|
42
|
+
current_dokuments_datalayer: contextvars.ContextVar["DataLayer | None"] = (
|
|
44
43
|
contextvars.ContextVar("current_dokuments_datalayer", default=None)
|
|
45
44
|
)
|
|
46
45
|
|
|
@@ -15,7 +15,12 @@ if TYPE_CHECKING:
|
|
|
15
15
|
async def adownload_file(dokuments: "Dokuments", store_id: str, file_name: str) -> str:
|
|
16
16
|
"""Write the media store ``store_id`` to ``file_name`` and return the path."""
|
|
17
17
|
grant = await dokuments.arequest_media_access(store_id=ID.validate(store_id))
|
|
18
|
-
store = create_s3_store(
|
|
18
|
+
store = create_s3_store(
|
|
19
|
+
await dokuments.datalayer.get_endpoint_url(),
|
|
20
|
+
grant,
|
|
21
|
+
proxy=dokuments.datalayer.proxy,
|
|
22
|
+
certificates=dokuments.datalayer.certificates,
|
|
23
|
+
)
|
|
19
24
|
|
|
20
25
|
parent = os.path.dirname(file_name)
|
|
21
26
|
if parent:
|
|
@@ -5,7 +5,7 @@ import io
|
|
|
5
5
|
from dokuments.scalars import FileLike
|
|
6
6
|
from rath.links.parsing import ParsingLink
|
|
7
7
|
from rath.operation import Operation, opify
|
|
8
|
-
from typing import Any
|
|
8
|
+
from typing import Any
|
|
9
9
|
from mikro.io.upload import aupload_bigfile
|
|
10
10
|
from pydantic import Field
|
|
11
11
|
from concurrent.futures import ThreadPoolExecutor
|
|
@@ -18,7 +18,7 @@ if TYPE_CHECKING:
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
async def apply_recursive(
|
|
21
|
-
func, obj, typeguard:
|
|
21
|
+
func, obj, typeguard: type[Any] | tuple[type[Any], ...]
|
|
22
22
|
) -> Any: # type: ignore
|
|
23
23
|
"""
|
|
24
24
|
Recursively applies an asynchronous function to elements in a nested structure.
|
|
@@ -9,12 +9,12 @@ dependencies = [
|
|
|
9
9
|
"aiohttp>=3.9.5,<4",
|
|
10
10
|
"koil>=1.0.0",
|
|
11
11
|
# Uploads go through mikro's big-file upload.
|
|
12
|
-
"mikro>=
|
|
12
|
+
"mikro>=14.0.1",
|
|
13
13
|
"rath>=4.1.1",
|
|
14
14
|
"websockets>=15.0.1",
|
|
15
15
|
# The service and structures are declared with arkitekt-spec, its aliases resolved by fakts
|
|
16
16
|
# (4.1: a service's scopes).
|
|
17
|
-
"arkitekt-spec>=
|
|
17
|
+
"arkitekt-spec>=12.9",
|
|
18
18
|
"fakts>=6.1",
|
|
19
19
|
]
|
|
20
20
|
|
|
@@ -37,12 +37,23 @@ include = ["dokuments"]
|
|
|
37
37
|
exclude = ["**/__pycache__", "tests"]
|
|
38
38
|
typeCheckingMode = "standard"
|
|
39
39
|
|
|
40
|
+
# `_tested.json` is written by the integration tests (the server version they ran against)
|
|
41
|
+
# and is not in git: named as an artifact, on both, it is shipped all the same.
|
|
40
42
|
[tool.hatch.build.targets.sdist]
|
|
41
43
|
include = ["dokuments"]
|
|
44
|
+
artifacts = ["dokuments/_tested.json"]
|
|
42
45
|
|
|
43
46
|
[tool.hatch.build.targets.wheel]
|
|
44
47
|
include = ["dokuments"]
|
|
48
|
+
artifacts = ["dokuments/_tested.json"]
|
|
45
49
|
|
|
50
|
+
|
|
51
|
+
[tool.ruff.lint]
|
|
52
|
+
extend-select = ["UP"]
|
|
53
|
+
extend-ignore = ["UP037", "UP038", "UP042"]
|
|
54
|
+
|
|
55
|
+
[tool.ruff.lint.per-file-ignores]
|
|
56
|
+
"dokuments/api/schema.py" = ["UP035"]
|
|
46
57
|
[build-system]
|
|
47
58
|
requires = ["hatchling", "hatch-vcs"]
|
|
48
59
|
build-backend = "hatchling.build"
|
|
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
|