nucliadb 6.3.4.post3663__py3-none-any.whl → 6.3.4.post3680__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.
@@ -56,6 +56,7 @@ class Conversation(Field[PBConversation]):
56
56
  async def set_value(self, payload: PBConversation):
57
57
  last_page: Optional[PBConversation] = None
58
58
  metadata = await self.get_metadata()
59
+ metadata.extract_strategy = payload.extract_strategy
59
60
  if self._created is False and metadata.pages > 0:
60
61
  try:
61
62
  last_page = await self.db_get_value(page=metadata.pages)
@@ -45,7 +45,7 @@ from nucliadb.writer.api.v1.resource import (
45
45
  from nucliadb.writer.api.v1.slug import ensure_slug_uniqueness, noop_context_manager
46
46
  from nucliadb.writer.back_pressure import maybe_back_pressure
47
47
  from nucliadb.writer.resource.audit import parse_audit
48
- from nucliadb.writer.resource.basic import parse_basic_creation
48
+ from nucliadb.writer.resource.basic import parse_basic_creation, parse_user_classifications
49
49
  from nucliadb.writer.resource.field import (
50
50
  atomic_get_stored_resource_classifications,
51
51
  parse_fields,
@@ -887,6 +887,9 @@ async def store_file_on_nuclia_db(
887
887
  parse_audit(writer.audit, request)
888
888
 
889
889
  unique_slug_context_manager = noop_context_manager()
890
+
891
+ resource_classifications = await atomic_get_stored_resource_classifications(kbid, rid)
892
+
890
893
  if item is not None:
891
894
  if item.slug:
892
895
  unique_slug_context_manager = ensure_slug_uniqueness(kbid, item.slug)
@@ -903,8 +906,9 @@ async def store_file_on_nuclia_db(
903
906
  parse_extra(writer.extra, item.extra)
904
907
 
905
908
  toprocess.title = writer.basic.title
906
-
907
- resource_classifications = await atomic_get_stored_resource_classifications(kbid, rid)
909
+ if item.usermetadata:
910
+ # Any resource level classification that comes on the request payload overrides the stored ones
911
+ resource_classifications.resource_level = set(parse_user_classifications(item))
908
912
  await parse_fields(
909
913
  writer=writer,
910
914
  item=item,
@@ -958,8 +962,7 @@ async def store_file_on_nuclia_db(
958
962
  )
959
963
  )
960
964
 
961
- rclassif = await atomic_get_stored_resource_classifications(kbid, rid)
962
- classif_labels = rclassif.for_field(field, resources_pb2.FieldType.FILE)
965
+ classif_labels = resource_classifications.for_field(field, resources_pb2.FieldType.FILE)
963
966
  toprocess.filefield[field] = await processing.convert_internal_filefield_to_str(
964
967
  file_field, storage=storage, classif_labels=classif_labels
965
968
  )
@@ -484,6 +484,9 @@ async def parse_conversation_field(
484
484
  convs.messages.append(processing_message)
485
485
  field_value.messages.append(cm)
486
486
  convs.classification_labels = classif_labels
487
+ if conversation_field.extract_strategy:
488
+ field_value.extract_strategy = conversation_field.extract_strategy
489
+ convs.extract_strategy = conversation_field.extract_strategy
487
490
  toprocess.conversationfield[key] = convs
488
491
  writer.conversations[key].CopyFrom(field_value)
489
492
  writer.field_statuses.append(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: nucliadb
3
- Version: 6.3.4.post3663
3
+ Version: 6.3.4.post3680
4
4
  Summary: NucliaDB
5
5
  Author-email: Nuclia <nucliadb@nuclia.com>
6
6
  License: AGPL
@@ -20,11 +20,11 @@ Classifier: Programming Language :: Python :: 3.12
20
20
  Classifier: Programming Language :: Python :: 3 :: Only
21
21
  Requires-Python: <4,>=3.9
22
22
  Description-Content-Type: text/markdown
23
- Requires-Dist: nucliadb-telemetry[all]>=6.3.4.post3663
24
- Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.3.4.post3663
25
- Requires-Dist: nucliadb-protos>=6.3.4.post3663
26
- Requires-Dist: nucliadb-models>=6.3.4.post3663
27
- Requires-Dist: nidx-protos>=6.3.4.post3663
23
+ Requires-Dist: nucliadb-telemetry[all]>=6.3.4.post3680
24
+ Requires-Dist: nucliadb-utils[cache,fastapi,storages]>=6.3.4.post3680
25
+ Requires-Dist: nucliadb-protos>=6.3.4.post3680
26
+ Requires-Dist: nucliadb-models>=6.3.4.post3680
27
+ Requires-Dist: nidx-protos>=6.3.4.post3680
28
28
  Requires-Dist: nucliadb-admin-assets>=1.0.0.post1224
29
29
  Requires-Dist: nuclia-models>=0.24.2
30
30
  Requires-Dist: uvicorn
@@ -130,7 +130,7 @@ nucliadb/ingest/consumer/shard_creator.py,sha256=8SotMc-o_G8XZU52gR4Aay7tcigTdIX
130
130
  nucliadb/ingest/consumer/utils.py,sha256=jpX8D4lKzuPCpArQLZeX_Zczq3pfen_zAf8sPJfOEZU,2642
131
131
  nucliadb/ingest/fields/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
132
132
  nucliadb/ingest/fields/base.py,sha256=DTXFu_g9vSU2h7S4PlYxd-hp4SDuM_EPf8y51ALgD8w,21654
133
- nucliadb/ingest/fields/conversation.py,sha256=OcQOHvi72Pm0OyNGwxLo9gONo8f1NhwASq0_gS-E64A,7021
133
+ nucliadb/ingest/fields/conversation.py,sha256=0tVpHLvi3UmuO98puimBJUpPXv3qEOpqlWVXVYvz9Vw,7082
134
134
  nucliadb/ingest/fields/exceptions.py,sha256=2Cpntta3gNOnmGUdOe5ZMzP7k_308do14kaHVBPVCXs,1168
135
135
  nucliadb/ingest/fields/file.py,sha256=1v4jLg3balUua2VmSV8hHkAwPFShTUCOzufZvIUQcQw,4740
136
136
  nucliadb/ingest/fields/generic.py,sha256=elgtqv15aJUq3zY7X_g0bli_2BpcwPArVvzhe54Y4Ig,1547
@@ -336,12 +336,12 @@ nucliadb/writer/api/v1/router.py,sha256=RjuoWLpZer6Kl2BW_wznpNo6XL3BOpdTGqXZCn3Q
336
336
  nucliadb/writer/api/v1/services.py,sha256=HLQW18AEC5zQp5azpeAtRi7ZTzQSwG6SbmkHlmjTIFA,13165
337
337
  nucliadb/writer/api/v1/slug.py,sha256=xlVBDBpRi9bNulpBHZwhyftVvulfE0zFm1XZIWl-AKY,2389
338
338
  nucliadb/writer/api/v1/transaction.py,sha256=d2Vbgnkk_-FLGSTt3vfldwiJIUf0XoyD0wP1jQNz_DY,2430
339
- nucliadb/writer/api/v1/upload.py,sha256=iFHD3nB1ZXiSNyoOzIdzJ0PNLBnnlfOWPba1qWieT4o,33608
339
+ nucliadb/writer/api/v1/upload.py,sha256=hLMHXSaqEOE-vjKjhIupgdx8klJc3mVQp_oMwx5N-7o,33800
340
340
  nucliadb/writer/api/v1/vectorsets.py,sha256=mESaXkkI9f-jWWMW61ZZgv7E5YWXKemyc6vwT0lFXns,6747
341
341
  nucliadb/writer/resource/__init__.py,sha256=cp15ZcFnHvpcu_5-aK2A4uUyvuZVV_MJn4bIXMa20ks,835
342
342
  nucliadb/writer/resource/audit.py,sha256=FvxMZPzrNHtd31HgpZEvxzwAkbxJTZRhPLqRYYJi3tA,1426
343
343
  nucliadb/writer/resource/basic.py,sha256=_zdAr110C7rtEzOKoBRMzPjAnQ0pAtRfGjB8qCzodvI,11767
344
- nucliadb/writer/resource/field.py,sha256=qnj31lM9F0AFlj3QhPcPj90vHg7SMbbYW098fMtYt9o,20053
344
+ nucliadb/writer/resource/field.py,sha256=e5QGkR5ZDT1VUQgMXK7v6GGXJ2eek6jxGA0nPqjq_g4,20241
345
345
  nucliadb/writer/resource/origin.py,sha256=pvhUDdU0mlWPUcpoQi4LDUJaRtfjzVVrA8XcGVI_N8k,2021
346
346
  nucliadb/writer/tus/__init__.py,sha256=huWpKnDnjsrKlBBJk30ta5vamlA-4x0TbPs_2Up8hyM,5443
347
347
  nucliadb/writer/tus/azure.py,sha256=XhWAlWTM0vmXcXtuEPYjjeEhuZjiZXZu8q9WsJ7omFE,4107
@@ -352,8 +352,8 @@ nucliadb/writer/tus/local.py,sha256=7jYa_w9b-N90jWgN2sQKkNcomqn6JMVBOVeDOVYJHto,
352
352
  nucliadb/writer/tus/s3.py,sha256=vF0NkFTXiXhXq3bCVXXVV-ED38ECVoUeeYViP8uMqcU,8357
353
353
  nucliadb/writer/tus/storage.py,sha256=ToqwjoYnjI4oIcwzkhha_MPxi-k4Jk3Lt55zRwaC1SM,2903
354
354
  nucliadb/writer/tus/utils.py,sha256=MSdVbRsRSZVdkaum69_0wku7X3p5wlZf4nr6E0GMKbw,2556
355
- nucliadb-6.3.4.post3663.dist-info/METADATA,sha256=Olqrr9vrS1hKJrDcrbrYwfm62xUA3i4aj8WVRLxeePc,4291
356
- nucliadb-6.3.4.post3663.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
357
- nucliadb-6.3.4.post3663.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
358
- nucliadb-6.3.4.post3663.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
359
- nucliadb-6.3.4.post3663.dist-info/RECORD,,
355
+ nucliadb-6.3.4.post3680.dist-info/METADATA,sha256=HBMmYu3BKtwkq1mebFgewWhQz19SH__337Y-7PeA2_U,4291
356
+ nucliadb-6.3.4.post3680.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
357
+ nucliadb-6.3.4.post3680.dist-info/entry_points.txt,sha256=XqGfgFDuY3zXQc8ewXM2TRVjTModIq851zOsgrmaXx4,1268
358
+ nucliadb-6.3.4.post3680.dist-info/top_level.txt,sha256=hwYhTVnX7jkQ9gJCkVrbqEG1M4lT2F_iPQND1fCzF80,20
359
+ nucliadb-6.3.4.post3680.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.0.0)
2
+ Generator: setuptools (76.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5