kodexa 7.4.413041815779__tar.gz → 7.4.413042948012__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/PKG-INFO +1 -1
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/dataclasses/__init__.py +10 -4
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/pyproject.toml +1 -1
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/LICENSE +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/README.md +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/__init__.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/assistant/__init__.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/assistant/assistant.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/connectors/__init__.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/connectors/connectors.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/dataclasses/templates/llm_data_class.j2 +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/model/__init__.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/model/base.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/model/entities/__init__.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/model/entities/check_response.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/model/entities/product.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/model/entities/product_group.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/model/entities/product_subscription.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/model/model.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/model/objects.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/model/persistence.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/model/utils.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/pipeline/__init__.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/pipeline/pipeline.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/platform/__init__.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/platform/client.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/platform/interaction.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/platform/kodexa.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/selectors/__init__.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/selectors/ast.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/selectors/core.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/selectors/lexrules.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/selectors/lextab.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/selectors/lextab.pyi +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/selectors/parserules.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/selectors/parserules.pyi +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/selectors/parsetab.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/selectors/parsetab.pyi +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/spatial/__init__.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/spatial/azure_models.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/spatial/bbox_common.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/spatial/table_form_common.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/steps/__init__.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/steps/common.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/testing/__init__.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/testing/test_components.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/testing/test_utils.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/training/__init__.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/training/train_utils.py +0 -0
- {kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/kodexa/utils/__init__.py +0 -0
@@ -173,10 +173,16 @@ class LLMDataObject(BaseModel):
|
|
173
173
|
value = getattr(self, field)
|
174
174
|
|
175
175
|
if isinstance(value, list) and len(value) > 0:
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
176
|
+
if isinstance(value[0], LLMDataObject):
|
177
|
+
# We need to find the first field of the object that is a LLMDataAttribute
|
178
|
+
# and use that to derive the taxon path of the LLMDataObject
|
179
|
+
value[0].__fields__.sort(key=lambda x: isinstance(getattr(value[0], x), LLMDataAttribute))
|
180
|
+
if isinstance(getattr(value[0], value[0].__fields__[0]), LLMDataAttribute):
|
181
|
+
# Get the basename of the taxon path (ie. if the taxon path is "a/b/c", get "a/b")
|
182
|
+
taxon_path = getattr(value[0], value[0].__fields__[0]).taxon_path.rsplit('/', 1)[0]
|
183
|
+
target_taxon = taxonomy.get_taxon_by_path(taxon_path)
|
184
|
+
if target_taxon is not None:
|
185
|
+
result[target_taxon.external_name] = [item.to_dict(taxonomy) for item in value if isinstance(item, (LLMDataObject, LLMDataAttribute))]
|
180
186
|
elif isinstance(value, LLMDataAttribute):
|
181
187
|
result.update(value.to_dict(taxonomy))
|
182
188
|
elif isinstance(value, LLMDataObject):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "kodexa"
|
3
|
-
version = "7.4.
|
3
|
+
version = "7.4.413042948012"
|
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
|
{kodexa-7.4.413041815779 → kodexa-7.4.413042948012}/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.413041815779 → kodexa-7.4.413042948012}/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
|
File without changes
|
File without changes
|