anatools 6.0.1__tar.gz → 6.0.3__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.
- {anatools-6.0.1/anatools.egg-info → anatools-6.0.3}/PKG-INFO +2 -2
- {anatools-6.0.1 → anatools-6.0.3}/anatools/__init__.py +1 -1
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/graphs.py +8 -1
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/preview.py +24 -3
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/services.py +12 -4
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/workspaces.py +7 -1
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/preview.py +26 -4
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/volumes.py +20 -13
- {anatools-6.0.1 → anatools-6.0.3}/anatools/bin/anadeploy +1 -1
- {anatools-6.0.1 → anatools-6.0.3}/anatools/bin/anarules +6 -4
- {anatools-6.0.1 → anatools-6.0.3}/anatools/bin/renderedai +462 -68
- {anatools-6.0.1 → anatools-6.0.3/anatools.egg-info}/PKG-INFO +2 -2
- {anatools-6.0.1 → anatools-6.0.3}/anatools.egg-info/requires.txt +1 -1
- anatools-6.0.3/requirements.txt +6 -0
- anatools-6.0.1/requirements.txt +0 -6
- {anatools-6.0.1 → anatools-6.0.3}/LICENSE +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/MANIFEST.in +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/README.md +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/__init__.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/_menu.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/agents.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/anaclient.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/analytics.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/annotations.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/__init__.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/analytics.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/annotations.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/api.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/api_keys.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/channels.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/datasets.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/editor.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/gan.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/handlers.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/image.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/inpaint.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/introspection.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/llm.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/members.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/ml.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/organizations.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/rules.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/umap.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api/volumes.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/api_keys.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/channels.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/datasets.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/editor.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/gan.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/graphs.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/helpers.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/image.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/inpaint.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/llm.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/ml.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/organizations.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/rules.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/services.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/tests/__init__.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/tests/agents_test.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/tests/anaclient_test.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/tests/analytics_test.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/tests/annotations_test.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/tests/api_keys_test.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/tests/channels_test.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/tests/datasets_test.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/tests/editor_test.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/tests/gan_test.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/tests/graphs_test.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/tests/image_test.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/tests/inpaint_test.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/tests/llm_test.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/tests/ml_test.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/tests/organizations_test.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/tests/preview_test.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/tests/umap_test.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/tests/volumes_test.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/tests/workspaces_test.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/umap.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anaclient/workspaces.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/anacreate.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/annotations/__init__.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/annotations/annotations.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/annotations/convert_classification.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/annotations/convert_coco.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/annotations/convert_geococo.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/annotations/convert_kitti.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/annotations/convert_pascal.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/annotations/convert_sagemaker.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/annotations/convert_yolo.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/annotations/draw.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/bin/ana +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/bin/anamount +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/bin/anaprofile +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/bin/anaserver +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/bin/anatransfer +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/bin/anautils +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/docs/ConditionalSelector.md +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/docs/RandomChoice.md +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/docs/RandomNormal.md +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/docs/RandomRandint.md +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/docs/RandomTriangular.md +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/docs/RandomUniform.md +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/docs/SelectGenerator.md +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/docs/SetInstanceCount.md +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/docs/String.md +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/docs/SweepArange.md +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/docs/SweepLinspace.md +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/docs/Value.md +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/docs/Vector2D.md +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/docs/Vector3D.md +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/docs/Weight.md +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/docs/__init__.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/__init__.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/ana_object.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/bbox.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/blender_main.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/camera_checks.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/channel.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/context.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/directory_object.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/download.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/file_handlers.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/file_metadata.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/file_object.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/generator.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/interp.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/load.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/mount.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/node.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/object_utils.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/package_utils.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/print.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/python_main.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/rigged_object.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/scene.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/search_utils.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/service.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/tools.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/lib/transfer.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/nodes/__init__.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/nodes/constants.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/nodes/constants.yml +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/nodes/generators.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/nodes/generators.yml +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/nodes/logic.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/nodes/logic.yml +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/nodes/random_generator.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/nodes/random_generator.yml +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/nodes/sweep_arange.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/nodes/sweep_arange.yml +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/nodes/sweep_linspace.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/nodes/sweep_linspace.yml +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/nodes/vectors.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/nodes/vectors.yml +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/nodes/volume_directory.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/nodes/volume_directory.yml +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/nodes/volume_file.py +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools/nodes/volume_file.yml +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools.egg-info/SOURCES.txt +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools.egg-info/dependency_links.txt +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools.egg-info/entry_points.txt +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/anatools.egg-info/top_level.txt +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/pyproject.toml +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/setup.cfg +0 -0
- {anatools-6.0.1 → anatools-6.0.3}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: anatools
|
|
3
|
-
Version: 6.0.
|
|
3
|
+
Version: 6.0.3
|
|
4
4
|
Summary: Tools for development with the Rendered.ai Platform.
|
|
5
5
|
Home-page: https://rendered.ai
|
|
6
6
|
Author: Rendered AI, Inc
|
|
@@ -14,7 +14,7 @@ Requires-Dist: docker
|
|
|
14
14
|
Requires-Dist: numpy
|
|
15
15
|
Requires-Dist: pillow
|
|
16
16
|
Requires-Dist: pyyaml
|
|
17
|
-
Requires-Dist: requests
|
|
17
|
+
Requires-Dist: requests<3.0.0,>=2.32.3
|
|
18
18
|
Requires-Dist: colorama
|
|
19
19
|
Dynamic: author
|
|
20
20
|
Dynamic: author-email
|
|
@@ -2,8 +2,15 @@
|
|
|
2
2
|
Graphs API calls.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
GRAPH_DEFAULT_FIELDS = [
|
|
6
|
+
"graphId", "workspaceId", "name", "description",
|
|
7
|
+
"channel", "channelId", "readOnly", "showPreview", "previewId",
|
|
8
|
+
"createdBy", "createdAt", "updatedBy", "updatedAt",
|
|
9
|
+
"hash", "tags",
|
|
10
|
+
]
|
|
11
|
+
|
|
5
12
|
def getGraphs(self, workspaceId, graphId=None, name=None, email=None, staged=True, limit=100, cursor=None, filters={}, fields=None):
|
|
6
|
-
if fields is None: fields =
|
|
13
|
+
if fields is None: fields = GRAPH_DEFAULT_FIELDS
|
|
7
14
|
fields = "\n".join(fields)
|
|
8
15
|
if filters is None: filters = {}
|
|
9
16
|
response = self.session.post(
|
|
@@ -25,17 +25,38 @@ def getPreview(self, workspaceId, previewId, fields=None):
|
|
|
25
25
|
|
|
26
26
|
def createPreview(self, workspaceId, graphId):
|
|
27
27
|
response = self.session.post(
|
|
28
|
-
url = self.url,
|
|
29
|
-
headers = self.headers,
|
|
28
|
+
url = self.url,
|
|
29
|
+
headers = self.headers,
|
|
30
30
|
json = {
|
|
31
31
|
"operationName": "createPreview",
|
|
32
32
|
"variables": {
|
|
33
33
|
"workspaceId": workspaceId,
|
|
34
34
|
"graphId": graphId
|
|
35
35
|
},
|
|
36
|
-
"query": """mutation
|
|
36
|
+
"query": """mutation
|
|
37
37
|
createPreview($workspaceId: String!, $graphId: String!) {
|
|
38
38
|
createPreview(workspaceId: $workspaceId, graphId: $graphId)
|
|
39
39
|
}"""})
|
|
40
40
|
return self.errorhandler(response, "createPreview")
|
|
41
41
|
|
|
42
|
+
|
|
43
|
+
def getPreviewLog(self, workspaceId, previewId, fields=None):
|
|
44
|
+
if fields is None: fields = self.getTypeFields("PreviewLog")
|
|
45
|
+
fields = "\n".join(fields)
|
|
46
|
+
response = self.session.post(
|
|
47
|
+
url = self.url,
|
|
48
|
+
headers = self.headers,
|
|
49
|
+
json = {
|
|
50
|
+
"operationName": "getPreviewLog",
|
|
51
|
+
"variables": {
|
|
52
|
+
"workspaceId": workspaceId,
|
|
53
|
+
"previewId": previewId
|
|
54
|
+
},
|
|
55
|
+
"query": f"""query
|
|
56
|
+
getPreviewLog($workspaceId: String!, $previewId: String!) {{
|
|
57
|
+
getPreviewLog(workspaceId: $workspaceId, previewId: $previewId) {{
|
|
58
|
+
{fields}
|
|
59
|
+
}}
|
|
60
|
+
}}"""})
|
|
61
|
+
return self.errorhandler(response, "getPreviewLog")
|
|
62
|
+
|
|
@@ -2,16 +2,24 @@
|
|
|
2
2
|
Services API calls.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
SERVICE_DEFAULT_FIELDS = [
|
|
6
|
+
"serviceId", "name", "sanitizedName", "description", "type",
|
|
7
|
+
"volumes", "instance", "version", "state", "tags",
|
|
8
|
+
"organizationId", "organization", "serviceType",
|
|
9
|
+
"persistentServiceId", "parentServiceId", "url",
|
|
10
|
+
"createdAt", "updatedAt", "createdBy", "updatedBy",
|
|
11
|
+
]
|
|
12
|
+
|
|
5
13
|
def getServiceTypes(self, fields=None):
|
|
6
14
|
if fields is None: fields = self.getTypeFields("ServiceType")
|
|
7
15
|
fields = "\n".join(fields)
|
|
8
16
|
response = self.session.post(
|
|
9
|
-
url = self.url,
|
|
10
|
-
headers = self.headers,
|
|
17
|
+
url = self.url,
|
|
18
|
+
headers = self.headers,
|
|
11
19
|
json = {
|
|
12
20
|
"operationName": "getServiceTypes",
|
|
13
21
|
"variables": {},
|
|
14
|
-
"query": F"""query
|
|
22
|
+
"query": F"""query
|
|
15
23
|
getServiceTypes {{
|
|
16
24
|
getServiceTypes {{
|
|
17
25
|
{fields}
|
|
@@ -21,7 +29,7 @@ def getServiceTypes(self, fields=None):
|
|
|
21
29
|
|
|
22
30
|
|
|
23
31
|
def getServices(self, organizationId=None, workspaceId=None, serviceId=None, limit=100, cursor=None, filters={}, fields=None):
|
|
24
|
-
if fields is None: fields =
|
|
32
|
+
if fields is None: fields = SERVICE_DEFAULT_FIELDS
|
|
25
33
|
fields = "\n".join(fields)
|
|
26
34
|
if filters is None: filters = {}
|
|
27
35
|
response = self.session.post(
|
|
@@ -2,8 +2,14 @@
|
|
|
2
2
|
Workspaces API calls.
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
+
WORKSPACE_DEFAULT_FIELDS = [
|
|
6
|
+
"workspaceId", "name", "description", "objective",
|
|
7
|
+
"organizationId", "organization", "status", "tags",
|
|
8
|
+
"createdAt", "createdBy", "updatedAt", "updatedBy",
|
|
9
|
+
]
|
|
10
|
+
|
|
5
11
|
def getWorkspaces(self, organizationId=None, workspaceId=None, cursor=None, limit=100, filters={}, fields=None):
|
|
6
|
-
if fields is None: fields =
|
|
12
|
+
if fields is None: fields = WORKSPACE_DEFAULT_FIELDS
|
|
7
13
|
fields = "\n".join(fields)
|
|
8
14
|
if filters is None: filters = {}
|
|
9
15
|
response = self.session.post(
|
|
@@ -27,14 +27,14 @@ def get_preview(self, previewId, workspaceId=None, fields=None):
|
|
|
27
27
|
|
|
28
28
|
def create_preview(self, graphId, workspaceId=None):
|
|
29
29
|
"""Creates a preview job.
|
|
30
|
-
|
|
30
|
+
|
|
31
31
|
Parameters
|
|
32
32
|
----------
|
|
33
33
|
graphId: str
|
|
34
34
|
The unique identifier for the graph.
|
|
35
|
-
workspaceId : str
|
|
36
|
-
Workspace ID create the preview in. If none is provided, the default workspace will get used.
|
|
37
|
-
|
|
35
|
+
workspaceId : str
|
|
36
|
+
Workspace ID create the preview in. If none is provided, the default workspace will get used.
|
|
37
|
+
|
|
38
38
|
Returns
|
|
39
39
|
-------
|
|
40
40
|
str
|
|
@@ -43,4 +43,26 @@ def create_preview(self, graphId, workspaceId=None):
|
|
|
43
43
|
if self.check_logout(): return
|
|
44
44
|
if workspaceId is None: workspaceId = self.workspace
|
|
45
45
|
return self.ana_api.createPreview(workspaceId=workspaceId, graphId=graphId)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def get_preview_log(self, previewId, workspaceId=None, fields=None):
|
|
49
|
+
"""Fetches the logs for a preview job.
|
|
50
|
+
|
|
51
|
+
Parameters
|
|
52
|
+
----------
|
|
53
|
+
previewId : str
|
|
54
|
+
The unique identifier for the preview job.
|
|
55
|
+
workspaceId : str
|
|
56
|
+
Workspace the preview job was run in. If none is provided, the default workspace will get used.
|
|
57
|
+
fields : list
|
|
58
|
+
List of fields to return, leave empty to get all fields.
|
|
59
|
+
|
|
60
|
+
Returns
|
|
61
|
+
-------
|
|
62
|
+
dict
|
|
63
|
+
Preview log information containing previewId, status, and logs.
|
|
64
|
+
"""
|
|
65
|
+
if self.check_logout(): return
|
|
66
|
+
if workspaceId is None: workspaceId = self.workspace
|
|
67
|
+
return self.ana_api.getPreviewLog(workspaceId=workspaceId, previewId=previewId, fields=fields)
|
|
46
68
|
|
|
@@ -311,35 +311,42 @@ def upload_volume_data(self, volumeId, files=None, localDir=None, destinationDir
|
|
|
311
311
|
if destinationDir: destinationDir += '/'
|
|
312
312
|
|
|
313
313
|
source_files = []
|
|
314
|
+
source_paths = []
|
|
314
315
|
source_hashes = []
|
|
315
316
|
faileduploads = []
|
|
316
|
-
|
|
317
|
+
|
|
317
318
|
if len(files):
|
|
318
319
|
for file in files:
|
|
319
|
-
filepath = os.path.join(localDir, file)
|
|
320
|
+
filepath = os.path.join(localDir, file) if not os.path.isabs(file) else file
|
|
320
321
|
if os.path.isdir(filepath):
|
|
321
322
|
for root, dirs, files in os.walk(filepath):
|
|
322
323
|
for file in files:
|
|
323
|
-
|
|
324
|
-
|
|
324
|
+
local_path = os.path.join(root, file)
|
|
325
|
+
relative_name = local_path.replace(localDir, '') if local_path.startswith(localDir) else os.path.relpath(local_path, localDir)
|
|
326
|
+
source_files.append(relative_name)
|
|
327
|
+
source_paths.append(local_path)
|
|
325
328
|
if sync == True:
|
|
326
|
-
file_hash = generate_etag(
|
|
327
|
-
source_hashes.append(
|
|
329
|
+
file_hash = generate_etag(local_path)
|
|
330
|
+
source_hashes.append(relative_name + file_hash)
|
|
328
331
|
elif os.path.isfile(filepath):
|
|
329
|
-
|
|
332
|
+
upload_name = os.path.basename(file) if os.path.isabs(file) else file
|
|
333
|
+
source_files.append(upload_name)
|
|
334
|
+
source_paths.append(filepath)
|
|
330
335
|
if sync == True:
|
|
331
336
|
file_hash = generate_etag(filepath)
|
|
332
|
-
source_hashes.append(
|
|
337
|
+
source_hashes.append(upload_name + file_hash)
|
|
333
338
|
else:
|
|
334
339
|
if self.interactive: print(f"Could not find {filepath}.")
|
|
335
340
|
else:
|
|
336
341
|
for root, dirs, files in os.walk(localDir):
|
|
337
342
|
for file in files:
|
|
338
|
-
|
|
339
|
-
|
|
343
|
+
local_path = os.path.join(root, file)
|
|
344
|
+
relative_name = local_path.replace(localDir, '')
|
|
345
|
+
source_files.append(relative_name)
|
|
346
|
+
source_paths.append(local_path)
|
|
340
347
|
if sync == True:
|
|
341
|
-
file_hash = generate_etag(
|
|
342
|
-
source_hashes.append(
|
|
348
|
+
file_hash = generate_etag(local_path)
|
|
349
|
+
source_hashes.append(relative_name + file_hash)
|
|
343
350
|
|
|
344
351
|
if sync == True:
|
|
345
352
|
response = []
|
|
@@ -389,7 +396,7 @@ def upload_volume_data(self, volumeId, files=None, localDir=None, destinationDir
|
|
|
389
396
|
elif sync == False or (source_hashes[index] not in destination_hashes):
|
|
390
397
|
try:
|
|
391
398
|
self.refresh_token()
|
|
392
|
-
filepath =
|
|
399
|
+
filepath = source_paths[index]
|
|
393
400
|
filesize = os.path.getsize(filepath)
|
|
394
401
|
fileinfo = self.ana_api.uploadVolumeData(volumeId=volumeId, key=destination_key, size=filesize)
|
|
395
402
|
parts = multipart_upload_file(filepath, int(fileinfo["partSize"]), fileinfo["urls"], f"Uploading {file} to the volume [{index+1} / {len(source_files)}]", interactive=self.interactive)
|
|
@@ -523,7 +523,7 @@ try:
|
|
|
523
523
|
print(f'\033[1F\033[FRegistering Service Image...done. [{time.time()-registerstart:.3f}s]\033[K\n\033[K')
|
|
524
524
|
print_color(f"The service has been deployed and is ready to use!", color='brand')
|
|
525
525
|
print(f'Deployment Time: {time.time()-starttime:.3f}s\n')
|
|
526
|
-
client.edit_service(serviceId=remoteservice['serviceId'], schema=json.dumps(localservice.schemas))
|
|
526
|
+
client.edit_service(serviceId=remoteservice['serviceId'], description=localservice.description, schema=json.dumps(localservice.schemas))
|
|
527
527
|
|
|
528
528
|
remoteconfig = {
|
|
529
529
|
"serviceId": remoteservice['serviceId'],
|
|
@@ -107,10 +107,12 @@ if args.workspace is not None:
|
|
|
107
107
|
try:
|
|
108
108
|
schema = json.loads(service['schema'])
|
|
109
109
|
if schema and isinstance(schema, dict):
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
110
|
+
tools = schema.get('tools', schema.get('execs', schema))
|
|
111
|
+
if isinstance(tools, dict):
|
|
112
|
+
for tool in tools.keys():
|
|
113
|
+
description = "No description"
|
|
114
|
+
if isinstance(tools[tool], dict) and 'description' in tools[tool]: description = tools[tool]['description']
|
|
115
|
+
rules+=f"\t\t- {tool} : {description}\n"
|
|
114
116
|
except (json.JSONDecodeError, TypeError) as e:
|
|
115
117
|
if args.verbose: print(f"Warning: Failed to parse schema for service {service['name']}: {e}")
|
|
116
118
|
pass
|