kodexa 7.0.11015585738__py3-none-any.whl → 7.0.11037532897__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.
kodexa/model/objects.py CHANGED
@@ -1,8 +1,8 @@
1
1
  from __future__ import annotations
2
2
 
3
+ from typing import Union
3
4
  from enum import Enum
4
- from typing import Any, Dict, List, Optional, Union
5
-
5
+ from typing import Optional, List, Dict, Any
6
6
  from pydantic import AnyUrl, Field, RootModel, BaseModel, ConfigDict
7
7
 
8
8
  from kodexa.model.base import StandardDateTime
@@ -990,7 +990,6 @@ class ValuePath(Enum):
990
990
  external = "EXTERNAL"
991
991
 
992
992
 
993
-
994
993
  class MetadataValue(Enum):
995
994
  """Enumeration representing different metadata values.
996
995
 
@@ -2510,24 +2509,43 @@ class ProjectAssistant(BaseModel):
2510
2509
  assistant_role: Optional[str] = Field(None, alias="assistantRole")
2511
2510
 
2512
2511
 
2513
- class TaxonConditionalFormat(BaseModel):
2514
- model_config = ConfigDict(
2515
- populate_by_name=True,
2516
- use_enum_values=True,
2517
- arbitrary_types_allowed=True,
2518
- protected_namespaces=("model_config",),
2519
- )
2512
+ class LexicalRelationType(Enum):
2513
+ SYNONYM = "SYNONYM"
2514
+ ANTONYM = "ANTONYM"
2515
+ HYPERNYM = "HYPERNYM"
2516
+ HYPONYM = "HYPONYM"
2517
+ MERONYM = "MERONYM"
2518
+ HOLONYM = "HOLONYM"
2519
+ ENTAILMENT = "ENTAILMENT"
2520
+ SIMILAR_TO = "SIMILAR_TO"
2521
+ OTHER = "OTHER"
2522
+
2523
+
2524
+ class LexicalRelation(BaseModel):
2525
+ type: Optional[LexicalRelationType] = None
2526
+ words: Optional[str] = None
2527
+ weight: Optional[float] = None
2520
2528
 
2521
- type: Optional[str] = None
2522
- condition: Optional[str] = None
2523
- properties: Optional[Dict[str, Any]] = Field(default_factory=dict)
2529
+
2530
+ class TaxonValuePath(Enum):
2531
+ VALUE_OR_ALL_CONTENT = "VALUE_OR_ALL_CONTENT"
2532
+ VALUE_ONLY = "VALUE_ONLY"
2533
+ ALL_CONTENT = "ALL_CONTENT"
2534
+ DATA_PATH = "DATA_PATH"
2535
+ METADATA = "METADATA"
2536
+ EXPRESSION = "EXPRESSION"
2537
+ SCRIPT = "SCRIPT"
2538
+ FORMULA = "FORMULA"
2539
+ DERIVED = "DERIVED"
2540
+ REVIEW = "REVIEW"
2541
+ EXTERNAL = "EXTERNAL"
2524
2542
 
2525
2543
 
2526
2544
  class TaxonCardinality(Enum):
2527
- once_per_document = "ONCE_PER_DOCUMENT"
2528
- multiple_per_document = "MULTIPLE_PER_DOCUMENT"
2529
- once_per_segment = "ONCE_PER_SEGMENT"
2530
- multiple_per_segment = "MULTIPLE_PER_SEGMENT"
2545
+ ONCE_PER_DOCUMENT = "ONCE_PER_DOCUMENT"
2546
+ MULTIPLE_PER_DOCUMENT = "MULTIPLE_PER_DOCUMENT"
2547
+ ONCE_PER_SEGMENT = "ONCE_PER_SEGMENT"
2548
+ MULTIPLE_PER_SEGMENT = "MULTIPLE_PER_SEGMENT"
2531
2549
 
2532
2550
 
2533
2551
  class TaxonAdditionContext(BaseModel):
@@ -2540,9 +2558,13 @@ class TaxonGuideProperties(BaseModel):
2540
2558
  guidance_key: Optional[bool] = Field(None, alias="guidanceKey")
2541
2559
 
2542
2560
 
2561
+ class TaxonConditionalFormat(BaseModel):
2562
+ type: Optional[str] = None
2563
+ condition: Optional[str] = None
2564
+ properties: Dict[str, Any] = Field(default_factory=dict)
2565
+
2543
2566
 
2544
2567
  class TaxonRule(BaseModel):
2545
-
2546
2568
  name: Optional[str] = None
2547
2569
  description: Optional[str] = None
2548
2570
  rule_formula: Optional[str] = None
@@ -2559,151 +2581,48 @@ class Taxon(BaseModel):
2559
2581
  protected_namespaces=("model_config",),
2560
2582
  )
2561
2583
 
2562
- id: Optional[str] = Field(None, description="The ID of the taxon")
2563
- label: Optional[str] = Field(None, description="The text to display for this taxon")
2564
- generate_name: Optional[bool] = Field(
2565
- None,
2566
- alias="generateName",
2567
- description="Is the name generated, this allows that you can change displays without impacted existing content",
2568
- )
2569
- group: Optional[bool] = Field(
2570
- None,
2571
- description="Is this taxon a group, and therefore can't have a value, can only have children",
2572
- )
2573
- name: str = Field(
2574
- ..., description="The name to be used", pattern=r"^[a-zA-Z0-9\-_]{0,255}$"
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
- )
2581
- external_name: Optional[str] = Field(
2582
- None,
2583
- alias="externalName",
2584
- description="The name to be used when we are publishing this taxon to external systems",
2585
- )
2586
- value_path: Optional[ValuePath] = Field(
2587
- None,
2588
- alias="valuePath",
2589
- description="Where to get the value for this taxon when extracting",
2590
- )
2591
- metadata_value: Optional[MetadataValue] = Field(
2592
- None,
2593
- alias="metadataValue",
2594
- description="If the type is metadata this will be the metadata option",
2595
- )
2596
- data_path: Optional[str] = Field(
2597
- None,
2598
- alias="dataPath",
2599
- description="The path to the data, based on the data inside the label (tag) within the document",
2600
- )
2601
- expression: Optional[str] = Field(
2602
- None,
2603
- description="If the taxon is based on expression, this is the expression based on the available objects",
2604
- )
2605
- enable_fallback_expression: Optional[bool] = Field(
2606
- None,
2607
- alias="enableFallbackExpression",
2608
- description="Allow for the use of a fallback expression if the taxon wasn't found",
2609
- )
2610
- fallback_expression: Optional[str] = Field(
2611
- None,
2612
- alias="fallbackExpression",
2613
- description="Fallback expression if enabled, this is the expression based on the available objects",
2614
- )
2615
- nullable: Optional[bool] = Field(
2616
- None, description="Determine if the value of the taxon can be null (unknown)"
2617
- )
2618
- null_value: Optional[str] = Field(
2619
- None,
2620
- alias="nullValue",
2621
- description="Allows the setting of a value to replace null if the taxon is nullable",
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
- )
2633
- description: Optional[str] = Field(None, description="The description of the taxon")
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")
2640
- enabled: Optional[bool] = Field(
2641
- True, description="Is the taxon enabled (used in the UI)"
2642
- )
2643
- color: Optional[str] = Field(
2644
- None, description="Hex encoding of the color to use for the taxon"
2645
- )
2646
- children: Optional[List['Taxon']] = Field(
2647
- [], description="The children under this taxon"
2648
- )
2649
- options: Optional[List[Option]] = Field(
2650
- [],
2651
- description="Options that can be shown for the taxon (usually used in assistant taxonomies)",
2652
- )
2653
- node_types: Optional[List[str]] = Field(
2654
- [],
2655
- alias="nodeTypes",
2656
- description="A list of the node types that this taxon applies to (empty means everything), used in the UI",
2657
- )
2658
- taxon_type: Optional[TaxonType] = Field(
2659
- TaxonType.string,
2660
- alias="taxonType",
2661
- description="Expected data type to coalesce to (defaults to STRING)",
2662
- )
2663
- selection_options: Optional[List[SelectionOption]] = Field(
2664
- [],
2665
- alias="selectionOptions",
2666
- description="If data type is SELECTION, this is the list of available options",
2667
- )
2668
- type_features: Optional[Dict[str, Any]] = Field(
2669
- {},
2670
- alias="typeFeatures",
2671
- description="Additional features for the type handling",
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
- )
2690
- path: Optional[str] = Field(None, description="The path to the node")
2691
- multi_value: Optional[bool] = Field(
2692
- True, alias="multiValue", description="Does this taxon allow multiple values (for none-group)"
2693
- )
2694
- user_editable: Optional[bool] = Field(
2695
- True,
2696
- alias="userEditable",
2697
- description="Can the value of this taxon be edited by a user",
2698
- )
2699
- use_post_expression: Optional[bool] = Field(
2700
- False, alias="usePostExpression", description="Use a post extraction expression"
2701
- )
2702
- post_expression: Optional[str] = Field(
2703
- None,
2704
- alias="postExpression",
2705
- description="An expression that is applied post extraction of the data",
2706
- )
2584
+ id: Optional[str] = None
2585
+ label: Optional[str] = None
2586
+ generate_name: Optional[bool] = Field(None, alias="generateName")
2587
+ group: Optional[bool] = None
2588
+ name: str = Field(..., pattern=r"^[a-zA-Z0-9\-_]{0,255}$")
2589
+ select_weight: Optional[int] = Field(1, alias="selectWeight")
2590
+ external_name: Optional[str] = Field(None, alias="externalName")
2591
+ value_path: Optional[TaxonValuePath] = Field(None, alias="valuePath")
2592
+ metadata_value: Optional[MetadataValue] = Field(None, alias="metadataValue")
2593
+ data_path: Optional[str] = Field(None, alias="dataPath")
2594
+ expression: Optional[str] = None
2595
+ enable_fallback_expression: Optional[bool] = Field(None, alias="enableFallbackExpression")
2596
+ fallback_expression: Optional[str] = Field(None, alias="fallbackExpression")
2597
+ nullable: Optional[bool] = None
2598
+ null_value: Optional[str] = Field(None, alias="nullValue")
2599
+ denormalize_to_children: Optional[bool] = Field(False, alias="denormalizeToChildren")
2600
+ not_user_labelled: Optional[bool] = Field(False, alias="notUserLabelled")
2601
+ description: Optional[str] = None
2602
+ overview_markdown: Optional[str] = Field(None, alias="overviewMarkdown")
2603
+ semantic_definition: Optional[str] = Field(None, alias="semanticDefinition")
2604
+ synonyms: Optional[List[str]] = None
2605
+ lexical_relations: Optional[List[LexicalRelation]] = None
2606
+ addition_contexts: Optional[List[TaxonAdditionContext]] = Field([], alias="additionContexts")
2607
+ guide_properties: Optional[TaxonGuideProperties] = Field(None, alias="guideProperties")
2608
+ enabled: Optional[bool] = True
2609
+ color: Optional[str] = None
2610
+ children: Optional[List['Taxon']] = Field(default_factory=list)
2611
+ options: Optional[List[Any]] = Field(default_factory=list)
2612
+ node_types: Optional[List[str]] = Field(default_factory=list, alias="nodeTypes")
2613
+ taxon_type: Optional[TaxonType] = Field("STRING", alias="taxonType")
2614
+ selection_options: Optional[List[SelectionOption]] = Field(default_factory=list, alias="selectionOptions")
2615
+ type_features: Optional[Dict[str, Any]] = Field(default_factory=dict, alias="typeFeatures")
2616
+ properties: Optional[Dict[str, Any]] = Field(default_factory=dict)
2617
+ conditional_formats: Optional[List[TaxonConditionalFormat]] = Field(default_factory=list,
2618
+ alias="conditionalFormats")
2619
+ rules: Optional[List[TaxonRule]] = Field(default_factory=list)
2620
+ cardinality: Optional[TaxonCardinality] = None
2621
+ path: Optional[str] = None
2622
+ multi_value: Optional[bool] = Field(True, alias="multiValue")
2623
+ user_editable: Optional[bool] = Field(True, alias="userEditable")
2624
+ use_post_expression: Optional[bool] = Field(False, alias="usePostExpression")
2625
+ post_expression: Optional[str] = Field(None, alias="postExpression")
2707
2626
 
2708
2627
  def update_path(self, parent_path=""):
2709
2628
  self.path = parent_path + "/" + self.name if parent_path else self.name
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kodexa
3
- Version: 7.0.11015585738
3
+ Version: 7.0.11037532897
4
4
  Summary: Python SDK for the Kodexa Platform
5
5
  Author: Austin Redenbaugh
6
6
  Author-email: austin@kodexa.com
@@ -18,7 +18,7 @@ Requires-Dist: appdirs (>=1.4.4,<2.0.0)
18
18
  Requires-Dist: better-exceptions (>=0.3.3,<0.4.0)
19
19
  Requires-Dist: certifi (>=2024.7.4,<2025.0.0)
20
20
  Requires-Dist: chevron (>=0.14.0,<0.15.0)
21
- Requires-Dist: deepdiff (>=7.0.1,<8.0.0)
21
+ Requires-Dist: deepdiff (>=8.0.1,<9.0.0)
22
22
  Requires-Dist: msgpack (>=1.0.6,<2.0.0)
23
23
  Requires-Dist: ply (>=3.11,<4.0)
24
24
  Requires-Dist: pydantic (>=2.5.3,<3.0.0)
@@ -12,7 +12,7 @@ kodexa/model/entities/check_response.py,sha256=eqBHxO6G2OAziL3p9bHGI-oiPkAG82H6C
12
12
  kodexa/model/entities/product.py,sha256=ZDpHuBE_9FJ-klnkyBvTfPwYOqBkM1wraZMtHqNA8FQ,3526
13
13
  kodexa/model/entities/product_subscription.py,sha256=UcmWR-qgLfdV7VCtJNwzgkanoS8nBSL6ngVuxQUK1M8,3810
14
14
  kodexa/model/model.py,sha256=Ay3X9rsoJaUdG51WysSDPp2iy_cnz4eEYJgWdC25uio,118058
15
- kodexa/model/objects.py,sha256=BZoXvmk0D-gL8MQEQJObhw8sP82XTQcpcxjlRXITsTY,179224
15
+ kodexa/model/objects.py,sha256=7WbKiF7rukJlV69gsregspL2WMvJwRcnTXW8PQe4LuI,176311
16
16
  kodexa/model/persistence.py,sha256=w4WGS_qH1iowH8-ZMawZBZ2RFW3bNvmFy5fgSwr6VmQ,66198
17
17
  kodexa/pipeline/__init__.py,sha256=sA7f5D6qkdMrpp2xTIeefnrUBI6xxEEWostvxfX_1Cs,236
18
18
  kodexa/pipeline/pipeline.py,sha256=ZYpJAWcwV4YRK589DUhU0vXGQlkNSj4J2TsGbYqTLjo,25221
@@ -42,7 +42,7 @@ kodexa/testing/test_utils.py,sha256=DrLCkHxdb6AbZ-X3WmTMbQmnVIm55VEBL8MjtUK9POs,
42
42
  kodexa/training/__init__.py,sha256=xs2L62YpRkIRfslQwtQZ5Yxjhm7sLzX2TrVX6EuBnZQ,52
43
43
  kodexa/training/train_utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
44
  kodexa/utils/__init__.py,sha256=Pnim1o9_db5YEnNvDTxpM7HG-qTlL6n8JwFwOafU9wo,5928
45
- kodexa-7.0.11015585738.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
46
- kodexa-7.0.11015585738.dist-info/METADATA,sha256=Hp1WSD7OoLJ1DwWpm7UDTrMBv_6iFQ5vE2ws1kI7_oI,3529
47
- kodexa-7.0.11015585738.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
48
- kodexa-7.0.11015585738.dist-info/RECORD,,
45
+ kodexa-7.0.11037532897.dist-info/LICENSE,sha256=WNHhf_5RCaeuKWyq_K39vmp9F28LxKsB4SpomwSZ2L0,11357
46
+ kodexa-7.0.11037532897.dist-info/METADATA,sha256=oHwi4YND0zAto8D5AYET8UCGHI-0bw985ax5FgxmOa8,3529
47
+ kodexa-7.0.11037532897.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
48
+ kodexa-7.0.11037532897.dist-info/RECORD,,