aepp 0.4.2.post1__tar.gz → 0.4.3.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.
- {aepp-0.4.2.post1/aepp.egg-info → aepp-0.4.3.post1}/PKG-INFO +5 -8
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/__init__.py +42 -8
- aepp-0.4.3.post1/aepp/__version__.py +1 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/flowservice.py +1 -1
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/queryservice.py +2 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/schema.py +28 -1
- {aepp-0.4.2.post1 → aepp-0.4.3.post1/aepp.egg-info}/PKG-INFO +5 -8
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp.egg-info/SOURCES.txt +3 -10
- aepp-0.4.3.post1/aepp.egg-info/entry_points.txt +2 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp.egg-info/requires.txt +1 -0
- aepp-0.4.3.post1/aepp.egg-info/top_level.txt +1 -0
- aepp-0.4.3.post1/pyproject.toml +45 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/setup.py +6 -1
- aepp-0.4.2.post1/aepp/__version__.py +0 -1
- aepp-0.4.2.post1/aepp.egg-info/top_level.txt +0 -2
- aepp-0.4.2.post1/tests/__init__.py +0 -10
- aepp-0.4.2.post1/tests/catalog_test.py +0 -80
- aepp-0.4.2.post1/tests/dataaccess_test.py +0 -36
- aepp-0.4.2.post1/tests/datasets_test.py +0 -30
- aepp-0.4.2.post1/tests/destinationinstanceservice_test.py +0 -36
- aepp-0.4.2.post1/tests/exportDatasetToDatalandingZone_test.py +0 -161
- aepp-0.4.2.post1/tests/flowservice_test.py +0 -150
- aepp-0.4.2.post1/tests/schema_test.py +0 -61
- aepp-0.4.2.post1/tests/som_test.py +0 -287
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/LICENSE +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/MANIFEST.in +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/README.md +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/accesscontrol.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/catalog.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/classmanager.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/config.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/configs.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/connector.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/customerprofile.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/dataaccess.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/dataprep.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/datasets.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/datatypemanager.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/deletion.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/destination.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/destinationinstanceservice.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/edge.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/exportDatasetToDataLandingZone.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/fieldgroupmanager.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/hygiene.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/identity.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/ingestion.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/observability.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/policy.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/privacyservice.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/sandboxes.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/schemamanager.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/segmentation.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/sensei.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/som.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/synchronizer.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/tags.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp/utils.py +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/aepp.egg-info/dependency_links.txt +0 -0
- {aepp-0.4.2.post1 → aepp-0.4.3.post1}/setup.cfg +0 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aepp
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3.post1
|
|
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
|
|
7
|
-
Author-email: piccini.julien@gmail.com
|
|
7
|
+
Author-email: Julien Piccini <piccini.julien@gmail.com>
|
|
8
|
+
License: Apache-2.0
|
|
9
|
+
Project-URL: Homepage, https://github.com/adobe/aepp
|
|
8
10
|
Classifier: Programming Language :: Python :: 3
|
|
9
11
|
Classifier: Operating System :: OS Independent
|
|
10
12
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
@@ -21,16 +23,11 @@ Requires-Dist: pathlib2
|
|
|
21
23
|
Requires-Dist: tenacity
|
|
22
24
|
Requires-Dist: deprecation
|
|
23
25
|
Requires-Dist: datamodel-code-generator
|
|
26
|
+
Requires-Dist: rich
|
|
24
27
|
Dynamic: author
|
|
25
|
-
Dynamic: author-email
|
|
26
|
-
Dynamic: classifier
|
|
27
|
-
Dynamic: description
|
|
28
|
-
Dynamic: description-content-type
|
|
29
28
|
Dynamic: home-page
|
|
30
29
|
Dynamic: license-file
|
|
31
|
-
Dynamic: requires-dist
|
|
32
30
|
Dynamic: requires-python
|
|
33
|
-
Dynamic: summary
|
|
34
31
|
|
|
35
32
|
# Adobe Experience Platform API made for humans
|
|
36
33
|
|
|
@@ -14,6 +14,7 @@ from aepp import connector
|
|
|
14
14
|
from .configs import *
|
|
15
15
|
from .__version__ import __version__
|
|
16
16
|
from typing import Union
|
|
17
|
+
import re
|
|
17
18
|
|
|
18
19
|
## other libraries
|
|
19
20
|
from copy import deepcopy
|
|
@@ -83,8 +84,33 @@ def getPlatformEvents(
|
|
|
83
84
|
return data
|
|
84
85
|
|
|
85
86
|
|
|
87
|
+
def __make_filename_safe__(filename, replacement="_"):
|
|
88
|
+
# 1. Remove characters that are illegal in Windows or Linux
|
|
89
|
+
# Windows: < > : " / \ | ? * # Linux: / (and NULL)
|
|
90
|
+
filename = re.sub(r'[<>:"/\\|?*]', replacement, filename)
|
|
91
|
+
# 2. Remove control characters (ASCII 0-31)
|
|
92
|
+
filename = re.sub(r'[\x00-\x1f]', replacement, filename)
|
|
93
|
+
# 3. Trim whitespace and trailing dots (Windows doesn't like trailing dots)
|
|
94
|
+
filename = filename.strip().strip('.')
|
|
95
|
+
# 4. Handle Windows Reserved Names (CON, PRN, AUX, NUL, COM1, LPT1, etc.)
|
|
96
|
+
reserved_names = {
|
|
97
|
+
"CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5",
|
|
98
|
+
"COM6", "COM7", "COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5",
|
|
99
|
+
"LPT6", "LPT7", "LPT8", "LPT9"
|
|
100
|
+
}
|
|
101
|
+
# Check the base name without extension
|
|
102
|
+
base_name = os.path.splitext(filename)[0].upper()
|
|
103
|
+
if base_name in reserved_names:
|
|
104
|
+
filename = f"{replacement}{filename}"
|
|
105
|
+
# 5. Length limit (standard for most file systems is 255 chars)
|
|
106
|
+
if len(filename) > 255:
|
|
107
|
+
filename = filename[:255]
|
|
108
|
+
# 6. Default to a placeholder if the string is empty after cleaning
|
|
109
|
+
return filename if filename else "unnamed_file"
|
|
110
|
+
|
|
111
|
+
|
|
86
112
|
def saveFile(
|
|
87
|
-
module: str = None,
|
|
113
|
+
module: str | None = None,
|
|
88
114
|
file: object = None,
|
|
89
115
|
filename: str = None,
|
|
90
116
|
type_file: str = "json",
|
|
@@ -93,31 +119,39 @@ def saveFile(
|
|
|
93
119
|
"""
|
|
94
120
|
Save the file in the approriate folder depending on the module sending the information.
|
|
95
121
|
Arguments:
|
|
96
|
-
module:
|
|
122
|
+
module: OPTIONAL: Module requesting the save file.
|
|
97
123
|
file: REQUIRED: an object containing the file to save.
|
|
98
124
|
filename: REQUIRED: the filename to be used.
|
|
99
125
|
type_file: REQUIRED: the type of file to be saveed(default: json)
|
|
100
126
|
encoding : OPTIONAL : encoding used to write the file.
|
|
101
127
|
"""
|
|
102
|
-
if module is None:
|
|
103
|
-
raise ValueError("Require the module to create a folder")
|
|
104
128
|
if file is None or filename is None:
|
|
105
129
|
raise ValueError("Require a object for file and a name for the file")
|
|
106
130
|
here = Path(Path.cwd())
|
|
107
|
-
|
|
108
|
-
|
|
131
|
+
if module is not None:
|
|
132
|
+
folder = module.capitalize()
|
|
133
|
+
new_location = Path.joinpath(here, folder)
|
|
134
|
+
else:
|
|
135
|
+
new_location = here
|
|
109
136
|
if new_location.exists() == False:
|
|
110
137
|
new_location.mkdir()
|
|
138
|
+
filename = __make_filename_safe__(filename)
|
|
111
139
|
if type_file == "json":
|
|
112
140
|
filename = f"{filename}.json"
|
|
113
141
|
complete_path = Path.joinpath(new_location, filename)
|
|
114
142
|
with open(complete_path, "w", encoding=encoding) as f:
|
|
115
143
|
f.write(json.dumps(file, indent=4))
|
|
116
|
-
|
|
144
|
+
elif type_file == "txt":
|
|
117
145
|
filename = f"{filename}.txt"
|
|
118
146
|
complete_path = Path.joinpath(new_location, filename)
|
|
119
147
|
with open(complete_path, "w", encoding=encoding) as f:
|
|
120
148
|
f.write(file)
|
|
149
|
+
else:
|
|
150
|
+
filename = f"{filename}.{type_file}"
|
|
151
|
+
complete_path = Path.joinpath(new_location, filename)
|
|
152
|
+
with open(complete_path, "wb") as f:
|
|
153
|
+
f.write(file)
|
|
154
|
+
return complete_path
|
|
121
155
|
|
|
122
156
|
def __titleSafe__(text: str) -> str:
|
|
123
157
|
"""
|
|
@@ -289,7 +323,7 @@ def extractSandboxArtefact(
|
|
|
289
323
|
sandbox: REQUIRED: the instance of a ConnectObject that contains the sandbox information and connection.
|
|
290
324
|
localFolder: OPTIONAL: the local folder where to extract the sandbox. If not provided, it will use the current working directory and name the folder the name of the sandbox.
|
|
291
325
|
artefact: REQUIRED: the id or the name of the artefact to export.
|
|
292
|
-
artefactType: REQUIRED: the type of artefact to export. Possible values are: 'class','schema','fieldgroup','datatype','descriptor','dataset','identity','mergepolicy'
|
|
326
|
+
artefactType: REQUIRED: the type of artefact to export. Possible values are: 'class','schema','fieldgroup','datatype','descriptor','dataset','identity','mergepolicy',audience'
|
|
293
327
|
region: OPTIONAL: the region of the sandbox (default: nld2). This is used to fetch the correct API endpoints for the identities.
|
|
294
328
|
Possible values: "va7","aus5", "can2", "ind2"
|
|
295
329
|
"""
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.3-1"
|
|
@@ -784,7 +784,7 @@ class FlowService:
|
|
|
784
784
|
authenticationRequired:bool=False
|
|
785
785
|
)-> dict:
|
|
786
786
|
"""
|
|
787
|
-
Create a
|
|
787
|
+
Create a source flow streaming with or without transformation
|
|
788
788
|
name : REQUIRED : The name of the Data Flow (Optional if you are just passing a datasetId).
|
|
789
789
|
description : OPTIONAL : description of the Flow
|
|
790
790
|
source_connection_id : REQUIRED : The ID of the source connection tied to Data Lake (Optional if you are just passing a datasetId).
|
|
@@ -261,6 +261,7 @@ class Schema:
|
|
|
261
261
|
classFilter: str = None,
|
|
262
262
|
excludeAdhoc: bool = True,
|
|
263
263
|
output: str = 'raw',
|
|
264
|
+
prop: str = None,
|
|
264
265
|
**kwargs
|
|
265
266
|
) -> list:
|
|
266
267
|
"""
|
|
@@ -285,6 +286,8 @@ class Schema:
|
|
|
285
286
|
params["property"] = f"meta:extends=={classFilter}"
|
|
286
287
|
elif excludeAdhoc:
|
|
287
288
|
params["property"] = "meta:extends!=https://ns.adobe.com/xdm/data/adhoc"
|
|
289
|
+
if prop is not None:
|
|
290
|
+
params["property"] = prop
|
|
288
291
|
verbose = kwargs.get("debug", False)
|
|
289
292
|
privateHeader = deepcopy(self.header)
|
|
290
293
|
format = kwargs.get("format", "xed-id")
|
|
@@ -1783,7 +1786,7 @@ class Schema:
|
|
|
1783
1786
|
]
|
|
1784
1787
|
res = self.connector.patchData(self.endpoint + path,data=operation)
|
|
1785
1788
|
return res
|
|
1786
|
-
|
|
1789
|
+
|
|
1787
1790
|
def enableSchemaForRealTime(self,schemaId:str=None)->dict:
|
|
1788
1791
|
"""
|
|
1789
1792
|
Enable a schema for real time based on its ID.
|
|
@@ -1808,6 +1811,30 @@ class Schema:
|
|
|
1808
1811
|
res = self.connector.patchData(self.endpoint + path,data=operation)
|
|
1809
1812
|
return res
|
|
1810
1813
|
|
|
1814
|
+
def enableSchemaForUPS(self,schemaId:str=None)->dict:
|
|
1815
|
+
"""
|
|
1816
|
+
Enable a schema for UPS based on its ID.
|
|
1817
|
+
Arguments:
|
|
1818
|
+
schemaId : REQUIRED : The schema ID required to be updated
|
|
1819
|
+
"""
|
|
1820
|
+
if schemaId is None:
|
|
1821
|
+
raise Exception("Require a schema ID")
|
|
1822
|
+
if schemaId.startswith("https://"):
|
|
1823
|
+
from urllib import parse
|
|
1824
|
+
schemaId = parse.quote_plus(schemaId)
|
|
1825
|
+
if self.loggingEnabled:
|
|
1826
|
+
self.logger.debug(f"Starting enableSchemaForUPS")
|
|
1827
|
+
path = f"/{self.container}/schemas/{schemaId}/"
|
|
1828
|
+
operation = [
|
|
1829
|
+
{
|
|
1830
|
+
"op": "add",
|
|
1831
|
+
"path": "/meta:immutableTags",
|
|
1832
|
+
"value": ["union"]
|
|
1833
|
+
}
|
|
1834
|
+
]
|
|
1835
|
+
res = self.connector.patchData(self.endpoint + path,data=operation)
|
|
1836
|
+
return res
|
|
1837
|
+
|
|
1811
1838
|
def FieldGroupManager(self,fieldGroup:Union[dict,str,None],title:str=None,fg_class:list=["experienceevent","profile"]) -> 'FieldGroupManager':
|
|
1812
1839
|
"""
|
|
1813
1840
|
Generates a field group Manager instance using the information provided by the schema instance.
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aepp
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.3.post1
|
|
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
|
|
7
|
-
Author-email: piccini.julien@gmail.com
|
|
7
|
+
Author-email: Julien Piccini <piccini.julien@gmail.com>
|
|
8
|
+
License: Apache-2.0
|
|
9
|
+
Project-URL: Homepage, https://github.com/adobe/aepp
|
|
8
10
|
Classifier: Programming Language :: Python :: 3
|
|
9
11
|
Classifier: Operating System :: OS Independent
|
|
10
12
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
@@ -21,16 +23,11 @@ Requires-Dist: pathlib2
|
|
|
21
23
|
Requires-Dist: tenacity
|
|
22
24
|
Requires-Dist: deprecation
|
|
23
25
|
Requires-Dist: datamodel-code-generator
|
|
26
|
+
Requires-Dist: rich
|
|
24
27
|
Dynamic: author
|
|
25
|
-
Dynamic: author-email
|
|
26
|
-
Dynamic: classifier
|
|
27
|
-
Dynamic: description
|
|
28
|
-
Dynamic: description-content-type
|
|
29
28
|
Dynamic: home-page
|
|
30
29
|
Dynamic: license-file
|
|
31
|
-
Dynamic: requires-dist
|
|
32
30
|
Dynamic: requires-python
|
|
33
|
-
Dynamic: summary
|
|
34
31
|
|
|
35
32
|
# Adobe Experience Platform API made for humans
|
|
36
33
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
LICENSE
|
|
2
2
|
MANIFEST.in
|
|
3
3
|
README.md
|
|
4
|
+
pyproject.toml
|
|
4
5
|
setup.py
|
|
5
6
|
aepp/__init__.py
|
|
6
7
|
aepp/__version__.py
|
|
@@ -41,14 +42,6 @@ aepp/utils.py
|
|
|
41
42
|
aepp.egg-info/PKG-INFO
|
|
42
43
|
aepp.egg-info/SOURCES.txt
|
|
43
44
|
aepp.egg-info/dependency_links.txt
|
|
45
|
+
aepp.egg-info/entry_points.txt
|
|
44
46
|
aepp.egg-info/requires.txt
|
|
45
|
-
aepp.egg-info/top_level.txt
|
|
46
|
-
tests/__init__.py
|
|
47
|
-
tests/catalog_test.py
|
|
48
|
-
tests/dataaccess_test.py
|
|
49
|
-
tests/datasets_test.py
|
|
50
|
-
tests/destinationinstanceservice_test.py
|
|
51
|
-
tests/exportDatasetToDatalandingZone_test.py
|
|
52
|
-
tests/flowservice_test.py
|
|
53
|
-
tests/schema_test.py
|
|
54
|
-
tests/som_test.py
|
|
47
|
+
aepp.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
aepp
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "aepp"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
authors = [
|
|
9
|
+
{ name="Julien Piccini", email="piccini.julien@gmail.com" },
|
|
10
|
+
]
|
|
11
|
+
description = "Package to manage AEP API endpoint and some helper functions"
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
requires-python = ">=3.10"
|
|
14
|
+
license = { text = "Apache-2.0" }
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"Operating System :: OS Independent",
|
|
18
|
+
"License :: OSI Approved :: Apache Software License",
|
|
19
|
+
"Topic :: Utilities",
|
|
20
|
+
"Topic :: Internet",
|
|
21
|
+
"Topic :: Software Development :: Libraries",
|
|
22
|
+
"Development Status :: 2 - Pre-Alpha"
|
|
23
|
+
]
|
|
24
|
+
dependencies = [
|
|
25
|
+
"pandas",
|
|
26
|
+
"requests",
|
|
27
|
+
"pathlib2",
|
|
28
|
+
"tenacity",
|
|
29
|
+
"deprecation",
|
|
30
|
+
"datamodel-code-generator",
|
|
31
|
+
"rich"
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
[project.urls]
|
|
35
|
+
"Homepage" = "https://github.com/adobe/aepp"
|
|
36
|
+
|
|
37
|
+
[project.scripts]
|
|
38
|
+
aepp = "aepp.cli.__main__:main"
|
|
39
|
+
|
|
40
|
+
[tool.setuptools]
|
|
41
|
+
packages = ["aepp"]
|
|
42
|
+
include-package-data = true
|
|
43
|
+
|
|
44
|
+
[tool.setuptools.dynamic]
|
|
45
|
+
version = {attr = "aepp.__version__.__version__"}
|
|
@@ -39,6 +39,11 @@ setuptools.setup(
|
|
|
39
39
|
long_description=long_description,
|
|
40
40
|
long_description_content_type="text/markdown",
|
|
41
41
|
url="https://github.com/adobe/aepp",
|
|
42
|
+
entry_points={
|
|
43
|
+
'console_scripts': [
|
|
44
|
+
'aepp = aepp.cli.__main__:main',
|
|
45
|
+
],
|
|
46
|
+
},
|
|
42
47
|
packages=setuptools.find_packages(),
|
|
43
48
|
include_package_data=True,
|
|
44
49
|
classifiers=[
|
|
@@ -51,5 +56,5 @@ setuptools.setup(
|
|
|
51
56
|
"Development Status :: 2 - Pre-Alpha"
|
|
52
57
|
],
|
|
53
58
|
python_requires='>=3.10',
|
|
54
|
-
install_requires=['pandas', "requests", "pathlib2", "tenacity", "deprecation","datamodel-code-generator"],
|
|
59
|
+
install_requires=['pandas', "requests", "pathlib2", "tenacity", "deprecation","datamodel-code-generator","rich"],
|
|
55
60
|
)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.4.2-1"
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Copyright 2023 Adobe. All rights reserved.
|
|
2
|
-
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
# you may not use this file except in compliance with the License. You may obtain a copy
|
|
4
|
-
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
-
#
|
|
6
|
-
# Unless required by applicable law or agreed to in writing, software distributed under
|
|
7
|
-
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
8
|
-
# OF ANY KIND, either express or implied. See the License for the specific language
|
|
9
|
-
# governing permissions and limitations under the License.
|
|
10
|
-
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
# Copyright 2023 Adobe. All rights reserved.
|
|
2
|
-
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
# you may not use this file except in compliance with the License. You may obtain a copy
|
|
4
|
-
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
-
#
|
|
6
|
-
# Unless required by applicable law or agreed to in writing, software distributed under
|
|
7
|
-
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
8
|
-
# OF ANY KIND, either express or implied. See the License for the specific language
|
|
9
|
-
# governing permissions and limitations under the License.
|
|
10
|
-
|
|
11
|
-
from aepp.schema import Schema
|
|
12
|
-
import unittest
|
|
13
|
-
from unittest.mock import patch, MagicMock
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class CatalogTest(unittest.TestCase):
|
|
17
|
-
|
|
18
|
-
def test_catalog_get_catalog__resource(self):
|
|
19
|
-
assert True
|
|
20
|
-
|
|
21
|
-
def test_catalog_decode_stream_batch(self):
|
|
22
|
-
assert True
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
def test_catalog_json_stream_messages(self):
|
|
26
|
-
assert True
|
|
27
|
-
|
|
28
|
-
def test_catalog_get_batches(self):
|
|
29
|
-
assert True
|
|
30
|
-
|
|
31
|
-
def test_catalog_get_failed_batches_df(self):
|
|
32
|
-
assert True
|
|
33
|
-
|
|
34
|
-
def test_catalog_get_batch(self):
|
|
35
|
-
assert True
|
|
36
|
-
|
|
37
|
-
def test_catalog_create_batch(self):
|
|
38
|
-
assert True
|
|
39
|
-
|
|
40
|
-
def test_catalog_get_resources(self):
|
|
41
|
-
assert True
|
|
42
|
-
|
|
43
|
-
def test_catalog_get_data_sets(self):
|
|
44
|
-
assert True
|
|
45
|
-
|
|
46
|
-
def test_catalog_create_datasets(self):
|
|
47
|
-
assert True
|
|
48
|
-
|
|
49
|
-
def test_catalog_get_data_set(self):
|
|
50
|
-
assert True
|
|
51
|
-
|
|
52
|
-
def test_catalog_delete_data_set(self):
|
|
53
|
-
assert True
|
|
54
|
-
|
|
55
|
-
def test_catalog_get_data_set_views(self):
|
|
56
|
-
assert True
|
|
57
|
-
|
|
58
|
-
def test_catalog_get_data_set_view(self):
|
|
59
|
-
assert True
|
|
60
|
-
|
|
61
|
-
def test_catalog_get_dataset_view_files(self):
|
|
62
|
-
assert True
|
|
63
|
-
|
|
64
|
-
def test_catalog_enable_dataset_profile(self):
|
|
65
|
-
assert True
|
|
66
|
-
|
|
67
|
-
def test_catalog_enable_dataset_identity(self):
|
|
68
|
-
assert True
|
|
69
|
-
|
|
70
|
-
def test_catalog_disable_dataset_profile(self):
|
|
71
|
-
assert True
|
|
72
|
-
|
|
73
|
-
def test_catalog_disable_dataset_identity(self):
|
|
74
|
-
assert True
|
|
75
|
-
|
|
76
|
-
def test_catalog_create_union_profile_dataset(self):
|
|
77
|
-
assert True
|
|
78
|
-
|
|
79
|
-
def test_catalog_get_mapper_errors(self):
|
|
80
|
-
assert True
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# Copyright 2023 Adobe. All rights reserved.
|
|
2
|
-
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
# you may not use this file except in compliance with the License. You may obtain a copy
|
|
4
|
-
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
-
#
|
|
6
|
-
# Unless required by applicable law or agreed to in writing, software distributed under
|
|
7
|
-
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
8
|
-
# OF ANY KIND, either express or implied. See the License for the specific language
|
|
9
|
-
# governing permissions and limitations under the License.
|
|
10
|
-
|
|
11
|
-
from aepp.schema import Schema
|
|
12
|
-
import unittest
|
|
13
|
-
from unittest.mock import patch, MagicMock
|
|
14
|
-
|
|
15
|
-
class DataAccessTest(unittest.TestCase):
|
|
16
|
-
|
|
17
|
-
def test_dataaccess_get_batch_files(self):
|
|
18
|
-
assert True
|
|
19
|
-
|
|
20
|
-
def test_dataaccess_get_batch_failed(self):
|
|
21
|
-
assert True
|
|
22
|
-
|
|
23
|
-
def test_dataaccess_get_batch_meta(self):
|
|
24
|
-
assert True
|
|
25
|
-
|
|
26
|
-
def test_dataaccess_getHeadFile(self):
|
|
27
|
-
assert True
|
|
28
|
-
|
|
29
|
-
def test_dataaccess_get_files(self):
|
|
30
|
-
assert True
|
|
31
|
-
|
|
32
|
-
def test_dataaccess_get_preview(self):
|
|
33
|
-
assert True
|
|
34
|
-
|
|
35
|
-
def test_dataaccess_get_resource(self):
|
|
36
|
-
assert True
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# Copyright 2023 Adobe. All rights reserved.
|
|
2
|
-
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
# you may not use this file except in compliance with the License. You may obtain a copy
|
|
4
|
-
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
-
#
|
|
6
|
-
# Unless required by applicable law or agreed to in writing, software distributed under
|
|
7
|
-
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
8
|
-
# OF ANY KIND, either express or implied. See the License for the specific language
|
|
9
|
-
# governing permissions and limitations under the License.
|
|
10
|
-
|
|
11
|
-
from aepp.schema import Schema
|
|
12
|
-
import unittest
|
|
13
|
-
from unittest.mock import patch, MagicMock
|
|
14
|
-
|
|
15
|
-
class DatasetsTest(unittest.TestCase):
|
|
16
|
-
|
|
17
|
-
def test_datasets_get_label_schema(self):
|
|
18
|
-
assert True
|
|
19
|
-
|
|
20
|
-
def test_datasets_head_label(self):
|
|
21
|
-
assert True
|
|
22
|
-
|
|
23
|
-
def test_datasets_delete_labels(self):
|
|
24
|
-
assert True
|
|
25
|
-
|
|
26
|
-
def test_datasets_create_labels(self):
|
|
27
|
-
assert True
|
|
28
|
-
|
|
29
|
-
def test_datasets_update_labels(self):
|
|
30
|
-
assert True
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# Copyright 2023 Adobe. All rights reserved.
|
|
2
|
-
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
3
|
-
# you may not use this file except in compliance with the License. You may obtain a copy
|
|
4
|
-
# of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
5
|
-
#
|
|
6
|
-
# Unless required by applicable law or agreed to in writing, software distributed under
|
|
7
|
-
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
8
|
-
# OF ANY KIND, either express or implied. See the License for the specific language
|
|
9
|
-
# governing permissions and limitations under the License.
|
|
10
|
-
|
|
11
|
-
from aepp.destinationinstanceservice import DestinationInstanceService
|
|
12
|
-
import unittest
|
|
13
|
-
from unittest.mock import patch, MagicMock, ANY
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
class DestinationInstanceServiceTest(unittest.TestCase):
|
|
17
|
-
ADHOC_INPUT = {"flow1": ["dataset1"], "flow2": ["dataset2", "dataset3"]}
|
|
18
|
-
ADHOC_EXPECTED_PAYLOAD = {'activationInfo': {'destinations': [{'flowId': 'flow1', 'datasets': [{'id': 'dataset1'}]}, {'flowId': 'flow2', 'datasets': [{'id': 'dataset2'}, {'id': 'dataset3'}]}]}}
|
|
19
|
-
|
|
20
|
-
@patch("aepp.connector.AdobeRequest")
|
|
21
|
-
def test_create_adhoc_dataset_export(self, mock_connector):
|
|
22
|
-
instance_conn = mock_connector.return_value
|
|
23
|
-
instance_conn.postData.return_value = {'foo'}
|
|
24
|
-
destination_instance_service_obj = DestinationInstanceService()
|
|
25
|
-
result = destination_instance_service_obj.createAdHocDatasetExport(self.ADHOC_INPUT)
|
|
26
|
-
assert(result is not None)
|
|
27
|
-
instance_conn.postData.assert_called_once()
|
|
28
|
-
instance_conn.postData.assert_called_with(ANY, data=self.ADHOC_EXPECTED_PAYLOAD)
|
|
29
|
-
|
|
30
|
-
@patch("aepp.connector.AdobeRequest")
|
|
31
|
-
def test_create_adhoc_dataset_export_invalid_input(self, mock_connector):
|
|
32
|
-
destination_instance_service_obj = DestinationInstanceService()
|
|
33
|
-
with self.assertRaises(Exception) as cm:
|
|
34
|
-
destination_instance_service_obj.createAdHocDatasetExport(None)
|
|
35
|
-
self.assertEqual('Require a dict for defining the flowId to datasetIds mapping', str(cm.exception))
|
|
36
|
-
|