launchpy 0.4.6__tar.gz → 0.4.6.post1__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 (31) hide show
  1. {launchpy-0.4.6/launchpy.egg-info → launchpy-0.4.6.post1}/PKG-INFO +1 -1
  2. {launchpy-0.4.6 → launchpy-0.4.6.post1}/docs/releases.md +4 -0
  3. launchpy-0.4.6.post1/launchpy/__version__.py +1 -0
  4. {launchpy-0.4.6 → launchpy-0.4.6.post1}/launchpy/launchpy.py +8 -0
  5. {launchpy-0.4.6 → launchpy-0.4.6.post1}/launchpy/synchronizer.py +3 -2
  6. {launchpy-0.4.6 → launchpy-0.4.6.post1/launchpy.egg-info}/PKG-INFO +1 -1
  7. launchpy-0.4.6/launchpy/__version__.py +0 -1
  8. {launchpy-0.4.6 → launchpy-0.4.6.post1}/LICENSE +0 -0
  9. {launchpy-0.4.6 → launchpy-0.4.6.post1}/README.md +0 -0
  10. {launchpy-0.4.6 → launchpy-0.4.6.post1}/docs/admin.md +0 -0
  11. {launchpy-0.4.6 → launchpy-0.4.6.post1}/docs/getstarted.md +0 -0
  12. {launchpy-0.4.6 → launchpy-0.4.6.post1}/docs/library.md +0 -0
  13. {launchpy-0.4.6 → launchpy-0.4.6.post1}/docs/main.md +0 -0
  14. {launchpy-0.4.6 → launchpy-0.4.6.post1}/docs/property.md +0 -0
  15. {launchpy-0.4.6 → launchpy-0.4.6.post1}/docs/synchronizer.md +0 -0
  16. {launchpy-0.4.6 → launchpy-0.4.6.post1}/docs/translator.md +0 -0
  17. {launchpy-0.4.6 → launchpy-0.4.6.post1}/launchpy/__init__.py +0 -0
  18. {launchpy-0.4.6 → launchpy-0.4.6.post1}/launchpy/admin.py +0 -0
  19. {launchpy-0.4.6 → launchpy-0.4.6.post1}/launchpy/config.py +0 -0
  20. {launchpy-0.4.6 → launchpy-0.4.6.post1}/launchpy/configs.py +0 -0
  21. {launchpy-0.4.6 → launchpy-0.4.6.post1}/launchpy/connector.py +0 -0
  22. {launchpy-0.4.6 → launchpy-0.4.6.post1}/launchpy/library.py +0 -0
  23. {launchpy-0.4.6 → launchpy-0.4.6.post1}/launchpy/property.py +0 -0
  24. {launchpy-0.4.6 → launchpy-0.4.6.post1}/launchpy.egg-info/SOURCES.txt +0 -0
  25. {launchpy-0.4.6 → launchpy-0.4.6.post1}/launchpy.egg-info/dependency_links.txt +0 -0
  26. {launchpy-0.4.6 → launchpy-0.4.6.post1}/launchpy.egg-info/requires.txt +0 -0
  27. {launchpy-0.4.6 → launchpy-0.4.6.post1}/launchpy.egg-info/top_level.txt +0 -0
  28. {launchpy-0.4.6 → launchpy-0.4.6.post1}/pyproject.toml +0 -0
  29. {launchpy-0.4.6 → launchpy-0.4.6.post1}/requirements.txt +0 -0
  30. {launchpy-0.4.6 → launchpy-0.4.6.post1}/setup.cfg +0 -0
  31. {launchpy-0.4.6 → launchpy-0.4.6.post1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: launchpy
3
- Version: 0.4.6
3
+ Version: 0.4.6.post1
4
4
  Summary: Adobe Launch API wrapper
5
5
  Home-page: https://github.com/pitchmuc/launchpy
6
6
  Author: Julien Piccini
@@ -5,6 +5,10 @@ This has been started after the 0.3.0 release.\
5
5
 
6
6
  ## 0.4.6
7
7
  * Allow Synchronizer to be used in multi IMS organization setup.
8
+ Patch:
9
+ * Fixing multi-org synchronization:
10
+ * syncComponent method in Synchronizer class
11
+ * createTargetsLibrary method in Synchronizer class
8
12
 
9
13
  ## 0.4.5
10
14
  * adding `getExtension` in `Property` class
@@ -0,0 +1 @@
1
+ __version__ = "0.4.6-1"
@@ -418,6 +418,7 @@ class Translator:
418
418
  self.extensions = {}
419
419
  self.baseExtensionIdName = {}
420
420
  self.mapping_extension = {}
421
+ self.extension_descriptor_update = {}
421
422
  if kwargs.get('mapping_extensions') is not None:
422
423
  if type(kwargs.get('mapping_extensions')) == dict:
423
424
  for key, value in kwargs.get('mapping_extensions').items():
@@ -447,6 +448,7 @@ class Translator:
447
448
  for ext in new_property_extensions:
448
449
  extName = ext['attributes']['name']
449
450
  if extName in self.mapping_extension.keys():
451
+ self.extension_descriptor_update[new_prop_name] = {self.mapping_extension[extName]:extName}
450
452
  extName = self.mapping_extension[extName]
451
453
  if extName in list(self.extensions.keys()):
452
454
  self.extensions[extName][new_prop_name] = ext['id']
@@ -525,6 +527,9 @@ class Translator:
525
527
  based_ext_name = self.baseExtensionIdName[base_id]
526
528
  new_extension_id = self.extensions[based_ext_name][target_property]
527
529
  new_de['extension']['id'] = new_extension_id
530
+ if target_property in self.extension_descriptor_update.keys():
531
+ if based_ext_name in self.extension_descriptor_update[target_property].keys():
532
+ new_de['descriptor'] = new_de['descriptor'] .replace(based_ext_name,self.extension_descriptor_update[target_property][based_ext_name])
528
533
  return new_de
529
534
  elif rule_component is not None:
530
535
  if len(self.rules) == 0:
@@ -535,6 +540,9 @@ class Translator:
535
540
  based_ext_name = self.baseExtensionIdName[base_id]
536
541
  new_extension_id = self.extensions[based_ext_name][target_property]
537
542
  new_rc['extension']['id'] = new_extension_id
543
+ if target_property in self.extension_descriptor_update.keys():
544
+ if based_ext_name in self.extension_descriptor_update[target_property].keys():
545
+ new_rc['descriptor'] = new_rc['descriptor'] .replace(based_ext_name,self.extension_descriptor_update[target_property][based_ext_name])
538
546
  if len(self.rules) > 0:
539
547
  new_rc['rule_setting'] = {
540
548
  'data': [{
@@ -328,7 +328,8 @@ class Synchronizer:
328
328
  for rc in template_ruleComponents:
329
329
  try:
330
330
  translatedComponent = self.translator.translate(target,rule_component=copySettings(rc))
331
- except:
331
+ except Exception as e:
332
+ print(e)
332
333
  raise KeyError("Could not translate the component. Please check if your extensions are aligned in the properties.")
333
334
  translatedComponent['rule_setting']['data'][0]['id'] = targetRuleId
334
335
  if timeout is not None:
@@ -382,7 +383,7 @@ class Synchronizer:
382
383
  lib = [lib for lib in librariesDev if name in lib['attributes']['name']][0]
383
384
  else:
384
385
  lib = self.targets[target]['api'].createLibrary(name=name,return_class=False)
385
- library = Library(lib)
386
+ library = Library(lib,config_object=self.targets[target]['api'].connector.config,header=self.targets[target]['api'].connector.header)
386
387
  self.targets[target]['library'] = library
387
388
  self.targets[target]['library'].getFullLibrary()
388
389
  ## taking care of rule update
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: launchpy
3
- Version: 0.4.6
3
+ Version: 0.4.6.post1
4
4
  Summary: Adobe Launch API wrapper
5
5
  Home-page: https://github.com/pitchmuc/launchpy
6
6
  Author: Julien Piccini
@@ -1 +0,0 @@
1
- __version__ = "0.4.6"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes