kodexa 7.0.9115195405__tar.gz → 7.0.9196745246__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.
Files changed (44) hide show
  1. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/PKG-INFO +3 -3
  2. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/platform/client.py +27 -44
  3. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/pyproject.toml +7 -7
  4. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/LICENSE +0 -0
  5. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/README.md +0 -0
  6. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/__init__.py +0 -0
  7. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/assistant/__init__.py +0 -0
  8. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/assistant/assistant.py +0 -0
  9. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/connectors/__init__.py +0 -0
  10. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/connectors/connectors.py +0 -0
  11. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/model/__init__.py +0 -0
  12. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/model/base.py +0 -0
  13. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/model/entities/__init__.py +0 -0
  14. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/model/entities/product.py +0 -0
  15. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/model/entities/product_subscription.py +0 -0
  16. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/model/model.py +0 -0
  17. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/model/objects.py +0 -0
  18. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/model/persistence.py +0 -0
  19. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/pipeline/__init__.py +0 -0
  20. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/pipeline/pipeline.py +0 -0
  21. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/platform/__init__.py +0 -0
  22. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/platform/interaction.py +0 -0
  23. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/platform/kodexa.py +0 -0
  24. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/selectors/__init__.py +0 -0
  25. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/selectors/ast.py +0 -0
  26. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/selectors/core.py +0 -0
  27. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/selectors/lexrules.py +0 -0
  28. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/selectors/lextab.py +0 -0
  29. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/selectors/lextab.pyi +0 -0
  30. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/selectors/parserules.py +0 -0
  31. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/selectors/parserules.pyi +0 -0
  32. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/selectors/parsetab.py +0 -0
  33. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/selectors/parsetab.pyi +0 -0
  34. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/spatial/__init__.py +0 -0
  35. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/spatial/azure_models.py +0 -0
  36. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/spatial/bbox_common.py +0 -0
  37. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/spatial/table_form_common.py +0 -0
  38. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/steps/__init__.py +0 -0
  39. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/steps/common.py +0 -0
  40. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/testing/__init__.py +0 -0
  41. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/testing/test_components.py +0 -0
  42. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/testing/test_utils.py +0 -0
  43. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/training/__init__.py +0 -0
  44. {kodexa-7.0.9115195405 → kodexa-7.0.9196745246}/kodexa/training/train_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kodexa
3
- Version: 7.0.9115195405
3
+ Version: 7.0.9196745246
4
4
  Summary: Python SDK for the Kodexa Platform
5
5
  Author: Austin Redenbaugh
6
6
  Author-email: austin@kodexa.com
@@ -17,12 +17,12 @@ Requires-Dist: addict (>=2.4.0,<3.0.0)
17
17
  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: chevron (>=0.14.0,<0.15.0)
20
- Requires-Dist: deepdiff (>=6.5.0,<7.0.0)
20
+ Requires-Dist: deepdiff (>=7.0.1,<8.0.0)
21
21
  Requires-Dist: msgpack (>=1.0.6,<2.0.0)
22
22
  Requires-Dist: ply (>=3.11,<4.0)
23
23
  Requires-Dist: pydantic (>=2.5.3,<3.0.0)
24
24
  Requires-Dist: pydantic-yaml (>=1.0.0,<2.0.0)
25
- Requires-Dist: pyfunctional (>=1.4.3,<1.5.0)
25
+ Requires-Dist: pyfunctional (==1.5.0)
26
26
  Requires-Dist: python-dateutil (>=2.8.2,<3.0.0)
27
27
  Requires-Dist: pyyaml (>=6.0,<7.0)
28
28
  Requires-Dist: requests (>=2.28.1,<3.0.0)
@@ -2151,13 +2151,13 @@ class ProjectTaxonomiesEndpoint(ProjectResourceEndpoint):
2151
2151
  return TaxonomyEndpoint
2152
2152
 
2153
2153
 
