nucliadb-models 6.9.0.post5085__py3-none-any.whl → 6.9.0.post5097__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 nucliadb-models might be problematic. Click here for more details.
- nucliadb_models/metadata.py +18 -3
- {nucliadb_models-6.9.0.post5085.dist-info → nucliadb_models-6.9.0.post5097.dist-info}/METADATA +1 -1
- {nucliadb_models-6.9.0.post5085.dist-info → nucliadb_models-6.9.0.post5097.dist-info}/RECORD +5 -5
- {nucliadb_models-6.9.0.post5085.dist-info → nucliadb_models-6.9.0.post5097.dist-info}/WHEEL +0 -0
- {nucliadb_models-6.9.0.post5085.dist-info → nucliadb_models-6.9.0.post5097.dist-info}/top_level.txt +0 -0
nucliadb_models/metadata.py
CHANGED
|
@@ -17,7 +17,7 @@ from datetime import datetime
|
|
|
17
17
|
from enum import Enum
|
|
18
18
|
from typing import Any, Dict, List, Optional
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, Field, model_validator
|
|
20
|
+
from pydantic import BaseModel, Field, field_validator, model_validator
|
|
21
21
|
from typing_extensions import Self
|
|
22
22
|
|
|
23
23
|
from nucliadb_models.utils import DateTime
|
|
@@ -231,15 +231,24 @@ class InputOrigin(BaseModel):
|
|
|
231
231
|
default=[],
|
|
232
232
|
title="Tags",
|
|
233
233
|
description="Resource tags about the origin system. It can later be used for filtering on search endpoints with '/origin.tags/{tag}'",
|
|
234
|
+
max_length=300,
|
|
234
235
|
)
|
|
235
|
-
collaborators: List[str] = []
|
|
236
|
+
collaborators: List[str] = Field(default=[], max_length=100)
|
|
236
237
|
filename: Optional[str] = None
|
|
237
|
-
related: List[str] = []
|
|
238
|
+
related: List[str] = Field(default=[], max_length=100)
|
|
238
239
|
path: Optional[str] = Field(
|
|
239
240
|
default=None,
|
|
240
241
|
description="Path of the original resource. Typically used to store folder structure information of the resource at the origin system. It can be later used for filtering on search endpoints with '/origin.path/{path}'",
|
|
242
|
+
max_length=2048,
|
|
241
243
|
)
|
|
242
244
|
|
|
245
|
+
@field_validator("tags")
|
|
246
|
+
def validate_tag_length(cls, tags):
|
|
247
|
+
for tag in tags:
|
|
248
|
+
if len(tag) > 512:
|
|
249
|
+
raise ValueError("Each tag must be at most 1024 characters long")
|
|
250
|
+
return tags
|
|
251
|
+
|
|
243
252
|
|
|
244
253
|
class Origin(InputOrigin):
|
|
245
254
|
# Created and modified are redefined to
|
|
@@ -247,6 +256,12 @@ class Origin(InputOrigin):
|
|
|
247
256
|
created: Optional[datetime] = None
|
|
248
257
|
modified: Optional[datetime] = None
|
|
249
258
|
|
|
259
|
+
tags: List[str] = Field(
|
|
260
|
+
default=[],
|
|
261
|
+
title="Tags",
|
|
262
|
+
description="Resource tags about the origin system. It can later be used for filtering on search endpoints with '/origin.tags/{tag}'",
|
|
263
|
+
)
|
|
264
|
+
|
|
250
265
|
class Source(Enum):
|
|
251
266
|
WEB = "WEB"
|
|
252
267
|
DESKTOP = "DESKTOP"
|
{nucliadb_models-6.9.0.post5085.dist-info → nucliadb_models-6.9.0.post5097.dist-info}/RECORD
RENAMED
|
@@ -12,7 +12,7 @@ nucliadb_models/filters.py,sha256=NQI2-4AFzzJuZy8NeY3jXlTbbU5wxiwMCP-5DrD-7lE,14
|
|
|
12
12
|
nucliadb_models/hydration.py,sha256=7SFnAcTQRE9etVccpph6aA1AUqsHVwkzT4YF6Uzl0Gs,14262
|
|
13
13
|
nucliadb_models/labels.py,sha256=9zqRgkpZuX3kUPwsTTgCH7JyOWK7dM5pwyuHJR86YdU,3949
|
|
14
14
|
nucliadb_models/link.py,sha256=PF5hHLwdOed5TMBTxtokkgWtMh1bFnORZjybh0NwVCw,2526
|
|
15
|
-
nucliadb_models/metadata.py,sha256=
|
|
15
|
+
nucliadb_models/metadata.py,sha256=OOKGy_83NtlG1QKQZEwMuwu4wbVEe7P30Y2QvnGSDto,8933
|
|
16
16
|
nucliadb_models/notifications.py,sha256=mna8-AoD_29Wds0Thl0AF0zpERnJmYGLZX1w1fUopMY,4036
|
|
17
17
|
nucliadb_models/processing.py,sha256=nhKuHQjqCdb9zJVkYGPTLub23tK9e_lwL5OCDVymZjY,719
|
|
18
18
|
nucliadb_models/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -33,7 +33,7 @@ nucliadb_models/graph/responses.py,sha256=Sdq8OgFAL1YT-1lJyLLrkqcScvj7YTEqAUwQ-k
|
|
|
33
33
|
nucliadb_models/internal/__init__.py,sha256=zG33bUz1rHFPtvqQPWn4rDwBJt3FJodGuQYD45quiQg,583
|
|
34
34
|
nucliadb_models/internal/predict.py,sha256=Pnx6MmLfK65eExe1XnVxqmSlvMwdowewwks9BOEoqMw,2029
|
|
35
35
|
nucliadb_models/internal/shards.py,sha256=__y1OZtWGiNcPQEWfSFOj8yw458WGi7mM4vZe0K-L1Y,1691
|
|
36
|
-
nucliadb_models-6.9.0.
|
|
37
|
-
nucliadb_models-6.9.0.
|
|
38
|
-
nucliadb_models-6.9.0.
|
|
39
|
-
nucliadb_models-6.9.0.
|
|
36
|
+
nucliadb_models-6.9.0.post5097.dist-info/METADATA,sha256=UVD8lyigtcT7MZjUYnSdcbyzqfI0Y_r5Y4AH3H2QSDk,794
|
|
37
|
+
nucliadb_models-6.9.0.post5097.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
38
|
+
nucliadb_models-6.9.0.post5097.dist-info/top_level.txt,sha256=UrY1I8oeovIRwkXLYplssTrxQdUjhSEFDFbnwaIV3tA,16
|
|
39
|
+
nucliadb_models-6.9.0.post5097.dist-info/RECORD,,
|
|
File without changes
|
{nucliadb_models-6.9.0.post5085.dist-info → nucliadb_models-6.9.0.post5097.dist-info}/top_level.txt
RENAMED
|
File without changes
|