aepp 0.5.0.post7__tar.gz → 0.5.1__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 (51) hide show
  1. {aepp-0.5.0.post7/aepp.egg-info → aepp-0.5.1}/PKG-INFO +1 -1
  2. aepp-0.5.1/aepp/__version__.py +1 -0
  3. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/cli/__main__.py +19 -7
  4. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/synchronizer.py +7 -7
  5. {aepp-0.5.0.post7 → aepp-0.5.1/aepp.egg-info}/PKG-INFO +1 -1
  6. aepp-0.5.0.post7/aepp/__version__.py +0 -1
  7. {aepp-0.5.0.post7 → aepp-0.5.1}/LICENSE +0 -0
  8. {aepp-0.5.0.post7 → aepp-0.5.1}/MANIFEST.in +0 -0
  9. {aepp-0.5.0.post7 → aepp-0.5.1}/README.md +0 -0
  10. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/__init__.py +0 -0
  11. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/accesscontrol.py +0 -0
  12. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/catalog.py +0 -0
  13. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/classmanager.py +0 -0
  14. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/cli/__init__.py +0 -0
  15. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/config.py +0 -0
  16. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/configs.py +0 -0
  17. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/connector.py +0 -0
  18. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/customerprofile.py +0 -0
  19. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/dataaccess.py +0 -0
  20. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/dataprep.py +0 -0
  21. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/datasets.py +0 -0
  22. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/datatypemanager.py +0 -0
  23. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/deletion.py +0 -0
  24. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/destination.py +0 -0
  25. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/destinationinstanceservice.py +0 -0
  26. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/edge.py +0 -0
  27. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/exportDatasetToDataLandingZone.py +0 -0
  28. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/fieldgroupmanager.py +0 -0
  29. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/flowservice.py +0 -0
  30. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/hygiene.py +0 -0
  31. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/identity.py +0 -0
  32. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/ingestion.py +0 -0
  33. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/observability.py +0 -0
  34. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/policy.py +0 -0
  35. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/privacyservice.py +0 -0
  36. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/queryservice.py +0 -0
  37. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/sandboxes.py +0 -0
  38. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/schema.py +0 -0
  39. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/schemamanager.py +0 -0
  40. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/segmentation.py +0 -0
  41. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/sensei.py +0 -0
  42. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/som.py +0 -0
  43. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/tags.py +0 -0
  44. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp/utils.py +0 -0
  45. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp.egg-info/SOURCES.txt +0 -0
  46. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp.egg-info/dependency_links.txt +0 -0
  47. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp.egg-info/entry_points.txt +0 -0
  48. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp.egg-info/requires.txt +0 -0
  49. {aepp-0.5.0.post7 → aepp-0.5.1}/aepp.egg-info/top_level.txt +0 -0
  50. {aepp-0.5.0.post7 → aepp-0.5.1}/pyproject.toml +0 -0
  51. {aepp-0.5.0.post7 → aepp-0.5.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aepp
3
- Version: 0.5.0.post7
3
+ Version: 0.5.1
4
4
  Summary: Package to manage AEP API endpoint and some helper functions
5
5
  Author-email: Julien Piccini <piccini.julien@gmail.com>
6
6
  License: Apache-2.0
@@ -0,0 +1 @@
1
+ __version__ = "0.5.1"
@@ -63,6 +63,18 @@ class ServiceShell(cmd.Cmd):
63
63
  self.prompt = f"{self.config.sandbox}> "
64
64
  console.print(Panel(f"Connected to [bold green]{self.sandbox}[/bold green]", style="blue"))
65
65
 
66
+ def do_createConfigFile(self, arg):
67
+ """Create a configuration file for future use"""
68
+ parser = argparse.ArgumentParser(prog='createConfigFile', add_help=True)
69
+ parser.add_argument("-f", "--file_name", help="file name for your config file", default="aepp_config.json")
70
+ args = parser.parse_args(shlex.split(arg))
71
+ filename = args.file_name
72
+ aepp.createConfigFile(destination=filename)
73
+ filename_json = filename + ".json" if not filename.endswith(".json") else filename
74
+ console.print(f"Configuration file created at {Path.cwd() / Path(filename_json)}", style="green")
75
+ return
76
+
77
+
66
78
  # # --- Commands ---
67
79
  def do_config(self, arg):
68
80
  """connect to an AEP instance"""
@@ -964,19 +976,19 @@ class ServiceShell(cmd.Cmd):
964
976
  successful_runs = fl.get("Successful Runs", 0)
965
977
  failed_runs = fl.get("Failed Runs", 0)
966
978
  partial_success = fl.get('Partial Success Runs',0)
967
- if partial_success>0:
968
- partialColorStart = "[orange1]"
969
- partialColorEnd = "[/orange1]"
970
- else:
971
- partialColorStart = colorStart
972
- partialColorEnd = colorEnd
979
+ if partial_success>0 and failed_runs==0:
980
+ colorStart = "[orange1]"
981
+ colorEnd = "[/orange1]"
982
+ row_data[0] = f"{colorStart}{fl.get('id','N/A')}{colorEnd}"
983
+ row_data[1] = f"{colorStart}{fl.get('name','N/A')}{colorEnd}"
984
+ row_data[2] = f"{colorStart}{fl.get('type','N/A')}{colorEnd}"
973
985
  success_rate = (successful_runs / total_runs * 100) if total_runs > 0 else 0
974
986
  failure_rate = (failed_runs / total_runs * 100) if total_runs > 0 else 0
975
987
  row_data.extend([
976
988
  f"{colorStart}{str(total_runs)}{colorEnd}",
977
989
  f"{colorStart}{str(successful_runs)}{colorEnd}",
978
990
  f"{colorStart}{str(failed_runs)}{colorEnd}",
979
- f"{partialColorStart}{str(partial_success)}{partialColorEnd}"
991
+ f"{colorStart}{str(partial_success)}{colorEnd}",
980
992
  f"{colorStart}{success_rate:.0f}%{colorEnd}",
981
993
  f"{colorStart}{failure_rate:.0f}%{colorEnd}"
982
994
  ])
@@ -719,7 +719,7 @@ class Synchronizer:
719
719
  match descType:
720
720
  case "xdm:descriptorIdentity":
721
721
  target_identitiesDecs = [desc for desc in target_descriptors if desc['@type'] == 'xdm:descriptorIdentity']
722
- baseIdentityNS = baseDescriptor['xdm:namespace']
722
+ baseIdentityNS = baseDescriptor['xdm:namespace'].lower()
723
723
  if self.baseConfig is not None and self.localfolder is None:
724
724
  identityConn = identity.Identity(config=self.baseConfig,region=self.region)
725
725
  baseIdentities = identityConn.getIdentities()
@@ -728,8 +728,8 @@ class Synchronizer:
728
728
  for file in self.identityFolder.glob('*.json'):
729
729
  id_file = json.load(FileIO(file))
730
730
  baseIdentities.append(id_file)
731
- if baseIdentityNS not in [el['xdm:namespace'] for el in target_identitiesDecs]: ## identity descriptor does not exists in target schema
732
- def_identity = [el for el in baseIdentities if el['code'] == baseIdentityNS][0]
731
+ if baseIdentityNS not in [el['xdm:namespace'].lower() for el in target_identitiesDecs]: ## identity descriptor does not exists in target schema
732
+ def_identity = [el for el in baseIdentities if el['code'].lower() == baseIdentityNS][0]
733
733
  self.__syncIdentity__(def_identity,verbose=verbose)
734
734
  new_desc = targetSchemaManager.createDescriptorOperation(descType=descType,
735
735
  completePath=baseDescriptor['xdm:sourceProperty'],
@@ -738,7 +738,7 @@ class Synchronizer:
738
738
  )
739
739
  res = targetSchemaManager.createDescriptor(new_desc)
740
740
  else:
741
- res = [el for el in target_identitiesDecs if el['xdm:namespace'] == baseIdentityNS][0]
741
+ res = [el for el in target_identitiesDecs if el['xdm:namespace'].lower() == baseIdentityNS][0]
742
742
  list_descriptors.append(res)
743
743
  case "xdm:descriptorOneToOne": ## lookup definition
744
744
  target_OneToOne = [desc for desc in target_descriptors if desc['@type'] == 'xdm:descriptorOneToOne']
@@ -866,15 +866,15 @@ class Synchronizer:
866
866
  """
867
867
  if not isinstance(identityDefiniton,dict):
868
868
  raise TypeError("the identityDefinition must be a dictionary")
869
- code_base_identity = identityDefiniton['code']
869
+ code_base_identity = identityDefiniton['code'].lower()
870
870
  self.dict_baseComponents['identities'][code_base_identity] = identityDefiniton
871
871
  for target in self.dict_targetsConfig.keys():
872
872
  targetIdentity = identity.Identity(config=self.dict_targetsConfig[target],region=self.region)
873
873
  t_identities = targetIdentity.getIdentities()
874
- if code_base_identity in [el['code'] for el in t_identities]:## identity already exists in target
874
+ if code_base_identity in [el['code'].lower() for el in t_identities]:## identity already exists in target
875
875
  if verbose:
876
876
  print(f"identity '{code_base_identity}' already exists in target {target}, saving it")
877
- self.dict_targetComponents[target]['identities'][code_base_identity] = [el for el in t_identities if el['code'] == code_base_identity][0]
877
+ self.dict_targetComponents[target]['identities'][code_base_identity] = [el for el in t_identities if el['code'].lower() == code_base_identity][0]
878
878
  else:
879
879
  if verbose:
880
880
  print(f"identity '{code_base_identity}' does not exist in target {target}, creating it")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aepp
3
- Version: 0.5.0.post7
3
+ Version: 0.5.1
4
4
  Summary: Package to manage AEP API endpoint and some helper functions
5
5
  Author-email: Julien Piccini <piccini.julien@gmail.com>
6
6
  License: Apache-2.0
@@ -1 +0,0 @@
1
- __version__ = "0.5.0-7"
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
File without changes
File without changes
File without changes
File without changes