kodexa 7.4.413466578435__tar.gz → 7.4.413508355193__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.
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/PKG-INFO +1 -1
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/model/model.py +17 -2
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/model/objects.py +4 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/platform/client.py +7 -1
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/pyproject.toml +1 -1
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/LICENSE +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/README.md +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/__init__.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/assistant/__init__.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/assistant/assistant.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/connectors/__init__.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/connectors/connectors.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/dataclasses/__init__.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/dataclasses/templates/llm_data_class.j2 +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/model/__init__.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/model/base.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/model/entities/__init__.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/model/entities/check_response.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/model/entities/product.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/model/entities/product_group.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/model/entities/product_subscription.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/model/persistence.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/model/utils.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/pipeline/__init__.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/pipeline/pipeline.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/platform/__init__.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/platform/interaction.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/platform/kodexa.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/selectors/__init__.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/selectors/ast.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/selectors/core.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/selectors/lexrules.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/selectors/lextab.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/selectors/lextab.pyi +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/selectors/parserules.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/selectors/parserules.pyi +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/selectors/parsetab.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/selectors/parsetab.pyi +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/spatial/__init__.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/spatial/azure_models.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/spatial/bbox_common.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/spatial/table_form_common.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/steps/__init__.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/steps/common.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/testing/__init__.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/testing/test_components.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/testing/test_utils.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/training/__init__.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/training/train_utils.py +0 -0
- {kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/utils/__init__.py +0 -0
@@ -1244,6 +1244,7 @@ class ContentNode(object):
|
|
1244
1244
|
status=None,
|
1245
1245
|
owner_uri=None,
|
1246
1246
|
is_dirty=None,
|
1247
|
+
sort_by_bbox: bool=False,
|
1247
1248
|
):
|
1248
1249
|
"""
|
1249
1250
|
This will tag (see Feature Tagging) the expression groups identified by the regular expression.
|
@@ -1305,7 +1306,7 @@ class ContentNode(object):
|
|
1305
1306
|
return str(uuid.uuid4())
|
1306
1307
|
|
1307
1308
|
def tag_node_position(
|
1308
|
-
node_to_check, start, end, node_data, tag_uuid, offset=0, value=None
|
1309
|
+
node_to_check, start, end, node_data, tag_uuid, offset=0, value=None, sort_by_bbox: bool=False
|
1309
1310
|
):
|
1310
1311
|
"""
|
1311
1312
|
This function tags a node position in a given data structure. It iterates over the content parts of the node to check,
|
@@ -1420,6 +1421,7 @@ class ContentNode(object):
|
|
1420
1421
|
tag_uuid,
|
1421
1422
|
offset=offset,
|
1422
1423
|
value=value,
|
1424
|
+
sort_by_bbox=sort_by_bbox,
|
1423
1425
|
)
|
1424
1426
|
|
1425
1427
|
if result < 0 or (end - result) <= 0:
|
@@ -1434,7 +1436,16 @@ class ContentNode(object):
|
|
1434
1436
|
raise Exception("Invalid part?")
|
1435
1437
|
|
1436
1438
|
# We need to determine if we have missing children and add them to the end
|
1437
|
-
|
1439
|
+
node_children = node_to_check.get_children()
|
1440
|
+
if node_children and sort_by_bbox:
|
1441
|
+
# Sort nodes by x-coordinate if they have bboxes, otherwise use index
|
1442
|
+
try:
|
1443
|
+
node_children.sort(key=lambda x: x.get_bbox()[0] if hasattr(x, 'get_bbox') else x.index if hasattr(x, 'index') else 0)
|
1444
|
+
except (AttributeError, TypeError, IndexError):
|
1445
|
+
# If sorting fails, keep original order
|
1446
|
+
pass
|
1447
|
+
|
1448
|
+
for child_idx, child_node in enumerate(node_children):
|
1438
1449
|
if child_node.index not in node_to_check.get_content_parts():
|
1439
1450
|
if content_length > 0:
|
1440
1451
|
end = end - len(separator)
|
@@ -1452,6 +1463,7 @@ class ContentNode(object):
|
|
1452
1463
|
tag_uuid,
|
1453
1464
|
offset=offset,
|
1454
1465
|
value=value,
|
1466
|
+
sort_by_bbox=sort_by_bbox,
|
1455
1467
|
)
|
1456
1468
|
|
1457
1469
|
if result < 0 or (end - result) <= 0:
|
@@ -1487,6 +1499,7 @@ class ContentNode(object):
|
|
1487
1499
|
get_tag_uuid(tag_uuid),
|
1488
1500
|
0,
|
1489
1501
|
value=value,
|
1502
|
+
sort_by_bbox=sort_by_bbox,
|
1490
1503
|
)
|
1491
1504
|
|
1492
1505
|
else:
|
@@ -1558,6 +1571,7 @@ class ContentNode(object):
|
|
1558
1571
|
data,
|
1559
1572
|
get_tag_uuid(tag_uuid),
|
1560
1573
|
value=value,
|
1574
|
+
sort_by_bbox=sort_by_bbox,
|
1561
1575
|
)
|
1562
1576
|
|
1563
1577
|
else:
|
@@ -1572,6 +1586,7 @@ class ContentNode(object):
|
|
1572
1586
|
data,
|
1573
1587
|
get_tag_uuid(tag_uuid),
|
1574
1588
|
value=value,
|
1589
|
+
sort_by_bbox=sort_by_bbox,
|
1575
1590
|
)
|
1576
1591
|
|
1577
1592
|
def get_tags(self):
|
@@ -3108,6 +3108,10 @@ class Task(BaseModel):
|
|
3108
3108
|
protected_namespaces=("model_config",),
|
3109
3109
|
)
|
3110
3110
|
|
3111
|
+
id: Optional[str] = Field(None)
|
3112
|
+
uuid: Optional[str] = None
|
3113
|
+
created_on: Optional[StandardDateTime] = Field(None, alias="createdOn")
|
3114
|
+
updated_on: Optional[StandardDateTime] = Field(None, alias="updatedOn")
|
3111
3115
|
project: Optional['Project'] = None
|
3112
3116
|
title: Optional[str] = None
|
3113
3117
|
description: Optional[str] = None
|
@@ -4634,14 +4634,18 @@ class DocumentFamilyEndpoint(DocumentFamily, ClientEndpoint):
|
|
4634
4634
|
|
4635
4635
|
def get_json(
|
4636
4636
|
self,
|
4637
|
-
project_id: str,
|
4637
|
+
project_id: Optional[str] = None,
|
4638
4638
|
friendly_names=False,
|
4639
|
+
include_ids=True,
|
4640
|
+
include_exceptions=False,
|
4639
4641
|
) -> str:
|
4640
4642
|
"""Get the JSON export for the document family
|
4641
4643
|
|
4642
4644
|
Args:
|
4643
4645
|
project_id str: The project ID
|
4644
4646
|
friendly_names (bool): Whether to use friendly names. Defaults to False
|
4647
|
+
include_ids (bool): Whether to include the IDs. Defaults to True
|
4648
|
+
include_exceptions (bool): Whether to include the exceptions. Defaults to False
|
4645
4649
|
|
4646
4650
|
Returns:
|
4647
4651
|
str: The JSON
|
@@ -4656,6 +4660,8 @@ class DocumentFamilyEndpoint(DocumentFamily, ClientEndpoint):
|
|
4656
4660
|
"format": "json",
|
4657
4661
|
"friendlyNames": friendly_names,
|
4658
4662
|
"projectId": project_id,
|
4663
|
+
"includeIds": include_ids,
|
4664
|
+
"includeExceptions": include_exceptions,
|
4659
4665
|
}
|
4660
4666
|
|
4661
4667
|
response = self.client.get(url, params=params)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "kodexa"
|
3
|
-
version = "7.4.
|
3
|
+
version = "7.4.413508355193"
|
4
4
|
description = "Python SDK for the Kodexa Platform"
|
5
5
|
authors = ["Austin Redenbaugh <austin@kodexa.com>", "Philip Dodds <philip@kodexa.com>", "Romar Cablao <rcablao@kodexa.com>", "Amadea Paula Dodds <amadeapaula@kodexa.com>"]
|
6
6
|
readme = "README.md"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/dataclasses/templates/llm_data_class.j2
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{kodexa-7.4.413466578435 → kodexa-7.4.413508355193}/kodexa/model/entities/product_subscription.py
RENAMED
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
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|