aepp 0.4.1.post1__tar.gz → 0.4.1.post2__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 (57) hide show
  1. {aepp-0.4.1.post1/aepp.egg-info → aepp-0.4.1.post2}/PKG-INFO +1 -1
  2. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/__init__.py +6 -0
  3. aepp-0.4.1.post2/aepp/__version__.py +1 -0
  4. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/customerprofile.py +0 -1
  5. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/schema.py +3 -0
  6. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/schemamanager.py +0 -6
  7. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/som.py +0 -1
  8. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/synchronizer.py +7 -0
  9. {aepp-0.4.1.post1 → aepp-0.4.1.post2/aepp.egg-info}/PKG-INFO +1 -1
  10. aepp-0.4.1.post1/aepp/__version__.py +0 -1
  11. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/LICENSE +0 -0
  12. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/MANIFEST.in +0 -0
  13. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/README.md +0 -0
  14. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/accesscontrol.py +0 -0
  15. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/catalog.py +0 -0
  16. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/classmanager.py +0 -0
  17. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/config.py +0 -0
  18. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/configs.py +0 -0
  19. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/connector.py +0 -0
  20. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/dataaccess.py +0 -0
  21. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/dataprep.py +0 -0
  22. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/datasets.py +0 -0
  23. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/datatypemanager.py +0 -0
  24. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/deletion.py +0 -0
  25. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/destination.py +0 -0
  26. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/destinationinstanceservice.py +0 -0
  27. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/edge.py +0 -0
  28. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/exportDatasetToDataLandingZone.py +0 -0
  29. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/fieldgroupmanager.py +0 -0
  30. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/flowservice.py +0 -0
  31. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/hygiene.py +0 -0
  32. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/identity.py +0 -0
  33. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/ingestion.py +0 -0
  34. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/observability.py +0 -0
  35. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/policy.py +0 -0
  36. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/privacyservice.py +0 -0
  37. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/queryservice.py +0 -0
  38. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/sandboxes.py +0 -0
  39. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/segmentation.py +0 -0
  40. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/sensei.py +0 -0
  41. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/tags.py +0 -0
  42. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp/utils.py +0 -0
  43. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp.egg-info/SOURCES.txt +0 -0
  44. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp.egg-info/dependency_links.txt +0 -0
  45. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp.egg-info/requires.txt +0 -0
  46. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/aepp.egg-info/top_level.txt +0 -0
  47. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/setup.cfg +0 -0
  48. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/setup.py +0 -0
  49. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/tests/__init__.py +0 -0
  50. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/tests/catalog_test.py +0 -0
  51. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/tests/dataaccess_test.py +0 -0
  52. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/tests/datasets_test.py +0 -0
  53. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/tests/destinationinstanceservice_test.py +0 -0
  54. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/tests/exportDatasetToDatalandingZone_test.py +0 -0
  55. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/tests/flowservice_test.py +0 -0
  56. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/tests/schema_test.py +0 -0
  57. {aepp-0.4.1.post1 → aepp-0.4.1.post2}/tests/som_test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aepp
3
- Version: 0.4.1.post1
3
+ Version: 0.4.1.post2
4
4
  Summary: Package to manage AEP API endpoint and some helper functions
5
5
  Home-page: https://github.com/adobe/aepp
6
6
  Author: Julien Piccini
