kodexa 7.0.9115250793__tar.gz → 7.0.9196860276__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.9115250793 → kodexa-7.0.9196860276}/PKG-INFO +1 -1
  2. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/platform/client.py +41 -45
  3. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/pyproject.toml +1 -1
  4. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/LICENSE +0 -0
  5. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/README.md +0 -0
  6. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/__init__.py +0 -0
  7. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/assistant/__init__.py +0 -0
  8. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/assistant/assistant.py +0 -0
  9. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/connectors/__init__.py +0 -0
  10. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/connectors/connectors.py +0 -0
  11. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/model/__init__.py +0 -0
  12. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/model/base.py +0 -0
  13. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/model/entities/__init__.py +0 -0
  14. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/model/entities/product.py +0 -0
  15. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/model/entities/product_subscription.py +0 -0
  16. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/model/model.py +0 -0
  17. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/model/objects.py +0 -0
  18. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/model/persistence.py +0 -0
  19. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/pipeline/__init__.py +0 -0
  20. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/pipeline/pipeline.py +0 -0
  21. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/platform/__init__.py +0 -0
  22. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/platform/interaction.py +0 -0
  23. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/platform/kodexa.py +0 -0
  24. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/selectors/__init__.py +0 -0
  25. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/selectors/ast.py +0 -0
  26. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/selectors/core.py +0 -0
  27. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/selectors/lexrules.py +0 -0
  28. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/selectors/lextab.py +0 -0
  29. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/selectors/lextab.pyi +0 -0
  30. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/selectors/parserules.py +0 -0
  31. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/selectors/parserules.pyi +0 -0
  32. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/selectors/parsetab.py +0 -0
  33. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/selectors/parsetab.pyi +0 -0
  34. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/spatial/__init__.py +0 -0
  35. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/spatial/azure_models.py +0 -0
  36. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/spatial/bbox_common.py +0 -0
  37. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/spatial/table_form_common.py +0 -0
  38. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/steps/__init__.py +0 -0
  39. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/steps/common.py +0 -0
  40. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/testing/__init__.py +0 -0
  41. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/testing/test_components.py +0 -0
  42. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/testing/test_utils.py +0 -0
  43. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/kodexa/training/__init__.py +0 -0
  44. {kodexa-7.0.9115250793 → kodexa-7.0.9196860276}/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.9115250793
3
+ Version: 7.0.9196860276
4
4
  Summary: Python SDK for the Kodexa Platform
5
5
  Author: Austin Redenbaugh
6
6
  Author-email: austin@kodexa.com
@@ -1550,6 +1550,20 @@ class OrganizationEndpoint(Organization, EntityEndpoint):
1550
1550
  .set_client(self.client)
1551
1551
  )
1552
1552
 
1553
+ @property
1554
+ def guidance_sets(self) -> "GuidanceSetsEndpoint":
1555
+ """
1556
+ Get the guidance sets endpoint of the organization.
1557
+
1558
+ Returns:
1559
+ GuidanceSetsEndpoint: The guidance sets endpoint of the organization.
1560
+ """
1561
+ return (
1562
+ GuidanceSetsEndpoint()
1563
+ .set_organization(self)
1564
+ .set_client(self.client)
1565
+ )
1566
+
1553
1567
  @property
1554
1568
  def credentials(self):
1555
1569
  """
@@ -2151,13 +2165,13 @@ class ProjectTaxonomiesEndpoint(ProjectResourceEndpoint):
2151
2165
  return TaxonomyEndpoint
2152
2166
 
2153
2167
 
2154
- class ProjectGuidanceEndpoint(ProjectResourceEndpoint):
2168
+ class ProjectGuidanceSetsEndpoint(ProjectResourceEndpoint):
2155
2169
 
2156
2170
  def get_type(self) -> str:
2157
2171
  return "guidance"
2158
2172
 
2159
2173
  def get_instance_class(self, object_dict=None):
2160
- return GuidanceSetEndpoint
2174
+ return GuidanceSetsEndpoint
2161
2175
 
2162
2176
 
2163
2177
  class ProjectDataFormEndpoint(ProjectResourceEndpoint):
@@ -2459,7 +2473,7 @@ class ProjectEndpoint(EntityEndpoint, Project):
2459
2473
  stores: List["StoreEndpoint"] = None,
2460
2474
  taxonomies: List["TaxonomyEndpoint"] = None,
2461
2475
  data_forms: List["DataFormEndpoint"] = None,
2462
- guidance: List["GuidanceSetEndpoint"] = None,
2476
+ guidance: List["GuidanceSetsEndpoint"] = None,
2463
2477
  dashboards: List["DashboardEndpoint"] = None,
2464
2478
  ):
2465
2479
  """Update the resources of the project.