2154
- class ProjectGuidanceEndpoint(ProjectResourceEndpoint):
2154
+ class ProjectGuidanceSetsEndpoint(ProjectResourceEndpoint):
2155
2155
 
2156
2156
  def get_type(self) -> str:
2157
2157
  return "guidance"
2158
2158
 
2159
2159
  def get_instance_class(self, object_dict=None):
2160
- return GuidanceSetEndpoint
2160
+ return GuidanceSetsEndpoint
2161
2161
 
2162
2162
 
2163
2163
  class ProjectDataFormEndpoint(ProjectResourceEndpoint):
@@ -2459,7 +2459,7 @@ class ProjectEndpoint(EntityEndpoint, Project):
2459
2459
  stores: List["StoreEndpoint"] = None,
2460
2460
  taxonomies: List["TaxonomyEndpoint"] = None,
2461
2461
  data_forms: List["DataFormEndpoint"] = None,
2462
- guidance: List["GuidanceSetEndpoint"] = None,
2462
+ guidance: List["GuidanceSetsEndpoint"] = None,
2463
2463
  dashboards: List["DashboardEndpoint"] = None,
2464
2464
  ):
2465
2465
  """Update the resources of the project.
@@ -2540,13 +2540,13 @@ class ProjectEndpoint(EntityEndpoint, Project):
2540
2540
  return ProjectTaxonomiesEndpoint().set_client(self.client).set_project(self)
2541
2541
 
2542
2542
  @property
2543
- def guidance(self) -> "GuidanceEndpoint":
2543
+ def guidance(self) -> "ProjectGuidanceEndpoint":
2544
2544
  """Get the guidance sets endpoint of the project.
2545
2545
 
2546
2546
  Returns:
2547
2547
  GuidanceSetsEndpoint: The guidance sets endpoint of the project.
2548
2548
  """
2549
- return ProjectGuidanceEndpoint().set_client(self.client).set_project(self)
2549
+ return ProjectGuidanceSetEndpoint().set_client(self.client).set_project(self)
2550
2550
 
2551
2551
  @property
2552
2552
  def assistants(self) -> ProjectAssistantsEndpoint:
@@ -2582,42 +2582,6 @@ class ProjectEndpoint(EntityEndpoint, Project):
2582
2582
  return [ProjectTag.model_validate(tag) for tag in response.json()]
2583
2583
 
2584
2584
 
2585
- class GuidanceSetsEndpoint(EntitiesEndpoint):
2586
- """Represents a message endpoint"""
2587
-
2588
- def get_type(self) -> str:
2589
- """
2590
- Get the type of the endpoint.
2591
-
2592
- Returns:
2593
- str: The type of the endpoint, in this case "guidance".
2594
- """
2595
- return "guidance"
2596
-
2597
- def get_instance_class(self, object_dict=None):
2598
- """
2599
- Get the instance class of the endpoint.
2600
-
2601
- Args:
2602
- object_dict (dict, optional): An optional dictionary object. Defaults to None.
2603
-
2604
- Returns:
2605
- GuidanceSetEndpoint: The instance class of the endpoint.
2606
- """
2607
- return GuidanceSetEndpoint
2608
-
2609
- def get_page_class(self, object_dict=None):
2610
- """
2611
- Get the page class of the endpoint.
2612
-
2613
- Args:
2614
- object_dict (dict, optional): An optional dictionary object. Defaults to None.
2615
-
2616
- Returns:
2617
- PageGuidanceSetEndpoint: The page class of the endpoint.
2618
- """
2619
- return PageGuidanceSetEndpoint
2620
-
2621
2585
 
2622
2586
  class MessagesEndpoint(EntitiesEndpoint):
2623
2587
  """Represents a message endpoint"""
@@ -3003,9 +2967,9 @@ class StoresEndpoint(ComponentEndpoint, ClientEndpoint, OrganizationOwned):
3003
2967
  raise ValueError(f"Unknown store type {object_dict['storeType']}")
3004
2968
 
3005
2969
 
3006
- class GuidanceEndpoint(ComponentEndpoint, ClientEndpoint, OrganizationOwned):
2970
+ class GuidanceSetsEndpoint(ComponentEndpoint, ClientEndpoint, OrganizationOwned):
3007
2971
  """