@@ -400,6 +400,9 @@ def __extractFieldGroup__(fieldGroup: str,folder: Union[str, Path] = None,sandbo
400
400
  for descriptor in descriptors:
401
401
  with open(f"{descriptorPath / descriptor['@id']}.json",'w') as f:
402
402
  json.dump(descriptor,f,indent=2)
403
+ classes = myfg_manager.classIds
404
+ for cls in classes:
405
+ __extractClass__(cls,folder,sandbox)
403
406
 
404
407
  def __extractSchema__(schemaEl: str,folder: Union[str, Path] = None,sandbox: 'ConnectObject' = None,region:str=None):
405
408
  schemaPath = Path(folder) / 'schema'
@@ -435,6 +438,9 @@ def __extractSchema__(schemaEl: str,folder: Union[str, Path] = None,sandbox: 'Co
435
438
  if descriptor.get('@type','') == 'xdm:descriptorIdentity':
436
439
  namespace = descriptor['xdm:namespace']
437
440
  __extractIdentity__(namespace,region,folder,sandbox)
441
+ if descriptor.get('@type','') == 'xdm:descriptorRelationship' or descriptor.get('@type','') == 'xdm:descriptorOneToOne':
442
+ targetSchema = descriptor['xdm:destinationSchema']
443
+ __extractSchema__(targetSchema,folder,sandbox,region)
438
444
 
439
445
 
440
446
  def __extractIdentity__(identityStr: str,region:str=None,folder: Union[str, Path] = None,sandbox: 'ConnectObject' = None):
@@ -0,0 +1 @@
1
+ __version__ = "0.4.1-2"
@@ -776,7 +776,6 @@ class Profile:
776
776
  privateHeader['Accept'] = "application/json"
777
777
  params = {"offset":0,"limit":20}
778
778
  res = self.connector.getData(self.endpoint_global + path,params=params,headers=privateHeader)
779
- print(res)
780
779
  data = res.get("computedAttributes",[])
781
780
  offset = res.get("_page",{}).get("offset", 0)
782
781
  while offset != 0:
@@ -1765,6 +1765,9 @@ class Schema:
1765
1765
  raise Exception("Require a field Group ID")
1766
1766
  if self.loggingEnabled:
1767
1767
  self.logger.debug(f"Starting extendFieldGroup")
1768
+ if fieldGroupId.startswith("https://"):
1769
+ from urllib import parse
1770
+ fieldGroupId = parse.quote_plus(fieldGroupId)
1768
1771
  path = f"/{tenant}/fieldgroups/{fieldGroupId}"
1769
1772
  if values is not None:
1770
1773
  list_fgs = values
@@ -122,9 +122,7 @@ class SchemaManager:
122
122
  break
123
123
  self.fieldGroupIds = [obj['$ref'] for obj in allOf if ('/mixins/' in obj['$ref'] or '/experience/' in obj['$ref'] or '/context/' in obj['$ref']) and obj['$ref'] != self.classId]
124
124
  self.classIds = [self.classId]
125
- print(self.tenantId)
126
125
  for ref in self.fieldGroupIds:
127
- print(ref)
128
126
  if '/mixins/' in ref and self.tenantId[1:] in ref:
129
127
  if self.localfolder is not None:
130
128
  for json_file in self.fieldgroupFolder.glob('*.json'):
@@ -134,7 +132,6 @@ class SchemaManager:
134
132
  break
135
133
  elif self.schemaAPI is not None:
136
134
  definition = self.schemaAPI.getFieldGroup(ref,full=False)
137
- print(definition.get('title'))
138
135
  fgM = FieldGroupManager(fieldGroup=definition,schemaAPI=self.schemaAPI,localFolder=localFolder,tenantId=self.tenantId,sandbox=self.sandbox)
139
136
  else:
140
137
  if self.localfolder is not None:
@@ -206,7 +203,6 @@ class SchemaManager:
206
203
  tmp_def = json.load(FileIO(json_file))
207
204
  if tmp_def.get('$id') == ref:
208
205
  definition = tmp_def
209
- print(definition.get('title'))
210
206
  break
211
207
  if 'properties' in definition.keys():
212
208
  definition['definitions'] = definition['properties']
@@ -260,7 +256,6 @@ class SchemaManager:
260
256
  tmp_def = json.load(FileIO(json_file))
261
257
  if tmp_def.get('$id') == ref:
262
258
  definition = tmp_def
263
- print(definition.get('title'))
264
259
  break
265
260
  fgM = FieldGroupManager(definition,schemaAPI=self.schemaAPI, localFolder=localFolder,tenantId=self.tenantId,sandbox=self.sandbox)
266
261
  self.fieldGroupsManagers[fgM.title] = fgM
@@ -585,7 +580,6 @@ class SchemaManager:
585
580
  res = self.schemaAPI.putSchema(self.id,self.schema)
586
581
  if 'status' in res.keys():
587
582
  if res['status'] == 400:
588
- print(res['title'])
589
583
  return res
590
584
  else:
591
585
  return res
@@ -567,7 +567,6 @@ class Som:
567
567
  list_path = list(reversed(list_path))
568
568
  path = '.'.join(list_path)
569
569
  o_data = self.get(path,merge=True)
570
- print(o_data)
571
570
  self.__mergedata__(o_data,deepcopy(data))
572
571
  return None
573
572
 
@@ -340,6 +340,11 @@ class Synchronizer:
340
340
  print(f"field group '{name_base_fieldgroup}' already exists in target {target}, checking it")
341
341
  if t_fieldgroup is None: ## if need to create the FieldGroupManager
342
342
  t_fieldgroup = fieldgroupmanager.FieldGroupManager(targetSchema.data.fieldGroups_altId[name_base_fieldgroup],config=self.dict_targetsConfig[target],sandbox=target)
343
+ for fg_class in t_fieldgroup.classIds:
344
+ if fg_class not in fg_class_ids:
345
+ fg_class_ids.append(fg_class)
346
+ ### Aligning class support to the field groups
347
+ t_fieldgroup.schemaAPI.extendFieldGroup(t_fieldgroup.id,fg_class_ids)
343
348
  df_base = baseFieldGroup.to_dataframe(full=True)
344
349
  df_target = t_fieldgroup.to_dataframe(full=True)
345
350
  base_paths = df_base['path'].tolist()
@@ -515,6 +520,8 @@ class Synchronizer:
515
520
  ## adding the field group to the target components
516
521
  self.dict_targetComponents[target]['fieldgroup'][fg_name] = fieldgroupmanager.FieldGroupManager(dict_base_fg_name_id[fg_name],config=self.dict_targetsConfig[target],sandbox=target)
517
522
  else:
523
+ if verbose:
524
+ print(f"field group '{fg_name}' is a custom field group, using it")
518
525
  tmp_FieldGroup = baseSchema.getFieldGroupManager(fg_name)
519
526
  self.__syncFieldGroup__(tmp_FieldGroup,verbose=verbose)
520
527
  new_schema.addFieldGroup(self.dict_targetComponents[target]['fieldgroup'][fg_name].id)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aepp
3
- Version: 0.4.1.post1
3
+ Version: 0.4.1.post2
4
4
  Summary: Package to manage AEP API endpoint and some helper functions
5
5
  Home-page: https://github.com/adobe/aepp
6
6
  Author: Julien Piccini
@@ -1 +0,0 @@
1
- __version__ = "0.4.1-1"
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