kodexa 7.0.10946707979__tar.gz → 7.0.10965762452__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.0.10946707979 → kodexa-7.0.10965762452}/PKG-INFO +1 -1
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/model/objects.py +118 -59
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/pyproject.toml +1 -1
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/LICENSE +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/README.md +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/__init__.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/assistant/__init__.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/assistant/assistant.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/connectors/__init__.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/connectors/connectors.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/dataclasses/__init__.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/dataclasses/templates/llm_data_class.j2 +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/model/__init__.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/model/base.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/model/entities/__init__.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/model/entities/check_response.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/model/entities/product.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/model/entities/product_subscription.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/model/model.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/model/persistence.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/pipeline/__init__.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/pipeline/pipeline.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/platform/__init__.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/platform/client.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/platform/interaction.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/platform/kodexa.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/selectors/__init__.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/selectors/ast.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/selectors/core.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/selectors/lexrules.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/selectors/lextab.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/selectors/lextab.pyi +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/selectors/parserules.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/selectors/parserules.pyi +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/selectors/parsetab.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/selectors/parsetab.pyi +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/spatial/__init__.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/spatial/azure_models.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/spatial/bbox_common.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/spatial/table_form_common.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/steps/__init__.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/steps/common.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/testing/__init__.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/testing/test_components.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/testing/test_utils.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/training/__init__.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/training/train_utils.py +0 -0
- {kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/kodexa/utils/__init__.py +0 -0
@@ -1507,7 +1507,7 @@ class ProjectMetadata(BaseModel):
|
|
1507
1507
|
arbitrary_types_allowed=True,
|
1508
1508
|
protected_namespaces=("model_config",),
|
1509
1509
|
)
|
1510
|
-
tags: Optional[List[str]] = Field(default_factory=list
|
1510
|
+
tags: Optional[List[str]] = Field(default_factory=list)
|
1511
1511
|
|
1512
1512
|
|
1513
1513
|
class State1(Enum):
|
@@ -2530,19 +2530,34 @@ class TaxonCardinality(Enum):
|
|
2530
2530
|
multiple_per_segment = "MULTIPLE_PER_SEGMENT"
|
2531
2531
|
|
2532
2532
|
|
2533
|
-
class
|
2534
|
-
|
2533
|
+
class TaxonAdditionContext(BaseModel):
|
2534
|
+
context: Optional[str] = None
|
2535
|
+
weight: Optional[float] = None
|
2536
|
+
negative: Optional[bool] = None
|
2535
2537
|
|
2536
|
-
|
2538
|
+
|
2539
|
+
class TaxonGuideProperties(BaseModel):
|
2540
|
+
guidance_key: Optional[bool] = Field(None, alias="guidanceKey")
|
2541
|
+
|
2542
|
+
|
2543
|
+
|
2544
|
+
class TaxonRule(BaseModel):
|
2545
|
+
|
2546
|
+
name: Optional[str] = None
|
2547
|
+
description: Optional[str] = None
|
2548
|
+
rule_formula: Optional[str] = None
|
2549
|
+
message_formula: Optional[str] = None
|
2550
|
+
detail_formula: Optional[str] = None
|
2551
|
+
exception_id: Optional[str] = None
|
2552
|
+
|
2553
|
+
|
2554
|
+
class Taxon(BaseModel):
|
2537
2555
|
model_config = ConfigDict(
|
2538
2556
|
populate_by_name=True,
|
2539
2557
|
use_enum_values=True,
|
2540
2558
|
arbitrary_types_allowed=True,
|
2541
2559
|
protected_namespaces=("model_config",),
|
2542
2560
|
)
|
2543
|
-
"""
|
2544
|
-
A taxon is an individual label within a taxonomy
|
2545
|
-
"""
|
2546
2561
|
|
2547
2562
|
id: Optional[str] = Field(None, description="The ID of the taxon")
|
2548
2563
|
label: Optional[str] = Field(None, description="The text to display for this taxon")
|
@@ -2558,6 +2573,11 @@ class Taxon(BaseModel):
|
|
2558
2573
|
name: str = Field(
|
2559
2574
|
..., description="The name to be used", pattern=r"^[a-zA-Z0-9\-_]{0,255}$"
|
2560
2575
|
)
|
2576
|
+
select_weight: Optional[int] = Field(
|
2577
|
+
1,
|
2578
|
+
alias="selectWeight",
|
2579
|
+
description="The weight of this taxon, used to order the taxon for the user labeling (default is 1)",
|
2580
|
+
)
|
2561
2581
|
external_name: Optional[str] = Field(
|
2562
2582
|
None,
|
2563
2583
|
alias="externalName",
|
@@ -2600,101 +2620,140 @@ class Taxon(BaseModel):
|
|
2600
2620
|
alias="nullValue",
|
2601
2621
|
description="Allows the setting of a value to replace null if the taxon is nullable",
|
2602
2622
|
)
|
2623
|
+
denormalize_to_children: Optional[bool] = Field(
|
2624
|
+
False,
|
2625
|
+
alias="denormalizeToChildren",
|
2626
|
+
description="Denormalize the value of the taxon into child data groups when we are looking to 'flatten' the data",
|
2627
|
+
)
|
2628
|
+
not_user_labelled: Optional[bool] = Field(
|
2629
|
+
False,
|
2630
|
+
alias="notUserLabelled",
|
2631
|
+
description="If set to true this taxon will not be shown to the user for labeling",
|
2632
|
+
)
|
2603
2633
|
description: Optional[str] = Field(None, description="The description of the taxon")
|
2604
|
-
overview_markdown: Optional[str] = Field(None, alias="overviewMarkdown")
|
2634
|
+
overview_markdown: Optional[str] = Field(None, alias="overviewMarkdown", description="Overview for the taxon (supports markdown)")
|
2635
|
+
semantic_definition: Optional[str] = Field(None, alias="semanticDefinition", description="Semantic Definition")
|
2636
|
+
examples: Optional[List[GuidanceTagResult]] = Field(None, description="Example values")
|
2637
|
+
synonyms: Optional[List[str]] = Field(None, description="Synonyms")
|
2638
|
+
addition_contexts: Optional[List[TaxonAdditionContext]] = Field([], alias="additionContexts", description="Additional Context")
|
2639
|
+
guide_properties: Optional[TaxonGuideProperties] = Field(None, alias="guideProperties", description="Guidance Properties")
|
2605
2640
|
enabled: Optional[bool] = Field(
|
2606
|
-
|
2641
|
+
True, description="Is the taxon enabled (used in the UI)"
|
2607
2642
|
)
|
2608
2643
|
color: Optional[str] = Field(
|
2609
2644
|
None, description="Hex encoding of the color to use for the taxon"
|
2610
2645
|
)
|
2611
|
-
children: Optional[List[Taxon]] = Field(
|
2612
|
-
|
2646
|
+
children: Optional[List['Taxon']] = Field(
|
2647
|
+
[], description="The children under this taxon"
|
2613
2648
|
)
|
2614
2649
|
options: Optional[List[Option]] = Field(
|
2615
|
-
|
2650
|
+
[],
|
2616
2651
|
description="Options that can be shown for the taxon (usually used in assistant taxonomies)",
|
2617
2652
|
)
|
2618
|
-
related_taxons: Optional[List[RelatedTaxon]] = Field(
|
2619
|
-
None,
|
2620
|
-
alias="relatedTaxons",
|
2621
|
-
description="A list of relationships to other taxons and the purpose of the relationship",
|
2622
|
-
)
|
2623
2653
|
node_types: Optional[List[str]] = Field(
|
2624
|
-
|
2654
|
+
[],
|
2625
2655
|
alias="nodeTypes",
|
2626
2656
|
description="A list of the node types that this taxon applies to (empty means everything), used in the UI",
|
2627
2657
|
)
|
2628
2658
|
taxon_type: Optional[TaxonType] = Field(
|
2629
|
-
|
2659
|
+
TaxonType.string,
|
2630
2660
|
alias="taxonType",
|
2631
2661
|
description="Expected data type to coalesce to (defaults to STRING)",
|
2632
2662
|
)
|
2633
2663
|
selection_options: Optional[List[SelectionOption]] = Field(
|
2634
|
-
|
2664
|
+
[],
|
2635
2665
|
alias="selectionOptions",
|
2636
2666
|
description="If data type is SELECTION, this is the list of available options",
|
2637
2667
|
)
|
2638
2668
|
type_features: Optional[Dict[str, Any]] = Field(
|
2639
|
-
|
2669
|
+
{},
|
2640
2670
|
alias="typeFeatures",
|
2641
2671
|
description="Additional features for the type handling",
|
2642
2672
|
)
|
2673
|
+
properties: Optional[Dict[str, Any]] = Field(
|
2674
|
+
{},
|
2675
|
+
description="Additional properties that can be set and used by models or assistants based on the additional taxon options",
|
2676
|
+
)
|
2677
|
+
conditional_formats: Optional[List[TaxonConditionalFormat]] = Field(
|
2678
|
+
[],
|
2679
|
+
alias="conditionalFormats",
|
2680
|
+
description="The conditional formats for the taxon",
|
2681
|
+
)
|
2682
|
+
rules: Optional[List[TaxonRule]] = Field(
|
2683
|
+
[],
|
2684
|
+
description="The conditional formats for the taxon",
|
2685
|
+
)
|
2686
|
+
cardinality: Optional[TaxonCardinality] = Field(
|
2687
|
+
None,
|
2688
|
+
description="The cardinality of the taxon, applies to a group taxon",
|
2689
|
+
)
|
2643
2690
|
path: Optional[str] = Field(None, description="The path to the node")
|
2644
2691
|
multi_value: Optional[bool] = Field(
|
2645
|
-
|
2692
|
+
True, alias="multiValue", description="Does this taxon allow multiple values (for none-group)"
|
2646
2693
|
)
|
2647
2694
|
user_editable: Optional[bool] = Field(
|
2648
|
-
|
2695
|
+
True,
|
2649
2696
|
alias="userEditable",
|
2650
2697
|
description="Can the value of this taxon be edited by a user",
|
2651
2698
|
)
|
2652
|
-
denormalize_to_children: Optional[bool] = Field(
|
2653
|
-
None,
|
2654
|
-
alias="denormalizeToChildren",
|
2655
|
-
description="Should the value of this taxon be denormalized to the children",
|
2656
|
-
)
|
2657
|
-
not_user_labelled: Optional[bool] = Field(
|
2658
|
-
None,
|
2659
|
-
alias="notUserLabelled",
|
2660
|
-
description="The taxon is not user labelled",
|
2661
|
-
)
|
2662
2699
|
use_post_expression: Optional[bool] = Field(
|
2663
|
-
|
2700
|
+
False, alias="usePostExpression", description="Use a post extraction expression"
|
2664
2701
|
)
|
2665
2702
|
post_expression: Optional[str] = Field(
|
2666
2703
|
None,
|
2667
2704
|
alias="postExpression",
|
2668
2705
|
description="An expression that is applied post extraction of the data",
|
2669
2706
|
)
|
2670
|
-
semantic_definition: Optional[str] = Field(
|
2671
|
-
None,
|
2672
|
-
alias="semanticDefinition",
|
2673
|
-
description="The semantic definition of the taxon",
|
2674
|
-
)
|
2675
|
-
examples: Optional[List[GuidanceTagResult]] = Field(
|
2676
|
-
None,
|
2677
|
-
description="A list of examples of the taxon values, used to understand the taxon",
|
2678
|
-
)
|
2679
|
-
|
2680
|
-
synonyms: Optional[List[str]] = Field(
|
2681
|
-
None,
|
2682
|
-
description="A list of synonyms of the taxon values, used to understand the taxon",
|
2683
|
-
)
|
2684
|
-
|
2685
|
-
cardinality: Optional[TaxonCardinality] = None
|
2686
|
-
|
2687
|
-
conditional_formats: Optional[List[TaxonConditionalFormat]] = Field(None, alias="conditionalFormats")
|
2688
2707
|
|
2689
|
-
|
2708
|
+
def update_path(self, parent_path=""):
|
2709
|
+
self.path = parent_path + "/" + self.name if parent_path else self.name
|
2710
|
+
if self.children:
|
2711
|
+
for child in self.children:
|
2712
|
+
child.update_path(self.path)
|
2690
2713
|
|
2691
|
-
def
|
2692
|
-
if
|
2693
|
-
|
2694
|
-
self.
|
2695
|
-
|
2714
|
+
def find_taxon(self, *path_parts):
|
2715
|
+
if not path_parts:
|
2716
|
+
return None
|
2717
|
+
if self.name == path_parts[0] and len(path_parts) == 1:
|
2718
|
+
return self
|
2719
|
+
else:
|
2720
|
+
remaining_parts = path_parts[1:]
|
2696
2721
|
for child in self.children:
|
2697
|
-
child.
|
2722
|
+
hit = child.find_taxon(*remaining_parts)
|
2723
|
+
if hit:
|
2724
|
+
return hit
|
2725
|
+
return None
|
2726
|
+
|
2727
|
+
def groups(self):
|
2728
|
+
groups = []
|
2729
|
+
if self.group:
|
2730
|
+
groups.append(self)
|
2731
|
+
for child in self.children:
|
2732
|
+
groups.extend(child.groups())
|
2733
|
+
return groups
|
2734
|
+
|
2735
|
+
def all_groups(self):
|
2736
|
+
groups = []
|
2737
|
+
if self.group:
|
2738
|
+
groups.append(self)
|
2739
|
+
for child in self.children:
|
2740
|
+
groups.extend(child.all_groups())
|
2741
|
+
return groups
|
2742
|
+
|
2743
|
+
def get_simplified_structure(self):
|
2744
|
+
structure = {
|
2745
|
+
"label": self.label,
|
2746
|
+
"description": self.description,
|
2747
|
+
}
|
2748
|
+
if self.group:
|
2749
|
+
structure["group"] = True
|
2750
|
+
structure["path"] = self.path
|
2751
|
+
structure["children"] = [child.get_simplified_structure() for child in self.children]
|
2752
|
+
else:
|
2753
|
+
structure["group"] = False
|
2754
|
+
structure["tag"] = self.name
|
2755
|
+
structure["taxonType"] = self.taxon_type
|
2756
|
+
return structure
|
2698
2757
|
|
2699
2758
|
|
2700
2759
|
class ContentObject(BaseModel):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "kodexa"
|
3
|
-
version = "7.0.
|
3
|
+
version = "7.0.010965762452"
|
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.0.10946707979 → kodexa-7.0.10965762452}/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
|
{kodexa-7.0.10946707979 → kodexa-7.0.10965762452}/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
|
File without changes
|