digitalhub 0.12.0__py3-none-any.whl → 0.13.0b0__py3-none-any.whl
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/__init__.py +1 -1
- digitalhub/entities/_base/executable/entity.py +7 -0
- digitalhub/entities/_base/material/entity.py +8 -15
- digitalhub/entities/_base/material/utils.py +1 -1
- digitalhub/entities/_processors/context.py +1 -1
- digitalhub/stores/client/dhcore/client.py +56 -19
- digitalhub/stores/client/dhcore/configurator.py +278 -183
- digitalhub/stores/client/dhcore/enums.py +2 -0
- digitalhub/stores/client/dhcore/utils.py +8 -8
- digitalhub/stores/{configurator → credentials}/api.py +3 -3
- digitalhub/stores/credentials/configurator.py +37 -0
- digitalhub/stores/credentials/enums.py +54 -0
- digitalhub/stores/{configurator/configurator.py → credentials/handler.py} +23 -77
- digitalhub/stores/{configurator → credentials}/ini_module.py +1 -1
- digitalhub/stores/credentials/store.py +49 -0
- digitalhub/stores/data/_base/store.py +19 -6
- digitalhub/stores/data/api.py +37 -1
- digitalhub/stores/data/builder.py +46 -53
- digitalhub/stores/data/local/store.py +4 -7
- digitalhub/stores/data/remote/store.py +4 -7
- digitalhub/stores/data/s3/configurator.py +36 -92
- digitalhub/stores/data/s3/store.py +42 -57
- digitalhub/stores/data/s3/utils.py +1 -1
- digitalhub/stores/data/sql/configurator.py +35 -83
- digitalhub/stores/data/sql/store.py +15 -15
- {digitalhub-0.12.0.dist-info → digitalhub-0.13.0b0.dist-info}/METADATA +1 -1
- {digitalhub-0.12.0.dist-info → digitalhub-0.13.0b0.dist-info}/RECORD +31 -33
- digitalhub/stores/configurator/credentials_store.py +0 -69
- digitalhub/stores/configurator/enums.py +0 -25
- digitalhub/stores/data/s3/enums.py +0 -20
- digitalhub/stores/data/sql/enums.py +0 -20
- digitalhub/stores/data/utils.py +0 -38
- /digitalhub/stores/{configurator → credentials}/__init__.py +0 -0
- {digitalhub-0.12.0.dist-info → digitalhub-0.13.0b0.dist-info}/WHEEL +0 -0
- {digitalhub-0.12.0.dist-info → digitalhub-0.13.0b0.dist-info}/licenses/AUTHORS +0 -0
- {digitalhub-0.12.0.dist-info → digitalhub-0.13.0b0.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
digitalhub/__init__.py,sha256=
|
|
1
|
+
digitalhub/__init__.py,sha256=1LxeO1lKnjt_TR5KaBhvNW7A6ddyHcMU79IrAwUNnPM,2564
|
|
2
2
|
digitalhub/context/api.py,sha256=A7h-IOZwjRbnGB9Sf7OFTwRwjP6ui5qyUh9LMicNlvk,1484
|
|
3
3
|
digitalhub/context/builder.py,sha256=RuDhIFncesERKBvQ5FQu2EXIasieSk2Mr5Schkc0lyA,2844
|
|
4
4
|
digitalhub/context/context.py,sha256=0DpTZqlTCoHXqxbvSIithSe2fJMHGU48_MICkfWpYXQ,2153
|
|
@@ -22,12 +22,12 @@ digitalhub/entities/_base/entity/_constructors/spec.py,sha256=vtCcVTYu8Rg6KRvr5a
|
|
|
22
22
|
digitalhub/entities/_base/entity/_constructors/status.py,sha256=PrnouXDllZxS7t6pzbMohTov8QTne0cx3WVE37JGoSw,1298
|
|
23
23
|
digitalhub/entities/_base/entity/_constructors/uuid.py,sha256=7QhQ9epJAnYLCKUPY6AMXOe72nPT8xZRnNM98p_vTnM,663
|
|
24
24
|
digitalhub/entities/_base/executable/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
25
|
-
digitalhub/entities/_base/executable/entity.py,sha256=
|
|
25
|
+
digitalhub/entities/_base/executable/entity.py,sha256=UYIH0qQgiQ0I0nOfBha90llMYQRVZ2zywj8DF6tiB-A,11852
|
|
26
26
|
digitalhub/entities/_base/material/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
27
|
-
digitalhub/entities/_base/material/entity.py,sha256=
|
|
27
|
+
digitalhub/entities/_base/material/entity.py,sha256=l7b3dm4kYzbcIwjrR5en0ef8I3_pmanmN4U3BkfnqOE,6801
|
|
28
28
|
digitalhub/entities/_base/material/spec.py,sha256=7lF_Pv7zGJUAR2ixmmCt-UPnoASgOLxnb9yffqwBVp8,544
|
|
29
29
|
digitalhub/entities/_base/material/status.py,sha256=vAIb5qti5KxdIPdB9WYmWrCnqwGyUxuF6CpGSpcWxbE,520
|
|
30
|
-
digitalhub/entities/_base/material/utils.py,sha256=
|
|
30
|
+
digitalhub/entities/_base/material/utils.py,sha256=diFtnOjCumenzOL1Su0ROA3KdrIJlRq5Jh845axvAtU,2512
|
|
31
31
|
digitalhub/entities/_base/runtime_entity/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
32
32
|
digitalhub/entities/_base/runtime_entity/builder.py,sha256=VvhNKHeMj434q-bMQsoBN_abz2igvQAqIFYQ-abzX8c,2522
|
|
33
33
|
digitalhub/entities/_base/unversioned/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
@@ -43,7 +43,7 @@ digitalhub/entities/_commons/types.py,sha256=YvHDcgssDdfAvLHI3mXnXvvK6O_CwA1-o4w
|
|
|
43
43
|
digitalhub/entities/_commons/utils.py,sha256=6iBhKLnoGVsgEbMWlOZJfi2K7FmyRKzvYoSZIswSzpc,1954
|
|
44
44
|
digitalhub/entities/_processors/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
45
45
|
digitalhub/entities/_processors/base.py,sha256=HGWBdZCBHa2rP2cg5WsvtwBjWf4dDo6HBhCRmzFc54Y,13548
|
|
46
|
-
digitalhub/entities/_processors/context.py,sha256=
|
|
46
|
+
digitalhub/entities/_processors/context.py,sha256=6oESuehk7Ffn8Nf8HA7dPzpLv_vYs9GwGPJ_8jLli-M,34684
|
|
47
47
|
digitalhub/entities/_processors/utils.py,sha256=sWWDbKO-UlR0V9n89fq2ixAaor8NvRhsgwrXuPklhqM,3899
|
|
48
48
|
digitalhub/entities/artifact/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
49
49
|
digitalhub/entities/artifact/crud.py,sha256=POGZNEGsxKvo9QcHa1uwsvokDuRhDKItqqIfsWCoy6w,8091
|
|
@@ -194,46 +194,44 @@ digitalhub/stores/client/_base/key_builder.py,sha256=AxKZfF282phwA6fpBw8ykL5HfKM
|
|
|
194
194
|
digitalhub/stores/client/_base/params_builder.py,sha256=FW4EV3argXAZvR83pWjWH1Wr-aCcqiEv4HeTmph1NBE,535
|
|
195
195
|
digitalhub/stores/client/dhcore/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
196
196
|
digitalhub/stores/client/dhcore/api_builder.py,sha256=VOreSbN0kptqjL38HsozLs6kXbo9IlRBNjuEiGNAEVA,4083
|
|
197
|
-
digitalhub/stores/client/dhcore/client.py,sha256=
|
|
198
|
-
digitalhub/stores/client/dhcore/configurator.py,sha256=
|
|
199
|
-
digitalhub/stores/client/dhcore/enums.py,sha256=
|
|
197
|
+
digitalhub/stores/client/dhcore/client.py,sha256=Xw2jS0TL9GF3-xTpkieXpEDqhkVrFNQyiR2bFi4AFMc,11076
|
|
198
|
+
digitalhub/stores/client/dhcore/configurator.py,sha256=A5uUDR4LJM-X-f8dJfijMBQc62rglf4lYmoGYOzPYXY,15935
|
|
199
|
+
digitalhub/stores/client/dhcore/enums.py,sha256=ds-9eMQWrnQfyHgzaJ-GDK21zpOuuEGHvcsZ_WcHXq0,716
|
|
200
200
|
digitalhub/stores/client/dhcore/error_parser.py,sha256=8Kq16vVhWOQlfHhCzJbSyFHQ5_xgtnyUcf4NjExW11M,3413
|
|
201
201
|
digitalhub/stores/client/dhcore/key_builder.py,sha256=wD8kB0LHOvf669pzF8D6ksZ3GJfWmbDYDFbGs3TnaPo,1432
|
|
202
202
|
digitalhub/stores/client/dhcore/models.py,sha256=YPBG7ySfNBPKQtvgNVe2FRSVNxvZf_dCDhfQh7WkDro,750
|
|
203
203
|
digitalhub/stores/client/dhcore/params_builder.py,sha256=qtXpk-mYwcZ5YUBVXgh-g1WZaxImtR0rbPz0yp0d4zw,5955
|
|
204
|
-
digitalhub/stores/client/dhcore/utils.py,sha256=
|
|
204
|
+
digitalhub/stores/client/dhcore/utils.py,sha256=RsuVLlBj2mr6WsF1ZGwaE055b5biH--5bF99GMsYtdQ,2084
|
|
205
205
|
digitalhub/stores/client/local/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
206
206
|
digitalhub/stores/client/local/api_builder.py,sha256=4gT8P5cV-ngfWWn-KHmxef4dWInJ3Ru5mJ-DGodGSIQ,3151
|
|
207
207
|
digitalhub/stores/client/local/client.py,sha256=qAwJjZOA0Vr5NG9VC5kxjuOdPdO29wUGJ53yDEto9Hs,18223
|
|
208
208
|
digitalhub/stores/client/local/enums.py,sha256=J4xf23H2AO8OKYPim2XO143A7j_X6dqfPSm03Sbi0AI,258
|
|
209
209
|
digitalhub/stores/client/local/key_builder.py,sha256=ijISHvPcMyx591gHlSP1IZdiRrFi0oVh8AqaWe1L_g0,1431
|
|
210
210
|
digitalhub/stores/client/local/params_builder.py,sha256=_hR4bwn0bpGc74iKb3PM3WUJ6s3GAgsc1zcXoWjy560,3589
|
|
211
|
-
digitalhub/stores/
|
|
212
|
-
digitalhub/stores/
|
|
213
|
-
digitalhub/stores/
|
|
214
|
-
digitalhub/stores/
|
|
215
|
-
digitalhub/stores/
|
|
216
|
-
digitalhub/stores/
|
|
211
|
+
digitalhub/stores/credentials/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
212
|
+
digitalhub/stores/credentials/api.py,sha256=hSWAC3d2xwD7pqIv9PSD4JTncc1NQvuoai7-y6P3EeQ,665
|
|
213
|
+
digitalhub/stores/credentials/configurator.py,sha256=9ifahDHPsCEPS3EMXlI4BHCb99gec35v0NorY-leYnY,1002
|
|
214
|
+
digitalhub/stores/credentials/enums.py,sha256=xnrXo0Du1V8CQKJO-Aly3wqgpIqwTOBBBJdsgXhRYoc,1295
|
|
215
|
+
digitalhub/stores/credentials/handler.py,sha256=Pss2hecTkj3AQcPouE62HhEHqyIhNhyPCAo7FbgDnwI,3481
|
|
216
|
+
digitalhub/stores/credentials/ini_module.py,sha256=DtvrFEhgM4MfyOwsdwJhtgPvsxf5MEqd2LmGbN0fgTg,3036
|
|
217
|
+
digitalhub/stores/credentials/store.py,sha256=trM4xTo3EoOtnCyYy7EB6rT-sus6OEB1iQ6ZYSzeYFc,1337
|
|
217
218
|
digitalhub/stores/data/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
218
|
-
digitalhub/stores/data/api.py,sha256=
|
|
219
|
-
digitalhub/stores/data/builder.py,sha256=
|
|
219
|
+
digitalhub/stores/data/api.py,sha256=DSOmkqLxB5wT_k44nVE5tQQbUcF3kjAQEHx9zz1eGqc,1663
|
|
220
|
+
digitalhub/stores/data/builder.py,sha256=gB6hel573zI3qrbOiTGP2ILco21kEAavf6HgU6ohBt4,2942
|
|
220
221
|
digitalhub/stores/data/enums.py,sha256=8pO_tUZmKB4BpjW29lQN9rLGPOrJoqDVYJYzzxeDXW4,305
|
|
221
|
-
digitalhub/stores/data/utils.py,sha256=rv8hMYeZrWUi7GLWZg6DbWvc4WYFwo4C7ZD94Odv-G4,1059
|
|
222
222
|
digitalhub/stores/data/_base/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
223
|
-
digitalhub/stores/data/_base/store.py,sha256=
|
|
223
|
+
digitalhub/stores/data/_base/store.py,sha256=2oDX2KqvSSvjP-BBRpP5jIrYMqXe5-jtHsTQ3eXYBrg,5605
|
|
224
224
|
digitalhub/stores/data/local/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
225
|
-
digitalhub/stores/data/local/store.py,sha256=
|
|
225
|
+
digitalhub/stores/data/local/store.py,sha256=_XuIp3HpEa7hxxMfQhK05EscPA_RBiQyb61U464kflo,7368
|
|
226
226
|
digitalhub/stores/data/remote/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
227
|
-
digitalhub/stores/data/remote/store.py,sha256=
|
|
227
|
+
digitalhub/stores/data/remote/store.py,sha256=DTrBW62zc1ix7UbLnY6YeqN0_8kGeUH_h9k7Br2HY3k,6130
|
|
228
228
|
digitalhub/stores/data/s3/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
229
|
-
digitalhub/stores/data/s3/configurator.py,sha256=
|
|
230
|
-
digitalhub/stores/data/s3/
|
|
231
|
-
digitalhub/stores/data/s3/
|
|
232
|
-
digitalhub/stores/data/s3/utils.py,sha256=MkOgZFUh9iYdRvO8DgdS8tsjjHbk7diJpyLGFo63ro8,1758
|
|
229
|
+
digitalhub/stores/data/s3/configurator.py,sha256=GBmy96tJyreo37mg9M764ZRXubFF22zPjL5T_Z0GyVU,2372
|
|
230
|
+
digitalhub/stores/data/s3/store.py,sha256=ofzv2-HmOe0VJl75DGdJ1WIbI8L0EIKKUSVTzbRHrwk,19406
|
|
231
|
+
digitalhub/stores/data/s3/utils.py,sha256=fHR6_6PG8vs4jlFtGnsGzuz1J_CRPgElA5U36tUnFqs,1757
|
|
233
232
|
digitalhub/stores/data/sql/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
234
|
-
digitalhub/stores/data/sql/configurator.py,sha256=
|
|
235
|
-
digitalhub/stores/data/sql/
|
|
236
|
-
digitalhub/stores/data/sql/store.py,sha256=5CyPoVn45FQePF77moZy4VYaMPsz97xVMiSG3xsHxYg,11809
|
|
233
|
+
digitalhub/stores/data/sql/configurator.py,sha256=L2KwlD_LR4UTLwTCohUDo-UYA7ojvuuTMFSCmeKcyDU,2100
|
|
234
|
+
digitalhub/stores/data/sql/store.py,sha256=Ro8WdbJx_C7cvPIqi3N56SNMzpIuDpq4KXI-yCYOqRA,11883
|
|
237
235
|
digitalhub/stores/readers/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
238
236
|
digitalhub/stores/readers/data/__init__.py,sha256=IRY2i9U97wptE3OcC_NO-EBmcAH6-Q36gMCspKetQ0k,107
|
|
239
237
|
digitalhub/stores/readers/data/api.py,sha256=jn2AwCcTRbAOeAhs-3D1OpjhvFf8y537upvzVAgHxl4,1966
|
|
@@ -255,8 +253,8 @@ digitalhub/utils/io_utils.py,sha256=21E3x9bDbafqfc_Vt4ZVwsIlEsFsr_EzbuIoARvRMHg,
|
|
|
255
253
|
digitalhub/utils/logger.py,sha256=hH3gGE35L8jRxrg8EPXGZZAK1OA5-CvWnayuBZzteBM,545
|
|
256
254
|
digitalhub/utils/types.py,sha256=orCxY43zXMJfKZsOj6FUR85u9wRBPJ0wdkzrBHTnVW8,217
|
|
257
255
|
digitalhub/utils/uri_utils.py,sha256=7S2Xld-SsYBK_ZWhWUNKSzvukvtbbjKOu5mK1w2UMZE,4129
|
|
258
|
-
digitalhub-0.
|
|
259
|
-
digitalhub-0.
|
|
260
|
-
digitalhub-0.
|
|
261
|
-
digitalhub-0.
|
|
262
|
-
digitalhub-0.
|
|
256
|
+
digitalhub-0.13.0b0.dist-info/METADATA,sha256=TBA1Lj90HRbcxsp_Ntquw8pHEe0g_WlLtR4PYZ_TcVo,18028
|
|
257
|
+
digitalhub-0.13.0b0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
258
|
+
digitalhub-0.13.0b0.dist-info/licenses/AUTHORS,sha256=iDleK_2EAMmh0o8Te_E9mdXQCP4rBfFr9dW9d0-pCno,301
|
|
259
|
+
digitalhub-0.13.0b0.dist-info/licenses/LICENSE,sha256=z3xQCHfGmTnigfoUe3uidW_GUSVeFBdos30w9VNTRec,11361
|
|
260
|
+
digitalhub-0.13.0b0.dist-info/RECORD,,
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
|
|
2
|
-
#
|
|
3
|
-
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
|
|
5
|
-
from __future__ import annotations
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class CredentialsStore:
|
|
9
|
-
"""
|
|
10
|
-
Credentials store to store and retrieve credentials.
|
|
11
|
-
"""
|
|
12
|
-
|
|
13
|
-
def __init__(self) -> None:
|
|
14
|
-
self._credentials: dict[str, dict] = {}
|
|
15
|
-
|
|
16
|
-
def set(self, profile: str, key: str, value: str) -> None:
|
|
17
|
-
"""
|
|
18
|
-
Set credentials.
|
|
19
|
-
|
|
20
|
-
Parameters
|
|
21
|
-
----------
|
|
22
|
-
profile : str
|
|
23
|
-
The profile of the credentials.
|
|
24
|
-
key : str
|
|
25
|
-
The key of the credentials.
|
|
26
|
-
value : str
|
|
27
|
-
The value of the credentials.
|
|
28
|
-
|
|
29
|
-
Returns
|
|
30
|
-
-------
|
|
31
|
-
None
|
|
32
|
-
"""
|
|
33
|
-
if profile not in self._credentials:
|
|
34
|
-
self._credentials[profile] = {}
|
|
35
|
-
self._credentials[profile][key] = value
|
|
36
|
-
|
|
37
|
-
def get(self, profile: str, key: str) -> str | None:
|
|
38
|
-
"""
|
|
39
|
-
Get credentials.
|
|
40
|
-
|
|
41
|
-
Parameters
|
|
42
|
-
----------
|
|
43
|
-
profile : str
|
|
44
|
-
The profile of the credentials.
|
|
45
|
-
key : str
|
|
46
|
-
The key of the credentials.
|
|
47
|
-
|
|
48
|
-
Returns
|
|
49
|
-
-------
|
|
50
|
-
str | None
|
|
51
|
-
The value of the credentials.
|
|
52
|
-
"""
|
|
53
|
-
return self._credentials.get(profile, {}).get(key)
|
|
54
|
-
|
|
55
|
-
def get_all(self, profile: str) -> dict[str, str]:
|
|
56
|
-
"""
|
|
57
|
-
Get all credentials.
|
|
58
|
-
|
|
59
|
-
Parameters
|
|
60
|
-
----------
|
|
61
|
-
profile : str
|
|
62
|
-
The profile of the credentials.
|
|
63
|
-
|
|
64
|
-
Returns
|
|
65
|
-
-------
|
|
66
|
-
dict[str, str]
|
|
67
|
-
The credentials.
|
|
68
|
-
"""
|
|
69
|
-
return self._credentials.get(profile, {})
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
|
|
2
|
-
#
|
|
3
|
-
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
|
|
5
|
-
from __future__ import annotations
|
|
6
|
-
|
|
7
|
-
from enum import Enum
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class CredsOrigin(Enum):
|
|
11
|
-
"""
|
|
12
|
-
List credential origins.
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
ENV = "env"
|
|
16
|
-
FILE = "file"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class SetCreds(Enum):
|
|
20
|
-
"""
|
|
21
|
-
List supported environments.
|
|
22
|
-
"""
|
|
23
|
-
|
|
24
|
-
DEFAULT = "__default"
|
|
25
|
-
DH_ENV = "DH_NAME"
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
|
|
2
|
-
#
|
|
3
|
-
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
|
|
5
|
-
from __future__ import annotations
|
|
6
|
-
|
|
7
|
-
from enum import Enum
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class S3StoreEnv(Enum):
|
|
11
|
-
"""
|
|
12
|
-
S3Store environment
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
ENDPOINT_URL = "AWS_ENDPOINT_URL"
|
|
16
|
-
ACCESS_KEY_ID = "AWS_ACCESS_KEY_ID"
|
|
17
|
-
SECRET_ACCESS_KEY = "AWS_SECRET_ACCESS_KEY"
|
|
18
|
-
SESSION_TOKEN = "AWS_SESSION_TOKEN"
|
|
19
|
-
REGION = "AWS_REGION"
|
|
20
|
-
SIGNATURE_VERSION = "S3_SIGNATURE_VERSION"
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
|
|
2
|
-
#
|
|
3
|
-
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
|
|
5
|
-
from __future__ import annotations
|
|
6
|
-
|
|
7
|
-
from enum import Enum
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class SqlStoreEnv(Enum):
|
|
11
|
-
"""
|
|
12
|
-
SqlStore environment
|
|
13
|
-
"""
|
|
14
|
-
|
|
15
|
-
HOST = "DB_HOST"
|
|
16
|
-
PORT = "DB_PORT"
|
|
17
|
-
USERNAME = "DB_USERNAME"
|
|
18
|
-
PASSWORD = "DB_PASSWORD"
|
|
19
|
-
DATABASE = "DB_DATABASE"
|
|
20
|
-
PG_SCHEMA = "DB_SCHEMA"
|
digitalhub/stores/data/utils.py
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: © 2025 DSLab - Fondazione Bruno Kessler
|
|
2
|
-
#
|
|
3
|
-
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
|
|
5
|
-
from __future__ import annotations
|
|
6
|
-
|
|
7
|
-
from digitalhub.context.api import get_context
|
|
8
|
-
from digitalhub.stores.configurator.configurator import configurator
|
|
9
|
-
from digitalhub.stores.data.enums import StoreEnv
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def get_default_store(project: str) -> str:
|
|
13
|
-
"""
|
|
14
|
-
Get default store URI.
|
|
15
|
-
|
|
16
|
-
Parameters
|
|
17
|
-
----------
|
|
18
|
-
project : str
|
|
19
|
-
Project name.
|
|
20
|
-
|
|
21
|
-
Returns
|
|
22
|
-
-------
|
|
23
|
-
str
|
|
24
|
-
Default store URI.
|
|
25
|
-
"""
|
|
26
|
-
context = get_context(project)
|
|
27
|
-
store = context.config.get(StoreEnv.DEFAULT_FILES_STORE.value.lower())
|
|
28
|
-
if store is not None:
|
|
29
|
-
return store
|
|
30
|
-
store = configurator.load_var(StoreEnv.DEFAULT_FILES_STORE.value)
|
|
31
|
-
if store is None or store == "":
|
|
32
|
-
raise ValueError(
|
|
33
|
-
"No default store found. "
|
|
34
|
-
"Please set a default store "
|
|
35
|
-
f"in your environment (e.g. export {StoreEnv.DEFAULT_FILES_STORE.value}=) "
|
|
36
|
-
"or set it in project config."
|
|
37
|
-
)
|
|
38
|
-
return store
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|