digitalhub 0.8.0__tar.gz → 0.8.0b0__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.
Potentially problematic release.
This version of digitalhub might be problematic. Click here for more details.
- {digitalhub-0.8.0 → digitalhub-0.8.0b0}/PKG-INFO +13 -29
- {digitalhub-0.8.0 → digitalhub-0.8.0b0}/README.md +1 -1
- digitalhub-0.8.0b0/digitalhub/__init__.py +113 -0
- {digitalhub-0.8.0 → digitalhub-0.8.0b0}/digitalhub.egg-info/PKG-INFO +13 -29
- digitalhub-0.8.0b0/digitalhub.egg-info/SOURCES.txt +17 -0
- digitalhub-0.8.0b0/digitalhub.egg-info/requires.txt +16 -0
- {digitalhub-0.8.0 → digitalhub-0.8.0b0}/digitalhub.egg-info/top_level.txt +0 -1
- {digitalhub-0.8.0 → digitalhub-0.8.0b0}/pyproject.toml +13 -34
- digitalhub-0.8.0b0/test/test_crud_artifacts.py +96 -0
- digitalhub-0.8.0b0/test/test_crud_dataitems.py +96 -0
- {digitalhub-0.8.0 → digitalhub-0.8.0b0}/test/test_crud_functions.py +1 -1
- {digitalhub-0.8.0 → digitalhub-0.8.0b0}/test/test_crud_runs.py +1 -1
- {digitalhub-0.8.0 → digitalhub-0.8.0b0}/test/test_crud_tasks.py +1 -1
- digitalhub-0.8.0/digitalhub/__init__.py +0 -82
- digitalhub-0.8.0/digitalhub/client/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/client/_base/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/client/_base/client.py +0 -56
- digitalhub-0.8.0/digitalhub/client/api.py +0 -63
- digitalhub-0.8.0/digitalhub/client/builder.py +0 -50
- digitalhub-0.8.0/digitalhub/client/dhcore/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/client/dhcore/client.py +0 -669
- digitalhub-0.8.0/digitalhub/client/dhcore/env.py +0 -21
- digitalhub-0.8.0/digitalhub/client/dhcore/models.py +0 -46
- digitalhub-0.8.0/digitalhub/client/dhcore/utils.py +0 -111
- digitalhub-0.8.0/digitalhub/client/local/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/client/local/client.py +0 -533
- digitalhub-0.8.0/digitalhub/context/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/context/api.py +0 -93
- digitalhub-0.8.0/digitalhub/context/builder.py +0 -94
- digitalhub-0.8.0/digitalhub/context/context.py +0 -136
- digitalhub-0.8.0/digitalhub/datastores/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/datastores/_base/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/datastores/_base/datastore.py +0 -85
- digitalhub-0.8.0/digitalhub/datastores/api.py +0 -37
- digitalhub-0.8.0/digitalhub/datastores/builder.py +0 -110
- digitalhub-0.8.0/digitalhub/datastores/local/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/datastores/local/datastore.py +0 -50
- digitalhub-0.8.0/digitalhub/datastores/remote/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/datastores/remote/datastore.py +0 -31
- digitalhub-0.8.0/digitalhub/datastores/s3/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/datastores/s3/datastore.py +0 -46
- digitalhub-0.8.0/digitalhub/datastores/sql/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/datastores/sql/datastore.py +0 -68
- digitalhub-0.8.0/digitalhub/entities/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/_base/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/_base/_base/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/_base/_base/entity.py +0 -82
- digitalhub-0.8.0/digitalhub/entities/_base/api_utils.py +0 -620
- digitalhub-0.8.0/digitalhub/entities/_base/context/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/_base/context/entity.py +0 -118
- digitalhub-0.8.0/digitalhub/entities/_base/crud.py +0 -468
- digitalhub-0.8.0/digitalhub/entities/_base/entity/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/_base/entity/_constructors/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/_base/entity/_constructors/metadata.py +0 -44
- digitalhub-0.8.0/digitalhub/entities/_base/entity/_constructors/name.py +0 -31
- digitalhub-0.8.0/digitalhub/entities/_base/entity/_constructors/spec.py +0 -33
- digitalhub-0.8.0/digitalhub/entities/_base/entity/_constructors/status.py +0 -52
- digitalhub-0.8.0/digitalhub/entities/_base/entity/_constructors/uuid.py +0 -26
- digitalhub-0.8.0/digitalhub/entities/_base/entity/builder.py +0 -175
- digitalhub-0.8.0/digitalhub/entities/_base/entity/entity.py +0 -106
- digitalhub-0.8.0/digitalhub/entities/_base/entity/metadata.py +0 -59
- digitalhub-0.8.0/digitalhub/entities/_base/entity/spec.py +0 -58
- digitalhub-0.8.0/digitalhub/entities/_base/entity/status.py +0 -43
- digitalhub-0.8.0/digitalhub/entities/_base/executable/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/_base/executable/entity.py +0 -405
- digitalhub-0.8.0/digitalhub/entities/_base/material/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/_base/material/entity.py +0 -214
- digitalhub-0.8.0/digitalhub/entities/_base/material/spec.py +0 -22
- digitalhub-0.8.0/digitalhub/entities/_base/material/status.py +0 -49
- digitalhub-0.8.0/digitalhub/entities/_base/runtime_entity/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/_base/runtime_entity/builder.py +0 -106
- digitalhub-0.8.0/digitalhub/entities/_base/unversioned/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/_base/unversioned/builder.py +0 -66
- digitalhub-0.8.0/digitalhub/entities/_base/unversioned/entity.py +0 -49
- digitalhub-0.8.0/digitalhub/entities/_base/versioned/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/_base/versioned/builder.py +0 -68
- digitalhub-0.8.0/digitalhub/entities/_base/versioned/entity.py +0 -53
- digitalhub-0.8.0/digitalhub/entities/artifact/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/artifact/_base/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/artifact/_base/builder.py +0 -86
- digitalhub-0.8.0/digitalhub/entities/artifact/_base/entity.py +0 -39
- digitalhub-0.8.0/digitalhub/entities/artifact/_base/spec.py +0 -15
- digitalhub-0.8.0/digitalhub/entities/artifact/_base/status.py +0 -9
- digitalhub-0.8.0/digitalhub/entities/artifact/artifact/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/artifact/artifact/builder.py +0 -18
- digitalhub-0.8.0/digitalhub/entities/artifact/artifact/entity.py +0 -32
- digitalhub-0.8.0/digitalhub/entities/artifact/artifact/spec.py +0 -27
- digitalhub-0.8.0/digitalhub/entities/artifact/artifact/status.py +0 -15
- digitalhub-0.8.0/digitalhub/entities/artifact/crud.py +0 -332
- digitalhub-0.8.0/digitalhub/entities/builders.py +0 -63
- digitalhub-0.8.0/digitalhub/entities/dataitem/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/dataitem/_base/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/dataitem/_base/builder.py +0 -86
- digitalhub-0.8.0/digitalhub/entities/dataitem/_base/entity.py +0 -75
- digitalhub-0.8.0/digitalhub/entities/dataitem/_base/spec.py +0 -15
- digitalhub-0.8.0/digitalhub/entities/dataitem/_base/status.py +0 -20
- digitalhub-0.8.0/digitalhub/entities/dataitem/crud.py +0 -372
- digitalhub-0.8.0/digitalhub/entities/dataitem/dataitem/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/dataitem/dataitem/builder.py +0 -18
- digitalhub-0.8.0/digitalhub/entities/dataitem/dataitem/entity.py +0 -32
- digitalhub-0.8.0/digitalhub/entities/dataitem/dataitem/spec.py +0 -15
- digitalhub-0.8.0/digitalhub/entities/dataitem/dataitem/status.py +0 -9
- digitalhub-0.8.0/digitalhub/entities/dataitem/iceberg/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/dataitem/iceberg/builder.py +0 -18
- digitalhub-0.8.0/digitalhub/entities/dataitem/iceberg/entity.py +0 -32
- digitalhub-0.8.0/digitalhub/entities/dataitem/iceberg/spec.py +0 -15
- digitalhub-0.8.0/digitalhub/entities/dataitem/iceberg/status.py +0 -9
- digitalhub-0.8.0/digitalhub/entities/dataitem/table/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/dataitem/table/builder.py +0 -18
- digitalhub-0.8.0/digitalhub/entities/dataitem/table/entity.py +0 -146
- digitalhub-0.8.0/digitalhub/entities/dataitem/table/models.py +0 -62
- digitalhub-0.8.0/digitalhub/entities/dataitem/table/spec.py +0 -25
- digitalhub-0.8.0/digitalhub/entities/dataitem/table/status.py +0 -9
- digitalhub-0.8.0/digitalhub/entities/function/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/function/_base/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/function/_base/builder.py +0 -79
- digitalhub-0.8.0/digitalhub/entities/function/_base/entity.py +0 -98
- digitalhub-0.8.0/digitalhub/entities/function/_base/models.py +0 -118
- digitalhub-0.8.0/digitalhub/entities/function/_base/spec.py +0 -15
- digitalhub-0.8.0/digitalhub/entities/function/_base/status.py +0 -9
- digitalhub-0.8.0/digitalhub/entities/function/crud.py +0 -279
- digitalhub-0.8.0/digitalhub/entities/model/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/model/_base/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/model/_base/builder.py +0 -86
- digitalhub-0.8.0/digitalhub/entities/model/_base/entity.py +0 -34
- digitalhub-0.8.0/digitalhub/entities/model/_base/spec.py +0 -49
- digitalhub-0.8.0/digitalhub/entities/model/_base/status.py +0 -9
- digitalhub-0.8.0/digitalhub/entities/model/crud.py +0 -331
- digitalhub-0.8.0/digitalhub/entities/model/huggingface/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/model/huggingface/builder.py +0 -18
- digitalhub-0.8.0/digitalhub/entities/model/huggingface/entity.py +0 -32
- digitalhub-0.8.0/digitalhub/entities/model/huggingface/spec.py +0 -36
- digitalhub-0.8.0/digitalhub/entities/model/huggingface/status.py +0 -9
- digitalhub-0.8.0/digitalhub/entities/model/mlflow/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/model/mlflow/builder.py +0 -18
- digitalhub-0.8.0/digitalhub/entities/model/mlflow/entity.py +0 -32
- digitalhub-0.8.0/digitalhub/entities/model/mlflow/models.py +0 -26
- digitalhub-0.8.0/digitalhub/entities/model/mlflow/spec.py +0 -44
- digitalhub-0.8.0/digitalhub/entities/model/mlflow/status.py +0 -9
- digitalhub-0.8.0/digitalhub/entities/model/mlflow/utils.py +0 -81
- digitalhub-0.8.0/digitalhub/entities/model/model/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/model/model/builder.py +0 -18
- digitalhub-0.8.0/digitalhub/entities/model/model/entity.py +0 -32
- digitalhub-0.8.0/digitalhub/entities/model/model/spec.py +0 -15
- digitalhub-0.8.0/digitalhub/entities/model/model/status.py +0 -9
- digitalhub-0.8.0/digitalhub/entities/model/sklearn/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/model/sklearn/builder.py +0 -18
- digitalhub-0.8.0/digitalhub/entities/model/sklearn/entity.py +0 -32
- digitalhub-0.8.0/digitalhub/entities/model/sklearn/spec.py +0 -15
- digitalhub-0.8.0/digitalhub/entities/model/sklearn/status.py +0 -9
- digitalhub-0.8.0/digitalhub/entities/project/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/project/_base/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/project/_base/builder.py +0 -128
- digitalhub-0.8.0/digitalhub/entities/project/_base/entity.py +0 -2078
- digitalhub-0.8.0/digitalhub/entities/project/_base/spec.py +0 -50
- digitalhub-0.8.0/digitalhub/entities/project/_base/status.py +0 -9
- digitalhub-0.8.0/digitalhub/entities/project/crud.py +0 -357
- digitalhub-0.8.0/digitalhub/entities/run/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/run/_base/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/run/_base/builder.py +0 -94
- digitalhub-0.8.0/digitalhub/entities/run/_base/entity.py +0 -307
- digitalhub-0.8.0/digitalhub/entities/run/_base/spec.py +0 -50
- digitalhub-0.8.0/digitalhub/entities/run/_base/status.py +0 -9
- digitalhub-0.8.0/digitalhub/entities/run/crud.py +0 -219
- digitalhub-0.8.0/digitalhub/entities/secret/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/secret/_base/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/secret/_base/builder.py +0 -81
- digitalhub-0.8.0/digitalhub/entities/secret/_base/entity.py +0 -74
- digitalhub-0.8.0/digitalhub/entities/secret/_base/spec.py +0 -35
- digitalhub-0.8.0/digitalhub/entities/secret/_base/status.py +0 -9
- digitalhub-0.8.0/digitalhub/entities/secret/crud.py +0 -290
- digitalhub-0.8.0/digitalhub/entities/task/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/task/_base/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/task/_base/builder.py +0 -91
- digitalhub-0.8.0/digitalhub/entities/task/_base/entity.py +0 -136
- digitalhub-0.8.0/digitalhub/entities/task/_base/models.py +0 -208
- digitalhub-0.8.0/digitalhub/entities/task/_base/spec.py +0 -53
- digitalhub-0.8.0/digitalhub/entities/task/_base/status.py +0 -9
- digitalhub-0.8.0/digitalhub/entities/task/crud.py +0 -228
- digitalhub-0.8.0/digitalhub/entities/utils/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/utils/api.py +0 -346
- digitalhub-0.8.0/digitalhub/entities/utils/entity_types.py +0 -19
- digitalhub-0.8.0/digitalhub/entities/utils/state.py +0 -31
- digitalhub-0.8.0/digitalhub/entities/utils/utils.py +0 -202
- digitalhub-0.8.0/digitalhub/entities/workflow/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/workflow/_base/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/entities/workflow/_base/builder.py +0 -79
- digitalhub-0.8.0/digitalhub/entities/workflow/_base/entity.py +0 -74
- digitalhub-0.8.0/digitalhub/entities/workflow/_base/spec.py +0 -15
- digitalhub-0.8.0/digitalhub/entities/workflow/_base/status.py +0 -9
- digitalhub-0.8.0/digitalhub/entities/workflow/crud.py +0 -278
- digitalhub-0.8.0/digitalhub/factory/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/factory/api.py +0 -277
- digitalhub-0.8.0/digitalhub/factory/factory.py +0 -268
- digitalhub-0.8.0/digitalhub/factory/utils.py +0 -90
- digitalhub-0.8.0/digitalhub/readers/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/readers/_base/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/readers/_base/builder.py +0 -26
- digitalhub-0.8.0/digitalhub/readers/_base/reader.py +0 -70
- digitalhub-0.8.0/digitalhub/readers/api.py +0 -80
- digitalhub-0.8.0/digitalhub/readers/factory.py +0 -133
- digitalhub-0.8.0/digitalhub/readers/pandas/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/readers/pandas/builder.py +0 -29
- digitalhub-0.8.0/digitalhub/readers/pandas/reader.py +0 -207
- digitalhub-0.8.0/digitalhub/runtimes/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/runtimes/_base.py +0 -102
- digitalhub-0.8.0/digitalhub/runtimes/builder.py +0 -32
- digitalhub-0.8.0/digitalhub/stores/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/stores/_base/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/stores/_base/store.py +0 -189
- digitalhub-0.8.0/digitalhub/stores/api.py +0 -54
- digitalhub-0.8.0/digitalhub/stores/builder.py +0 -211
- digitalhub-0.8.0/digitalhub/stores/local/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/stores/local/store.py +0 -230
- digitalhub-0.8.0/digitalhub/stores/remote/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/stores/remote/store.py +0 -143
- digitalhub-0.8.0/digitalhub/stores/s3/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/stores/s3/store.py +0 -563
- digitalhub-0.8.0/digitalhub/stores/sql/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/stores/sql/store.py +0 -328
- digitalhub-0.8.0/digitalhub/utils/__init__.py +0 -0
- digitalhub-0.8.0/digitalhub/utils/data_utils.py +0 -127
- digitalhub-0.8.0/digitalhub/utils/exceptions.py +0 -67
- digitalhub-0.8.0/digitalhub/utils/file_utils.py +0 -204
- digitalhub-0.8.0/digitalhub/utils/generic_utils.py +0 -183
- digitalhub-0.8.0/digitalhub/utils/git_utils.py +0 -148
- digitalhub-0.8.0/digitalhub/utils/io_utils.py +0 -116
- digitalhub-0.8.0/digitalhub/utils/logger.py +0 -17
- digitalhub-0.8.0/digitalhub/utils/s3_utils.py +0 -58
- digitalhub-0.8.0/digitalhub/utils/uri_utils.py +0 -56
- digitalhub-0.8.0/digitalhub.egg-info/SOURCES.txt +0 -234
- digitalhub-0.8.0/digitalhub.egg-info/requires.txt +0 -33
- digitalhub-0.8.0/test/local/CRUD/test_artifacts.py +0 -96
- digitalhub-0.8.0/test/local/CRUD/test_dataitems.py +0 -96
- digitalhub-0.8.0/test/local/CRUD/test_models.py +0 -95
- {digitalhub-0.8.0 → digitalhub-0.8.0b0}/LICENSE.txt +0 -0
- {digitalhub-0.8.0 → digitalhub-0.8.0b0}/digitalhub.egg-info/dependency_links.txt +0 -0
- {digitalhub-0.8.0 → digitalhub-0.8.0b0}/setup.cfg +0 -0
- {digitalhub-0.8.0/test/local/imports → digitalhub-0.8.0b0/test}/test_imports.py +0 -0
- {digitalhub-0.8.0 → digitalhub-0.8.0b0}/test/testkfp.py +0 -0
- {digitalhub-0.8.0 → digitalhub-0.8.0b0}/test/testkfp_pipeline.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: digitalhub
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.0b0
|
|
4
4
|
Summary: Python SDK for Digitalhub
|
|
5
5
|
Author-email: Fondazione Bruno Kessler <dslab@fbk.eu>, Matteo Martini <mmartini@fbk.eu>
|
|
6
6
|
License: Apache License
|
|
@@ -229,38 +229,22 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
229
229
|
Requires-Python: >=3.9
|
|
230
230
|
Description-Content-Type: text/markdown
|
|
231
231
|
License-File: LICENSE.txt
|
|
232
|
-
Requires-Dist:
|
|
233
|
-
|
|
234
|
-
Requires-Dist:
|
|
235
|
-
Requires-Dist:
|
|
236
|
-
|
|
237
|
-
Requires-Dist:
|
|
238
|
-
|
|
239
|
-
Requires-Dist:
|
|
240
|
-
Requires-Dist: GitPython>=3
|
|
241
|
-
Requires-Dist: psycopg2-binary
|
|
242
|
-
Requires-Dist: python-slugify
|
|
232
|
+
Requires-Dist: digitalhub-core<0.9,>=0.8.0b
|
|
233
|
+
Provides-Extra: all
|
|
234
|
+
Requires-Dist: digitalhub-data<0.9,>=0.8.0b; extra == "all"
|
|
235
|
+
Requires-Dist: digitalhub-ml<0.9,>=0.8.0b; extra == "all"
|
|
236
|
+
Provides-Extra: ml
|
|
237
|
+
Requires-Dist: digitalhub-ml<0.9,>=0.8.0b; extra == "ml"
|
|
238
|
+
Provides-Extra: data
|
|
239
|
+
Requires-Dist: digitalhub-data<0.9,>=0.8.0b; extra == "data"
|
|
243
240
|
Provides-Extra: full
|
|
244
|
-
Requires-Dist:
|
|
245
|
-
Requires-Dist:
|
|
246
|
-
|
|
247
|
-
Requires-Dist: pandas<2.2,>=1.2; extra == "pandas"
|
|
248
|
-
Provides-Extra: mlflow
|
|
249
|
-
Requires-Dist: mlflow; extra == "mlflow"
|
|
250
|
-
Provides-Extra: dev
|
|
251
|
-
Requires-Dist: black; extra == "dev"
|
|
252
|
-
Requires-Dist: pytest; extra == "dev"
|
|
253
|
-
Requires-Dist: bumpver; extra == "dev"
|
|
254
|
-
Requires-Dist: ruff; extra == "dev"
|
|
255
|
-
Requires-Dist: moto; extra == "dev"
|
|
256
|
-
Provides-Extra: docs
|
|
257
|
-
Requires-Dist: Sphinx>=7; extra == "docs"
|
|
258
|
-
Requires-Dist: pydata-sphinx-theme>=0.15; extra == "docs"
|
|
259
|
-
Requires-Dist: numpydoc>=1.6; extra == "docs"
|
|
241
|
+
Requires-Dist: digitalhub-core[full]<0.9,>=0.8.0b; extra == "full"
|
|
242
|
+
Requires-Dist: digitalhub-data[pandas]<0.9,>=0.8.0b; extra == "full"
|
|
243
|
+
Requires-Dist: digitalhub-ml[mlflow]<0.9,>=0.8.0b; extra == "full"
|
|
260
244
|
|
|
261
245
|
# Digitalhub Library
|
|
262
246
|
|
|
263
247
|
The Digitalhub SDK library is used to manage entities and executions in Digitalhub from Python.
|
|
264
248
|
It comes with a suite of tools to help you manage your projects and executions. It exposes CRUD methods to create, read, update and delete entities, and objects methods to excute functions or workflows, collect or store execution results and data.
|
|
265
249
|
|
|
266
|
-
A more detailed description of the library can be found in the [official documentation](https://scc-digitalhub.github.io/
|
|
250
|
+
A more detailed description of the library can be found in the [official documentation](https://scc-digitalhub.github.io/docs/) of Digitalhub.
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
The Digitalhub SDK library is used to manage entities and executions in Digitalhub from Python.
|
|
4
4
|
It comes with a suite of tools to help you manage your projects and executions. It exposes CRUD methods to create, read, update and delete entities, and objects methods to excute functions or workflows, collect or store execution results and data.
|
|
5
5
|
|
|
6
|
-
A more detailed description of the library can be found in the [official documentation](https://scc-digitalhub.github.io/
|
|
6
|
+
A more detailed description of the library can be found in the [official documentation](https://scc-digitalhub.github.io/docs/) of Digitalhub.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
from digitalhub_core import (
|
|
2
|
+
delete_artifact,
|
|
3
|
+
delete_function,
|
|
4
|
+
delete_project,
|
|
5
|
+
delete_run,
|
|
6
|
+
delete_secret,
|
|
7
|
+
delete_task,
|
|
8
|
+
delete_workflow,
|
|
9
|
+
get_artifact,
|
|
10
|
+
get_artifact_versions,
|
|
11
|
+
get_function,
|
|
12
|
+
get_function_versions,
|
|
13
|
+
get_run,
|
|
14
|
+
get_secret,
|
|
15
|
+
get_secret_versions,
|
|
16
|
+
get_task,
|
|
17
|
+
get_workflow,
|
|
18
|
+
get_workflow_versions,
|
|
19
|
+
import_artifact,
|
|
20
|
+
import_function,
|
|
21
|
+
import_run,
|
|
22
|
+
import_secret,
|
|
23
|
+
import_task,
|
|
24
|
+
import_workflow,
|
|
25
|
+
list_artifacts,
|
|
26
|
+
list_functions,
|
|
27
|
+
list_runs,
|
|
28
|
+
list_secrets,
|
|
29
|
+
list_tasks,
|
|
30
|
+
list_workflows,
|
|
31
|
+
log_artifact,
|
|
32
|
+
new_artifact,
|
|
33
|
+
new_function,
|
|
34
|
+
new_run,
|
|
35
|
+
new_secret,
|
|
36
|
+
new_task,
|
|
37
|
+
new_workflow,
|
|
38
|
+
refresh_token,
|
|
39
|
+
set_dhcore_env,
|
|
40
|
+
set_store,
|
|
41
|
+
update_artifact,
|
|
42
|
+
update_function,
|
|
43
|
+
update_project,
|
|
44
|
+
update_run,
|
|
45
|
+
update_secret,
|
|
46
|
+
update_task,
|
|
47
|
+
update_workflow,
|
|
48
|
+
)
|
|
49
|
+
from digitalhub_core.registry.utils import register_layer_entities, register_runtimes_entities
|
|
50
|
+
|
|
51
|
+
_PROJECT_IMPORTED = False
|
|
52
|
+
|
|
53
|
+
if not _PROJECT_IMPORTED:
|
|
54
|
+
try:
|
|
55
|
+
from digitalhub_data import (
|
|
56
|
+
delete_dataitem,
|
|
57
|
+
get_dataitem,
|
|
58
|
+
get_dataitem_versions,
|
|
59
|
+
import_dataitem,
|
|
60
|
+
list_dataitems,
|
|
61
|
+
log_dataitem,
|
|
62
|
+
new_dataitem,
|
|
63
|
+
update_dataitem,
|
|
64
|
+
)
|
|
65
|
+
from digitalhub_ml import (
|
|
66
|
+
delete_model,
|
|
67
|
+
get_model,
|
|
68
|
+
get_model_versions,
|
|
69
|
+
get_or_create_project,
|
|
70
|
+
get_project,
|
|
71
|
+
import_model,
|
|
72
|
+
import_project,
|
|
73
|
+
list_models,
|
|
74
|
+
load_project,
|
|
75
|
+
log_model,
|
|
76
|
+
new_model,
|
|
77
|
+
new_project,
|
|
78
|
+
update_model,
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
_PROJECT_IMPORTED = True
|
|
82
|
+
except ImportError:
|
|
83
|
+
...
|
|
84
|
+
|
|
85
|
+
if not _PROJECT_IMPORTED:
|
|
86
|
+
try:
|
|
87
|
+
from digitalhub_data import (
|
|
88
|
+
delete_dataitem,
|
|
89
|
+
get_dataitem,
|
|
90
|
+
get_dataitem_versions,
|
|
91
|
+
get_or_create_project,
|
|
92
|
+
get_project,
|
|
93
|
+
import_dataitem,
|
|
94
|
+
import_project,
|
|
95
|
+
list_dataitems,
|
|
96
|
+
load_project,
|
|
97
|
+
log_dataitem,
|
|
98
|
+
new_dataitem,
|
|
99
|
+
new_project,
|
|
100
|
+
update_dataitem,
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
_PROJECT_IMPORTED = True
|
|
104
|
+
except ImportError:
|
|
105
|
+
...
|
|
106
|
+
|
|
107
|
+
if not _PROJECT_IMPORTED:
|
|
108
|
+
from digitalhub_core import get_or_create_project, get_project, import_project, load_project, new_project
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
# Register entities into registry
|
|
112
|
+
register_layer_entities()
|
|
113
|
+
register_runtimes_entities()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: digitalhub
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.0b0
|
|
4
4
|
Summary: Python SDK for Digitalhub
|
|
5
5
|
Author-email: Fondazione Bruno Kessler <dslab@fbk.eu>, Matteo Martini <mmartini@fbk.eu>
|
|
6
6
|
License: Apache License
|
|
@@ -229,38 +229,22 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
229
229
|
Requires-Python: >=3.9
|
|
230
230
|
Description-Content-Type: text/markdown
|
|
231
231
|
License-File: LICENSE.txt
|
|
232
|
-
Requires-Dist:
|
|
233
|
-
|
|
234
|
-
Requires-Dist:
|
|
235
|
-
Requires-Dist:
|
|
236
|
-
|
|
237
|
-
Requires-Dist:
|
|
238
|
-
|
|
239
|
-
Requires-Dist:
|
|
240
|
-
Requires-Dist: GitPython>=3
|
|
241
|
-
Requires-Dist: psycopg2-binary
|
|
242
|
-
Requires-Dist: python-slugify
|
|
232
|
+
Requires-Dist: digitalhub-core<0.9,>=0.8.0b
|
|
233
|
+
Provides-Extra: all
|
|
234
|
+
Requires-Dist: digitalhub-data<0.9,>=0.8.0b; extra == "all"
|
|
235
|
+
Requires-Dist: digitalhub-ml<0.9,>=0.8.0b; extra == "all"
|
|
236
|
+
Provides-Extra: ml
|
|
237
|
+
Requires-Dist: digitalhub-ml<0.9,>=0.8.0b; extra == "ml"
|
|
238
|
+
Provides-Extra: data
|
|
239
|
+
Requires-Dist: digitalhub-data<0.9,>=0.8.0b; extra == "data"
|
|
243
240
|
Provides-Extra: full
|
|
244
|
-
Requires-Dist:
|
|
245
|
-
Requires-Dist:
|
|
246
|
-
|
|
247
|
-
Requires-Dist: pandas<2.2,>=1.2; extra == "pandas"
|
|
248
|
-
Provides-Extra: mlflow
|
|
249
|
-
Requires-Dist: mlflow; extra == "mlflow"
|
|
250
|
-
Provides-Extra: dev
|
|
251
|
-
Requires-Dist: black; extra == "dev"
|
|
252
|
-
Requires-Dist: pytest; extra == "dev"
|
|
253
|
-
Requires-Dist: bumpver; extra == "dev"
|
|
254
|
-
Requires-Dist: ruff; extra == "dev"
|
|
255
|
-
Requires-Dist: moto; extra == "dev"
|
|
256
|
-
Provides-Extra: docs
|
|
257
|
-
Requires-Dist: Sphinx>=7; extra == "docs"
|
|
258
|
-
Requires-Dist: pydata-sphinx-theme>=0.15; extra == "docs"
|
|
259
|
-
Requires-Dist: numpydoc>=1.6; extra == "docs"
|
|
241
|
+
Requires-Dist: digitalhub-core[full]<0.9,>=0.8.0b; extra == "full"
|
|
242
|
+
Requires-Dist: digitalhub-data[pandas]<0.9,>=0.8.0b; extra == "full"
|
|
243
|
+
Requires-Dist: digitalhub-ml[mlflow]<0.9,>=0.8.0b; extra == "full"
|
|
260
244
|
|
|
261
245
|
# Digitalhub Library
|
|
262
246
|
|
|
263
247
|
The Digitalhub SDK library is used to manage entities and executions in Digitalhub from Python.
|
|
264
248
|
It comes with a suite of tools to help you manage your projects and executions. It exposes CRUD methods to create, read, update and delete entities, and objects methods to excute functions or workflows, collect or store execution results and data.
|
|
265
249
|
|
|
266
|
-
A more detailed description of the library can be found in the [official documentation](https://scc-digitalhub.github.io/
|
|
250
|
+
A more detailed description of the library can be found in the [official documentation](https://scc-digitalhub.github.io/docs/) of Digitalhub.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
LICENSE.txt
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
digitalhub/__init__.py
|
|
5
|
+
digitalhub.egg-info/PKG-INFO
|
|
6
|
+
digitalhub.egg-info/SOURCES.txt
|
|
7
|
+
digitalhub.egg-info/dependency_links.txt
|
|
8
|
+
digitalhub.egg-info/requires.txt
|
|
9
|
+
digitalhub.egg-info/top_level.txt
|
|
10
|
+
test/test_crud_artifacts.py
|
|
11
|
+
test/test_crud_dataitems.py
|
|
12
|
+
test/test_crud_functions.py
|
|
13
|
+
test/test_crud_runs.py
|
|
14
|
+
test/test_crud_tasks.py
|
|
15
|
+
test/test_imports.py
|
|
16
|
+
test/testkfp.py
|
|
17
|
+
test/testkfp_pipeline.py
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
digitalhub-core<0.9,>=0.8.0b
|
|
2
|
+
|
|
3
|
+
[all]
|
|
4
|
+
digitalhub-data<0.9,>=0.8.0b
|
|
5
|
+
digitalhub-ml<0.9,>=0.8.0b
|
|
6
|
+
|
|
7
|
+
[data]
|
|
8
|
+
digitalhub-data<0.9,>=0.8.0b
|
|
9
|
+
|
|
10
|
+
[full]
|
|
11
|
+
digitalhub-core[full]<0.9,>=0.8.0b
|
|
12
|
+
digitalhub-data[pandas]<0.9,>=0.8.0b
|
|
13
|
+
digitalhub-ml[mlflow]<0.9,>=0.8.0b
|
|
14
|
+
|
|
15
|
+
[ml]
|
|
16
|
+
digitalhub-ml<0.9,>=0.8.0b
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "digitalhub"
|
|
7
|
-
version = "0.8.
|
|
7
|
+
version = "0.8.0b0"
|
|
8
8
|
description = "Python SDK for Digitalhub"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [
|
|
@@ -21,48 +21,27 @@ classifiers = [
|
|
|
21
21
|
keywords = ["data", "dataops", "kubernetes"]
|
|
22
22
|
requires-python = ">=3.9"
|
|
23
23
|
dependencies = [
|
|
24
|
-
|
|
25
|
-
"pydantic<2",
|
|
26
|
-
"sqlalchemy<2",
|
|
27
|
-
"pyarrow",
|
|
28
|
-
"numpy<2",
|
|
29
|
-
"requests",
|
|
30
|
-
"PyYAML",
|
|
31
|
-
"python-dotenv",
|
|
32
|
-
"GitPython>=3",
|
|
33
|
-
"psycopg2-binary",
|
|
34
|
-
"python-slugify",
|
|
24
|
+
"digitalhub-core>=0.8.0b, <0.9",
|
|
35
25
|
]
|
|
36
26
|
|
|
37
27
|
[project.optional-dependencies]
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
]
|
|
42
|
-
pandas = [
|
|
43
|
-
"pandas>=1.2, <2.2",
|
|
44
|
-
]
|
|
45
|
-
mlflow = [
|
|
46
|
-
"mlflow",
|
|
28
|
+
all = [
|
|
29
|
+
"digitalhub-data>=0.8.0b, <0.9",
|
|
30
|
+
"digitalhub-ml>=0.8.0b, <0.9",
|
|
47
31
|
]
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
]
|
|
55
|
-
docs = [
|
|
56
|
-
"Sphinx>=7",
|
|
57
|
-
"pydata-sphinx-theme>=0.15",
|
|
58
|
-
"numpydoc>=1.6"
|
|
32
|
+
ml = ["digitalhub-ml>=0.8.0b, <0.9"]
|
|
33
|
+
data = ["digitalhub-data>=0.8.0b, <0.9"]
|
|
34
|
+
full = [
|
|
35
|
+
"digitalhub-core[full]>=0.8.0b, <0.9",
|
|
36
|
+
"digitalhub-data[pandas]>=0.8.0b, <0.9",
|
|
37
|
+
"digitalhub-ml[mlflow]>=0.8.0b, <0.9",
|
|
59
38
|
]
|
|
60
39
|
|
|
61
40
|
[project.urls]
|
|
62
41
|
Homepage = "https://github.com/scc-digitalhub/digitalhub-sdk"
|
|
63
42
|
|
|
64
43
|
[tool.setuptools.packages.find]
|
|
65
|
-
exclude = ["wrapper*", "runtimes*"]
|
|
44
|
+
exclude = ["ai*", "wrapper*", "ml*", "core*", "data*", "runtimes*"]
|
|
66
45
|
|
|
67
46
|
[tool.flake8]
|
|
68
47
|
max-line-length = 120
|
|
@@ -77,7 +56,7 @@ line-length = 120
|
|
|
77
56
|
convention = "numpy"
|
|
78
57
|
|
|
79
58
|
[tool.bumpver]
|
|
80
|
-
current_version = "0.8.
|
|
59
|
+
current_version = "0.8.0b0"
|
|
81
60
|
version_pattern = "MAJOR.MINOR.PATCH[PYTAGNUM]"
|
|
82
61
|
commit_message = "Bump version {old_version} -> {new_version}"
|
|
83
62
|
commit = false
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import shutil
|
|
2
|
+
from copy import deepcopy
|
|
3
|
+
|
|
4
|
+
import dotenv
|
|
5
|
+
from digitalhub_core.entities.artifact.entity._base import Artifact
|
|
6
|
+
|
|
7
|
+
import digitalhub as dh
|
|
8
|
+
|
|
9
|
+
dotenv.load_dotenv()
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def main():
|
|
13
|
+
ctx = "./test-prg"
|
|
14
|
+
names = ["test1", "test2", "test3", "test4"]
|
|
15
|
+
uuids = [
|
|
16
|
+
"d150bcca-bb64-451d-8455-dff862254b95",
|
|
17
|
+
"31acdd2d-0c41-428c-b68b-1b133da9e97b",
|
|
18
|
+
"b4a3dfdc-b917-44c4-9a29-613dcf734244",
|
|
19
|
+
"2618d9c4-cd61-440f-aebb-7e5761709f3b",
|
|
20
|
+
]
|
|
21
|
+
paths = ["./data/test.csv", "s3://bucket/key.csv", "sql://database/schema/table", "https://url.com/file.csv"]
|
|
22
|
+
kind = ["artifact", "artifact", "artifact", "artifact"]
|
|
23
|
+
|
|
24
|
+
dicts = []
|
|
25
|
+
for i in range(len(names)):
|
|
26
|
+
dicts.append({"name": names[i], "uuid": uuids[i], "path": paths[i], "kind": kind[i]})
|
|
27
|
+
|
|
28
|
+
dh.delete_project("test")
|
|
29
|
+
|
|
30
|
+
p = dh.get_or_create_project("test", context=ctx)
|
|
31
|
+
|
|
32
|
+
# Create and delete artifacts
|
|
33
|
+
for i in dicts:
|
|
34
|
+
d = dh.new_artifact(p.name, **i)
|
|
35
|
+
dh.delete_artifact(d.key)
|
|
36
|
+
d = dh.new_artifact(p.name, **i)
|
|
37
|
+
dh.delete_artifact(d.name, project=p.name, entity_id=d.id)
|
|
38
|
+
d = p.new_artifact(**i)
|
|
39
|
+
p.delete_artifact(d.key)
|
|
40
|
+
|
|
41
|
+
print("Done 1")
|
|
42
|
+
|
|
43
|
+
# Create multiple artifacts
|
|
44
|
+
for i in dicts:
|
|
45
|
+
dh.new_artifact(p.name, **i)
|
|
46
|
+
|
|
47
|
+
c = deepcopy(i)
|
|
48
|
+
c.pop("uuid")
|
|
49
|
+
dh.new_artifact(p.name, **c)
|
|
50
|
+
dh.new_artifact(p.name, **c)
|
|
51
|
+
dh.new_artifact(p.name, **c)
|
|
52
|
+
dh.new_artifact(p.name, **c)
|
|
53
|
+
|
|
54
|
+
# List artifacts
|
|
55
|
+
l_obj = dh.list_artifacts(p.name)
|
|
56
|
+
assert isinstance(l_obj, list)
|
|
57
|
+
assert len(l_obj) == 4
|
|
58
|
+
for i in l_obj:
|
|
59
|
+
assert isinstance(i, Artifact)
|
|
60
|
+
|
|
61
|
+
for a in l_obj:
|
|
62
|
+
dh.delete_artifact(a.key)
|
|
63
|
+
|
|
64
|
+
print("Done 2")
|
|
65
|
+
|
|
66
|
+
# Get artifacts test
|
|
67
|
+
for i in dicts:
|
|
68
|
+
o1 = dh.new_artifact(p.name, **i)
|
|
69
|
+
assert isinstance(o1, Artifact)
|
|
70
|
+
|
|
71
|
+
# Get by name and id
|
|
72
|
+
o2 = dh.get_artifact(o1.name, project=p.name, entity_id=o1.id)
|
|
73
|
+
assert isinstance(o2, Artifact)
|
|
74
|
+
assert o1.id == o2.id
|
|
75
|
+
|
|
76
|
+
# Get by key
|
|
77
|
+
o3 = dh.get_artifact(o1.key)
|
|
78
|
+
assert isinstance(o3, Artifact)
|
|
79
|
+
assert o1.id == o3.id
|
|
80
|
+
|
|
81
|
+
print("Done 3")
|
|
82
|
+
|
|
83
|
+
# Delete artifacts, all versions
|
|
84
|
+
for n in names:
|
|
85
|
+
dh.delete_artifact(n, project=p.name, delete_all_versions=True)
|
|
86
|
+
l_obj = dh.list_artifacts(p.name)
|
|
87
|
+
assert not l_obj
|
|
88
|
+
|
|
89
|
+
dh.delete_project("test")
|
|
90
|
+
shutil.rmtree(ctx)
|
|
91
|
+
|
|
92
|
+
print("Done 4")
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
if __name__ == "__main__":
|
|
96
|
+
main()
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import shutil
|
|
2
|
+
from copy import deepcopy
|
|
3
|
+
|
|
4
|
+
import dotenv
|
|
5
|
+
from digitalhub_data.entities.dataitem.entity._base import Dataitem
|
|
6
|
+
|
|
7
|
+
import digitalhub as dh
|
|
8
|
+
|
|
9
|
+
dotenv.load_dotenv()
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def main():
|
|
13
|
+
ctx = "./test-prg"
|
|
14
|
+
names = ["test1", "test2", "test3", "test4"]
|
|
15
|
+
uuids = [
|
|
16
|
+
"d150bcca-bb64-451d-8455-dff862254b95",
|
|
17
|
+
"31acdd2d-0c41-428c-b68b-1b133da9e97b",
|
|
18
|
+
"b4a3dfdc-b917-44c4-9a29-613dcf734244",
|
|
19
|
+
"2618d9c4-cd61-440f-aebb-7e5761709f3b",
|
|
20
|
+
]
|
|
21
|
+
paths = ["./data/test.csv", "s3://bucket/key.csv", "sql://database/schema/table", "https://url.com/file.csv"]
|
|
22
|
+
kind = ["dataitem", "dataitem", "dataitem", "dataitem"]
|
|
23
|
+
|
|
24
|
+
dicts = []
|
|
25
|
+
for i in range(len(names)):
|
|
26
|
+
dicts.append({"name": names[i], "uuid": uuids[i], "path": paths[i], "kind": kind[i]})
|
|
27
|
+
|
|
28
|
+
dh.delete_project("test")
|
|
29
|
+
|
|
30
|
+
p = dh.get_or_create_project("test", context=ctx)
|
|
31
|
+
|
|
32
|
+
# Create and delete dataitems
|
|
33
|
+
for i in dicts:
|
|
34
|
+
d = dh.new_dataitem(p.name, **i)
|
|
35
|
+
dh.delete_dataitem(d.key)
|
|
36
|
+
d = dh.new_dataitem(p.name, **i)
|
|
37
|
+
dh.delete_dataitem(d.name, project=p.name, entity_id=d.id)
|
|
38
|
+
d = p.new_dataitem(**i)
|
|
39
|
+
p.delete_dataitem(d.key)
|
|
40
|
+
|
|
41
|
+
print("Done 1")
|
|
42
|
+
|
|
43
|
+
# Create multiple dataitems
|
|
44
|
+
for i in dicts:
|
|
45
|
+
dh.new_dataitem(p.name, **i)
|
|
46
|
+
|
|
47
|
+
c = deepcopy(i)
|
|
48
|
+
c.pop("uuid")
|
|
49
|
+
dh.new_dataitem(p.name, **c)
|
|
50
|
+
dh.new_dataitem(p.name, **c)
|
|
51
|
+
dh.new_dataitem(p.name, **c)
|
|
52
|
+
dh.new_dataitem(p.name, **c)
|
|
53
|
+
|
|
54
|
+
# List dataitems
|
|
55
|
+
l_obj = dh.list_dataitems(p.name)
|
|
56
|
+
assert isinstance(l_obj, list)
|
|
57
|
+
assert len(l_obj) == 4
|
|
58
|
+
for i in l_obj:
|
|
59
|
+
assert isinstance(i, Dataitem)
|
|
60
|
+
|
|
61
|
+
for a in l_obj:
|
|
62
|
+
dh.delete_dataitem(a.key)
|
|
63
|
+
|
|
64
|
+
print("Done 2")
|
|
65
|
+
|
|
66
|
+
# Get dataitems test
|
|
67
|
+
for i in dicts:
|
|
68
|
+
o1 = dh.new_dataitem(p.name, **i)
|
|
69
|
+
assert isinstance(o1, Dataitem)
|
|
70
|
+
|
|
71
|
+
# Get by name and id
|
|
72
|
+
o2 = dh.get_dataitem(o1.name, project=p.name, entity_id=o1.id)
|
|
73
|
+
assert isinstance(o2, Dataitem)
|
|
74
|
+
assert o1.id == o2.id
|
|
75
|
+
|
|
76
|
+
# Get by key
|
|
77
|
+
o3 = dh.get_dataitem(o1.key)
|
|
78
|
+
assert isinstance(o3, Dataitem)
|
|
79
|
+
assert o1.id == o3.id
|
|
80
|
+
|
|
81
|
+
print("Done 3")
|
|
82
|
+
|
|
83
|
+
# Delete dataitems, all versions
|
|
84
|
+
for n in names:
|
|
85
|
+
dh.delete_dataitem(n, project=p.name, delete_all_versions=True)
|
|
86
|
+
l_obj = dh.list_dataitems(p.name)
|
|
87
|
+
assert not l_obj
|
|
88
|
+
|
|
89
|
+
dh.delete_project("test")
|
|
90
|
+
shutil.rmtree(ctx)
|
|
91
|
+
|
|
92
|
+
print("Done 4")
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
if __name__ == "__main__":
|
|
96
|
+
main()
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
from digitalhub.entities.artifact.crud import (
|
|
2
|
-
delete_artifact,
|
|
3
|
-
get_artifact,
|
|
4
|
-
get_artifact_versions,
|
|
5
|
-
import_artifact,
|
|
6
|
-
list_artifacts,
|
|
7
|
-
log_artifact,
|
|
8
|
-
new_artifact,
|
|
9
|
-
update_artifact,
|
|
10
|
-
)
|
|
11
|
-
from digitalhub.entities.dataitem.crud import (
|
|
12
|
-
delete_dataitem,
|
|
13
|
-
get_dataitem,
|
|
14
|
-
get_dataitem_versions,
|
|
15
|
-
import_dataitem,
|
|
16
|
-
list_dataitems,
|
|
17
|
-
log_dataitem,
|
|
18
|
-
new_dataitem,
|
|
19
|
-
update_dataitem,
|
|
20
|
-
)
|
|
21
|
-
from digitalhub.entities.function.crud import (
|
|
22
|
-
delete_function,
|
|
23
|
-
get_function,
|
|
24
|
-
get_function_versions,
|
|
25
|
-
import_function,
|
|
26
|
-
list_functions,
|
|
27
|
-
new_function,
|
|
28
|
-
update_function,
|
|
29
|
-
)
|
|
30
|
-
from digitalhub.entities.model.crud import (
|
|
31
|
-
delete_model,
|
|
32
|
-
get_model,
|
|
33
|
-
get_model_versions,
|
|
34
|
-
import_model,
|
|
35
|
-
list_models,
|
|
36
|
-
log_model,
|
|
37
|
-
new_model,
|
|
38
|
-
update_model,
|
|
39
|
-
)
|
|
40
|
-
from digitalhub.entities.project.crud import (
|
|
41
|
-
delete_project,
|
|
42
|
-
get_or_create_project,
|
|
43
|
-
get_project,
|
|
44
|
-
import_project,
|
|
45
|
-
load_project,
|
|
46
|
-
new_project,
|
|
47
|
-
update_project,
|
|
48
|
-
)
|
|
49
|
-
from digitalhub.entities.run.crud import delete_run, get_run, import_run, list_runs, new_run, update_run
|
|
50
|
-
from digitalhub.entities.secret.crud import (
|
|
51
|
-
delete_secret,
|
|
52
|
-
get_secret,
|
|
53
|
-
get_secret_versions,
|
|
54
|
-
import_secret,
|
|
55
|
-
list_secrets,
|
|
56
|
-
new_secret,
|
|
57
|
-
update_secret,
|
|
58
|
-
)
|
|
59
|
-
from digitalhub.entities.task.crud import delete_task, get_task, import_task, list_tasks, new_task, update_task
|
|
60
|
-
from digitalhub.entities.workflow.crud import (
|
|
61
|
-
delete_workflow,
|
|
62
|
-
get_workflow,
|
|
63
|
-
get_workflow_versions,
|
|
64
|
-
import_workflow,
|
|
65
|
-
list_workflows,
|
|
66
|
-
new_workflow,
|
|
67
|
-
update_workflow,
|
|
68
|
-
)
|
|
69
|
-
|
|
70
|
-
try:
|
|
71
|
-
from digitalhub.entities.model.mlflow.utils import from_mlflow_run
|
|
72
|
-
except ImportError:
|
|
73
|
-
...
|
|
74
|
-
|
|
75
|
-
from digitalhub.client.dhcore.utils import refresh_token, set_dhcore_env
|
|
76
|
-
|
|
77
|
-
# Register entities into registry
|
|
78
|
-
from digitalhub.factory.utils import register_entities, register_runtimes_entities
|
|
79
|
-
from digitalhub.stores.api import set_store
|
|
80
|
-
|
|
81
|
-
register_entities()
|
|
82
|
-
register_runtimes_entities()
|
|
File without changes
|
|
File without changes
|