3008
- Represents a guidance endpoint.
2972
+ Represents a guidance set endpoint.
3009
2973
 
3010
2974
  This class is used to interact with the guidance endpoint of the API.
3011
2975
  It provides methods to get the type, page class, and instance class of the endpoint,
@@ -6027,7 +5991,7 @@ OBJECT_TYPES = {
6027
5991
  "name": "guidance",
6028
5992
  "plural": "guidance",
6029
5993
  "type": GuidanceSetEndpoint,
6030
- "endpoint": GuidanceEndpoint,
5994
+ "endpoint": GuidanceSetsEndpoint,
6031
5995
  },
6032
5996
  "modelRuntimes": {
6033
5997
  "name": "modelRuntime",
@@ -6652,6 +6616,18 @@ class KodexaClient:
6652
6616
  )
6653
6617
  )
6654
6618
 
6619
+ for guidance in project.guidance.list():
6620
+ guidance_file = os.path.join(
6621
+ project_export_dir, f"guidance-{guidance.slug}-{guidance.version}.json"
6622
+ )
6623
+ with open(guidance_file, "w") as f:
6624
+ f.write(
6625
+ json.dumps(
6626
+ guidance.model_dump(mode="json", by_alias=True), indent=4
6627
+ )
6628
+ )
6629
+
6630
+
6655
6631
  def import_project(self, organization: OrganizationEndpoint, import_path: str):
6656
6632
  """
6657
6633
  A method to import a project.
@@ -6745,6 +6721,13 @@ class KodexaClient:
6745
6721
  taxonomy.ref = None
6746
6722
  taxonomies.append(organization.taxonomies.create(taxonomy))
6747
6723
 
6724
+ for guidance_file in glob.glob(os.path.join(import_path, "guidance-*.json")):
6725
+ with open(guidance_file, "r") as f:
6726
+ guidance = GuidanceSetEndpoint.model_validate(json.load(f))
6727
+ guidance.org_slug = None
6728
+ guidance.ref = None
6729
+ organization.guidance.create(guidance)
6730
+
6748
6731
  import time
6749
6732
 
6750
6733
  time.sleep(4)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "kodexa"
3
- version = "7.0.09115195405"
3
+ version = "7.0.09196745246"
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"
@@ -24,11 +24,11 @@ msgpack = "^1.0.6"
24
24
  urllib3 = "^2.0.0"
25
25
  ply = ">=3.11,<4.0"
26
26
  pyyaml = "^6.0"
27
- deepdiff = "^6.5.0"
27
+ deepdiff = "^7.0.1"
28
28
  appdirs = "^1.4.4"
29
29
  python-dateutil = "^2.8.2"
30
- better-exceptions = ">=0.3.3,<0.4.0"
31
- pyfunctional = ">=1.4.3,<1.5.0"
30
+ better-exceptions = "^0.3.3"
31
+ pyfunctional = "1.5.0"
32
32
  pydantic = "^2.5.3"
33
33
  pydantic-yaml = "^1.0.0"
34
34
  semver = "^3.0.1"
@@ -40,9 +40,9 @@ simpleeval = "^0.9.13"
40
40
  mkdocs-material = "^9.0.3"
41
41
  pytest = "^7.2.0"
42
42
  pytest-runner = "^6.0.0"
43
- mypy = "^0.991"
44
- flake8 = "^6.0.0"
45
- pandas = "1.4.3"
43
+ mypy = "^1.10.0"
44
+ flake8 = "^7.0.0"
45
+ pandas = "2.2.2"
46
46
  setuptools = "^65.5.1"
47
47
  black = ">=23.7,<25.0"
48
48
  mkdocstrings = "^0.22.0"
File without changes