@@ -2540,13 +2554,13 @@ class ProjectEndpoint(EntityEndpoint, Project):
2540
2554
  return ProjectTaxonomiesEndpoint().set_client(self.client).set_project(self)
2541
2555
 
2542
2556
  @property
2543
- def guidance(self) -> "GuidanceEndpoint":
2557
+ def guidance(self) -> "ProjectGuidanceEndpoint":
2544
2558
  """Get the guidance sets endpoint of the project.
2545
2559
 
2546
2560
  Returns:
2547
2561
  GuidanceSetsEndpoint: The guidance sets endpoint of the project.
2548
2562
  """
2549
- return ProjectGuidanceEndpoint().set_client(self.client).set_project(self)
2563
+ return ProjectGuidanceSetEndpoint().set_client(self.client).set_project(self)
2550
2564
 
2551
2565
  @property
2552
2566
  def assistants(self) -> ProjectAssistantsEndpoint:
@@ -2582,42 +2596,6 @@ class ProjectEndpoint(EntityEndpoint, Project):
2582
2596
  return [ProjectTag.model_validate(tag) for tag in response.json()]
2583
2597
 
2584
2598
 
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
2599
 
2622
2600
  class MessagesEndpoint(EntitiesEndpoint):
2623
2601
  """Represents a message endpoint"""
@@ -3003,9 +2981,9 @@ class StoresEndpoint(ComponentEndpoint, ClientEndpoint, OrganizationOwned):
3003
2981
  raise ValueError(f"Unknown store type {object_dict['storeType']}")
3004
2982
 
3005
2983
 
3006
- class GuidanceEndpoint(ComponentEndpoint, ClientEndpoint, OrganizationOwned):
2984
+ class GuidanceSetsEndpoint(ComponentEndpoint, ClientEndpoint, OrganizationOwned):
3007
2985
  """
3008
- Represents a guidance endpoint.
2986
+ Represents a guidance set endpoint.
3009
2987
 
3010
2988
  This class is used to interact with the guidance endpoint of the API.
3011
2989
  It provides methods to get the type, page class, and instance class of the endpoint,
@@ -6027,7 +6005,7 @@ OBJECT_TYPES = {
6027
6005
  "name": "guidance",
6028
6006
  "plural": "guidance",
6029
6007
  "type": GuidanceSetEndpoint,
6030
- "endpoint": GuidanceEndpoint,
6008
+ "endpoint": GuidanceSetsEndpoint,
6031
6009
  },
6032
6010
  "modelRuntimes": {
6033
6011
  "name": "modelRuntime",
@@ -6265,7 +6243,6 @@ class KodexaClient:
6265
6243
  self.messages = MessagesEndpoint(self)
6266
6244
  from kodexa.model.entities.product import ProductsEndpoint
6267
6245
  self.products = ProductsEndpoint(self)
6268
- self.guidance_sets = GuidanceSetsEndpoint(self)
6269
6246
 
6270
6247
  @staticmethod
6271
6248
  def login(url, token):
@@ -6652,6 +6629,18 @@ class KodexaClient:
6652
6629
  )
6653
6630
  )
6654
6631
 
6632
+ for guidance in project.guidance.list():
6633
+ guidance_file = os.path.join(
6634
+ project_export_dir, f"guidance-{guidance.slug}-{guidance.version}.json"
6635
+ )
6636
+ with open(guidance_file, "w") as f:
6637
+ f.write(
6638
+ json.dumps(
6639
+ guidance.model_dump(mode="json", by_alias=True), indent=4
6640
+ )
6641
+ )
6642
+
6643
+
6655
6644
  def import_project(self, organization: OrganizationEndpoint, import_path: str):
6656
6645
  """
6657
6646
  A method to import a project.
@@ -6745,6 +6734,13 @@ class KodexaClient:
6745
6734
  taxonomy.ref = None
6746
6735
  taxonomies.append(organization.taxonomies.create(taxonomy))
6747
6736
 
6737
+ for guidance_file in glob.glob(os.path.join(import_path, "guidance-*.json")):
6738
+ with open(guidance_file, "r") as f:
6739
+ guidance = GuidanceSetEndpoint.model_validate(json.load(f))
6740
+ guidance.org_slug = None
6741
+ guidance.ref = None
6742
+ organization.guidance.create(guidance)
6743
+
6748
6744
  import time
6749
6745
 
6750
6746
  time.sleep(4)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "kodexa"
3
- version = "7.0.09115250793"
3
+ version = "7.0.09196860276"
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