nucliadb-models 6.3.5.post3911__py3-none-any.whl → 6.3.5.post3922__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 +17 -2
- {nucliadb_models-6.3.5.post3911.dist-info → nucliadb_models-6.3.5.post3922.dist-info}/METADATA +1 -1
- {nucliadb_models-6.3.5.post3911.dist-info → nucliadb_models-6.3.5.post3922.dist-info}/RECORD +5 -5
- {nucliadb_models-6.3.5.post3911.dist-info → nucliadb_models-6.3.5.post3922.dist-info}/WHEEL +0 -0
- {nucliadb_models-6.3.5.post3911.dist-info → nucliadb_models-6.3.5.post3922.dist-info}/top_level.txt +0 -0
nucliadb_models/metadata.py
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
# You should have received a copy of the GNU Affero General Public License
|
|
18
18
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
19
19
|
#
|
|
20
|
+
import warnings
|
|
20
21
|
from datetime import datetime
|
|
21
22
|
from enum import Enum
|
|
22
23
|
from typing import Any, Dict, List, Optional
|
|
@@ -148,6 +149,14 @@ class TokenSplit(BaseModel):
|
|
|
148
149
|
end: int
|
|
149
150
|
cancelled_by_user: bool = False
|
|
150
151
|
|
|
152
|
+
def __init__(self, **data):
|
|
153
|
+
warnings.warn(
|
|
154
|
+
f"{self.__class__.__name__} is deprecated and will be removed in a future version.",
|
|
155
|
+
DeprecationWarning,
|
|
156
|
+
stacklevel=2,
|
|
157
|
+
)
|
|
158
|
+
super().__init__(**data)
|
|
159
|
+
|
|
151
160
|
|
|
152
161
|
class ParagraphAnnotation(BaseModel):
|
|
153
162
|
classifications: List[UserClassification] = []
|
|
@@ -172,15 +181,21 @@ class PageSelections(BaseModel):
|
|
|
172
181
|
page: int
|
|
173
182
|
visual: List[VisualSelection]
|
|
174
183
|
|
|
184
|
+
def __init__(self, **data):
|
|
185
|
+
warnings.warn(
|
|
186
|
+
f"{self.__class__.__name__} is deprecated and will be removed in a future version.",
|
|
187
|
+
DeprecationWarning,
|
|
188
|
+
stacklevel=2,
|
|
189
|
+
)
|
|
190
|
+
super().__init__(**data)
|
|
191
|
+
|
|
175
192
|
|
|
176
193
|
class UserFieldMetadata(BaseModel):
|
|
177
194
|
"""
|
|
178
195
|
Field-level metadata set by the user via the rest api
|
|
179
196
|
"""
|
|
180
197
|
|
|
181
|
-
token: List[TokenSplit] = []
|
|
182
198
|
paragraphs: List[ParagraphAnnotation] = []
|
|
183
|
-
selections: List[PageSelections] = []
|
|
184
199
|
question_answers: List[QuestionAnswerAnnotation] = []
|
|
185
200
|
field: FieldID
|
|
186
201
|
|
{nucliadb_models-6.3.5.post3911.dist-info → nucliadb_models-6.3.5.post3922.dist-info}/RECORD
RENAMED
|
@@ -11,7 +11,7 @@ nucliadb_models/file.py,sha256=4pDfQtXaBNB-ExeXC7NIdt33RbJp_u53_x8ACVkHXCM,2174
|
|
|
11
11
|
nucliadb_models/filters.py,sha256=iUwxQcX8LuFbQekuPatM_YSwlTd0UxsowjC636zVMjQ,13199
|
|
12
12
|
nucliadb_models/labels.py,sha256=AGNVzvt-FUQlTBiBCV-w4Lpq4Hey0b_jqhGzkrFbtFg,4510
|
|
13
13
|
nucliadb_models/link.py,sha256=GDCBREpMFEPmIjvf56zlU9quxI8j4NnlhsaEYWxCHqU,2899
|
|
14
|
-
nucliadb_models/metadata.py,sha256=
|
|
14
|
+
nucliadb_models/metadata.py,sha256=ppwU__5IWHvBNDUT5EGLZxgpSBTwuA-rEpY-8Ef-Lwo,8600
|
|
15
15
|
nucliadb_models/notifications.py,sha256=jr2J3zncs880jYf2oZHYt0VFcnlZevsbkyX69ovTah8,4271
|
|
16
16
|
nucliadb_models/processing.py,sha256=UeU-VxbBlOzkNxviOS3a0X_k7Ye-jYu3UOdGuu21M8M,971
|
|
17
17
|
nucliadb_models/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -32,7 +32,7 @@ nucliadb_models/graph/responses.py,sha256=3aimAHrd3YW1BXHU_ZXRoidlccRtkCcREkfCNo
|
|
|
32
32
|
nucliadb_models/internal/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
|
|
33
33
|
nucliadb_models/internal/predict.py,sha256=5rgUPrH_98gerySOZ-TR2PX_qzCGF1_8VxyOu3bGhis,2281
|
|
34
34
|
nucliadb_models/internal/shards.py,sha256=uZLsMkYWrJDHq3xy_w7snSeV2X3aDBuht9GC_MG3sKc,1976
|
|
35
|
-
nucliadb_models-6.3.5.
|
|
36
|
-
nucliadb_models-6.3.5.
|
|
37
|
-
nucliadb_models-6.3.5.
|
|
38
|
-
nucliadb_models-6.3.5.
|
|
35
|
+
nucliadb_models-6.3.5.post3922.dist-info/METADATA,sha256=BoAi38Xvq-4J5Ffofvx5rJe3_05zLHFeBrQH38kTdNk,759
|
|
36
|
+
nucliadb_models-6.3.5.post3922.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
37
|
+
nucliadb_models-6.3.5.post3922.dist-info/top_level.txt,sha256=UrY1I8oeovIRwkXLYplssTrxQdUjhSEFDFbnwaIV3tA,16
|
|
38
|
+
nucliadb_models-6.3.5.post3922.dist-info/RECORD,,
|
|
File without changes
|
{nucliadb_models-6.3.5.post3911.dist-info → nucliadb_models-6.3.5.post3922.dist-info}/top_level.txt
RENAMED
|
File without changes
|