cjapy 0.2.4__tar.gz → 0.2.4.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 (32) hide show
  1. {cjapy-0.2.4 → cjapy-0.2.4.post1}/PKG-INFO +5 -2
  2. cjapy-0.2.4.post1/cjapy/__version__.py +1 -0
  3. {cjapy-0.2.4 → cjapy-0.2.4.post1}/cjapy/requestCreator.py +27 -24
  4. {cjapy-0.2.4 → cjapy-0.2.4.post1}/cjapy.egg-info/PKG-INFO +5 -2
  5. {cjapy-0.2.4 → cjapy-0.2.4.post1}/docs/releases.md +3 -1
  6. {cjapy-0.2.4 → cjapy-0.2.4.post1}/docs/requestCreator.md +3 -2
  7. cjapy-0.2.4/cjapy/__version__.py +0 -1
  8. {cjapy-0.2.4 → cjapy-0.2.4.post1}/LICENSE +0 -0
  9. {cjapy-0.2.4 → cjapy-0.2.4.post1}/README.md +0 -0
  10. {cjapy-0.2.4 → cjapy-0.2.4.post1}/cjapy/__init__.py +0 -0
  11. {cjapy-0.2.4 → cjapy-0.2.4.post1}/cjapy/cjapy.py +0 -0
  12. {cjapy-0.2.4 → cjapy-0.2.4.post1}/cjapy/config.py +0 -0
  13. {cjapy-0.2.4 → cjapy-0.2.4.post1}/cjapy/configs.py +0 -0
  14. {cjapy-0.2.4 → cjapy-0.2.4.post1}/cjapy/connector.py +0 -0
  15. {cjapy-0.2.4 → cjapy-0.2.4.post1}/cjapy/projects.py +0 -0
  16. {cjapy-0.2.4 → cjapy-0.2.4.post1}/cjapy/token_provider.py +0 -0
  17. {cjapy-0.2.4 → cjapy-0.2.4.post1}/cjapy/workspace.py +0 -0
  18. {cjapy-0.2.4 → cjapy-0.2.4.post1}/cjapy.egg-info/SOURCES.txt +0 -0
  19. {cjapy-0.2.4 → cjapy-0.2.4.post1}/cjapy.egg-info/dependency_links.txt +0 -0
  20. {cjapy-0.2.4 → cjapy-0.2.4.post1}/cjapy.egg-info/requires.txt +0 -0
  21. {cjapy-0.2.4 → cjapy-0.2.4.post1}/cjapy.egg-info/top_level.txt +0 -0
  22. {cjapy-0.2.4 → cjapy-0.2.4.post1}/docs/authenticating_without_config_json.md +0 -0
  23. {cjapy-0.2.4 → cjapy-0.2.4.post1}/docs/cja.md +0 -0
  24. {cjapy-0.2.4 → cjapy-0.2.4.post1}/docs/getting_started.md +0 -0
  25. {cjapy-0.2.4 → cjapy-0.2.4.post1}/docs/logging.md +0 -0
  26. {cjapy-0.2.4 → cjapy-0.2.4.post1}/docs/main.md +0 -0
  27. {cjapy-0.2.4 → cjapy-0.2.4.post1}/docs/projects.md +0 -0
  28. {cjapy-0.2.4 → cjapy-0.2.4.post1}/docs/workspace.md +0 -0
  29. {cjapy-0.2.4 → cjapy-0.2.4.post1}/pyproject.toml +0 -0
  30. {cjapy-0.2.4 → cjapy-0.2.4.post1}/requirements.txt +0 -0
  31. {cjapy-0.2.4 → cjapy-0.2.4.post1}/setup.cfg +0 -0
  32. {cjapy-0.2.4 → cjapy-0.2.4.post1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: cjapy
3
- Version: 0.2.4
3
+ Version: 0.2.4.post1
4
4
  Summary: Adobe Customer Journey Analytics (CJA) wrapper
5
5
  Home-page: https://github.com/pitchmuc/cjapy
6
6
  Author: Julien Piccini
@@ -31,6 +31,9 @@ Requires-Dist: PyJWT[crypto]
31
31
  Requires-Dist: pytest
32
32
  Provides-Extra: dynamic
33
33
  Requires-Dist: version; extra == "dynamic"
34
+ Dynamic: author
35
+ Dynamic: home-page
36
+ Dynamic: requires-python
34
37
 
35
38
  # Adobe Customer Journey API
36
39
 
@@ -0,0 +1 @@
1
+ __version__ = "0.2.4-1"
@@ -383,32 +383,35 @@ class RequestCreator:
383
383
  ### adding filter to the metric
384
384
  if metricIndex is None:
385
385
  replicateMetric = []
386
+ metricId_done = set() ## avoid duplicationof metrics
386
387
  for index, metric in enumerate(self.__request["metricContainer"]["metrics"]):
387
- if metricId == "all":
388
- staticRowName = staticRowCreated[index]
389
- row_index = int(deepcopy(staticRowName).split('_').pop())-1
390
- columnId = metric['id']+f":::{row_index}"
391
- if "filters" in metric.keys():
392
- filtersCheck = [True if "STATIC_ROW_COMPONENT" in el else False for el in metric['filters']]
393
- if any(filtersCheck): ## check if already a static row
394
- replicateMetric.append(
395
- {
396
- "columnId" : columnId,
397
- "id" : metric['id'],
398
- "filters":[staticRowName]
399
- }
400
- )
388
+ if metric['id'] not in metricId_done:
389
+ metricId_done.add(metric['id'])
390
+ if metricId == "all":
391
+ staticRowName = staticRowCreated[index]
392
+ row_index = int(deepcopy(staticRowName).split('_').pop())-1
393
+ columnId = metric['id']+f":::{row_index}"
394
+ if "filters" in metric.keys():
395
+ filtersCheck = [True if "STATIC_ROW_COMPONENT" in el else False for el in metric['filters']]
396
+ if any(filtersCheck): ## check if already a static row
397
+ replicateMetric.append(
398
+ {
399
+ "columnId" : columnId,
400
+ "id" : metric['id'],
401
+ "filters":[staticRowName]
402
+ }
403
+ )
404
+ else:
405
+ metric["filters"].append(staticRowName)
406
+ metric['columnId'] = columnId
401
407
  else:
402
- metric["filters"].append(staticRowName)
403
- metric['columnId'] = columnId
404
- else:
405
- metric["filters"] = [staticRowName]
406
- metric['columnId'] = columnId
407
- elif metric["id"] == metricId:
408
- if "filters" in metric.keys():
409
- metric["filters"].append(str(filterIdCount))
410
- else:
411
- metric["filters"] = [str(filterIdCount)]
408
+ metric["filters"] = [staticRowName]
409
+ metric['columnId'] = columnId
410
+ elif metric["id"] == metricId:
411
+ if "filters" in metric.keys():
412
+ metric["filters"].append(str(filterIdCount))
413
+ else:
414
+ metric["filters"] = [str(filterIdCount)]
412
415
  if len(replicateMetric)>0:
413
416
  self.__request["metricContainer"]["metrics"] += replicateMetric
414
417
  else:
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: cjapy
3
- Version: 0.2.4
3
+ Version: 0.2.4.post1
4
4
  Summary: Adobe Customer Journey Analytics (CJA) wrapper
5
5
  Home-page: https://github.com/pitchmuc/cjapy
6
6
  Author: Julien Piccini
@@ -31,6 +31,9 @@ Requires-Dist: PyJWT[crypto]
31
31
  Requires-Dist: pytest
32
32
  Provides-Extra: dynamic
33
33
  Requires-Dist: version; extra == "dynamic"
34
+ Dynamic: author
35
+ Dynamic: home-page
36
+ Dynamic: requires-python
34
37
 
35
38
  # Adobe Customer Journey API
36
39
 
@@ -6,7 +6,9 @@ The changes have been tracked starting version 0.1.0
6
6
  ## 0.2.4
7
7
  * adding the `getUsers` method
8
8
  * adding the `getAssetCount` method
9
- * better support for STATIC_ROW in `RequestCreator`
9
+ * better support for STATIC_ROW in `RequestCreator`\
10
+ Patch:
11
+ * Fixing multi static row issue in `RequestCreator`.
10
12
 
11
13
  ## 0.2.3
12
14
  * adding the `getPersonProfiles` method
@@ -172,6 +172,7 @@ We will review the different methods available via the object.
172
172
  * filterId : REQUIRED : The filter to add.
173
173
  When breakdown, use the following format for the value "dimension:::itemId"
174
174
  * metricIndex : OPTIONAL : If used, set the filter to the metric located on that index.
175
+ * staticRow : OPTIONAL : When trying to set a filter as STATIC ROW for reporting. Boolean. Default `False`.
175
176
 
176
177
  * `removeMetricFilter()`
177
178
  remove a filter from a metric
@@ -226,7 +227,7 @@ This can help you derive other dates if needed.
226
227
  ### STATIC_ROW_REPORT
227
228
 
228
229
  Defines if the report has been built for STATIC ROW Report.\
229
- Static row report means that metrics are being used with filters, without the usage of any dimensions.\
230
- Once a report has been setup as STATIC ROW REPORT (value turns to `True`), you cannot add a dimension.\
230
+ Static row report means that metrics are being used with filters or date ranges, without the usage of any dimensions.\
231
+ Once a report has been setup as STATIC ROW REPORT (attribute value returns `True`), you cannot add a dimension.\
231
232
  Create a new instance of RequestCreator to create a report with a dimension.
232
233
 
@@ -1 +0,0 @@
1
- __version__ = "0.2.4"
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