oceanprotocol-job-details 0.0.2__py3-none-any.whl → 0.0.4__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.
- oceanprotocol_job_details/job_details.py +11 -3
- oceanprotocol_job_details/loaders/impl/environment.py +1 -1
- {oceanprotocol_job_details-0.0.2.dist-info → oceanprotocol_job_details-0.0.4.dist-info}/METADATA +3 -4
- oceanprotocol_job_details-0.0.4.dist-info/RECORD +13 -0
- oceanprotocol_job_details/dataclasses/__pycache__/__init__.cpython-313.pyc +0 -0
- oceanprotocol_job_details/dataclasses/__pycache__/__init__.cpython-39.pyc +0 -0
- oceanprotocol_job_details/dataclasses/__pycache__/constants.cpython-313.pyc +0 -0
- oceanprotocol_job_details/dataclasses/__pycache__/constants.cpython-39.pyc +0 -0
- oceanprotocol_job_details/dataclasses/__pycache__/job_details.cpython-313.pyc +0 -0
- oceanprotocol_job_details/dataclasses/__pycache__/job_details.cpython-39.pyc +0 -0
- oceanprotocol_job_details/loaders/__pycache__/__init__.cpython-313.pyc +0 -0
- oceanprotocol_job_details/loaders/__pycache__/__init__.cpython-39.pyc +0 -0
- oceanprotocol_job_details/loaders/__pycache__/loader.cpython-313.pyc +0 -0
- oceanprotocol_job_details/loaders/__pycache__/loader.cpython-39.pyc +0 -0
- oceanprotocol_job_details/loaders/impl/__pycache__/__init__.cpython-313.pyc +0 -0
- oceanprotocol_job_details/loaders/impl/__pycache__/__init__.cpython-39.pyc +0 -0
- oceanprotocol_job_details/loaders/impl/__pycache__/environment.cpython-313.pyc +0 -0
- oceanprotocol_job_details/loaders/impl/__pycache__/environment.cpython-39.pyc +0 -0
- oceanprotocol_job_details-0.0.2.dist-info/RECORD +0 -27
- {oceanprotocol_job_details-0.0.2.dist-info → oceanprotocol_job_details-0.0.4.dist-info}/LICENSE +0 -0
- {oceanprotocol_job_details-0.0.2.dist-info → oceanprotocol_job_details-0.0.4.dist-info}/WHEEL +0 -0
|
@@ -9,9 +9,17 @@ _Implementations = Literal["env"]
|
|
|
9
9
|
class OceanProtocolJobDetails(Loader[JobDetails]):
|
|
10
10
|
"""Decorator that loads the JobDetails from the given implementation"""
|
|
11
11
|
|
|
12
|
-
def __init__(
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
def __init__(
|
|
13
|
+
self,
|
|
14
|
+
implementation: Optional[_Implementations] = "env",
|
|
15
|
+
*args,
|
|
16
|
+
**kwargs,
|
|
17
|
+
):
|
|
18
|
+
if implementation == "env":
|
|
19
|
+
# As there are not more implementations, we can use the EnvironmentLoader directly
|
|
20
|
+
self._loader = lambda: EnvironmentLoader(*args, **kwargs)
|
|
21
|
+
else:
|
|
22
|
+
raise NotImplementedError(f"Implementation {implementation} not supported")
|
|
15
23
|
|
|
16
24
|
def load(self) -> JobDetails:
|
|
17
25
|
return self._loader().load()
|
|
@@ -51,7 +51,7 @@ class EnvironmentLoader(Loader[JobDetails]):
|
|
|
51
51
|
)
|
|
52
52
|
|
|
53
53
|
def _root(self) -> Path:
|
|
54
|
-
return Path(self.mapper.get(Keys.ROOT, ""))
|
|
54
|
+
return Path(self.mapper.get(Keys.ROOT, "/"))
|
|
55
55
|
|
|
56
56
|
def _dids(self) -> Sequence[str]:
|
|
57
57
|
return loads(self.mapper.get(Keys.DIDS)) if Keys.DIDS in self.mapper else []
|
{oceanprotocol_job_details-0.0.2.dist-info → oceanprotocol_job_details-0.0.4.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: oceanprotocol-job-details
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.4
|
|
4
4
|
Summary: A Python package to get details from OceanProtocol jobs
|
|
5
5
|
License: Copyright 2025 Agrospai
|
|
6
6
|
|
|
@@ -39,8 +39,6 @@ from oceanprotocol_job_details.job_details import OceanProtocolJobDetails
|
|
|
39
39
|
|
|
40
40
|
# Using default parameters
|
|
41
41
|
job_details = OceanProtocolJobDetails().load()
|
|
42
|
-
|
|
43
|
-
job_details
|
|
44
42
|
```
|
|
45
43
|
|
|
46
44
|
### Advanced Usage (not recommended)
|
|
@@ -49,7 +47,7 @@ If instead of the environment variables, we want to use another kind of mapping,
|
|
|
49
47
|
|
|
50
48
|
```Python
|
|
51
49
|
from oceanprotocol_job_details.job_details import OceanProtocolJobDetails
|
|
52
|
-
from
|
|
50
|
+
from oceanprotocol_job_details.loaders.impl.environment import Keys
|
|
53
51
|
|
|
54
52
|
# Fill in with values that will be used instead of env
|
|
55
53
|
custom_mapper = {
|
|
@@ -61,3 +59,4 @@ custom_mapper = {
|
|
|
61
59
|
|
|
62
60
|
job_details = OceanProtocolJobDetails(mapper=custom_mapper).load()
|
|
63
61
|
```
|
|
62
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
oceanprotocol_job_details/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
oceanprotocol_job_details/dataclasses/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
oceanprotocol_job_details/dataclasses/constants.py,sha256=CWkWtBgKjI8xyHPKIwJ2lStpyCTDnfnWXvcXlIFYWig,773
|
|
4
|
+
oceanprotocol_job_details/dataclasses/job_details.py,sha256=7y8LoiPmAPsS71HRzm6pWbB7TwV9qIwe1Cd2Dgd4liE,860
|
|
5
|
+
oceanprotocol_job_details/job_details.py,sha256=GfzHNAWpYC0SBHdB1O4im5MNfuxLyRn-dFrhhxo2Ogw,946
|
|
6
|
+
oceanprotocol_job_details/loaders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
+
oceanprotocol_job_details/loaders/impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
oceanprotocol_job_details/loaders/impl/environment.py,sha256=xY4yf10kDr4yraSFNlWge96yKO9-JJrlHnE2wVJNT4g,3030
|
|
9
|
+
oceanprotocol_job_details/loaders/loader.py,sha256=JwR6OSkzIQQkeeyAU-ad_F89W9WNvoRwvHQY7Q3zIXI,256
|
|
10
|
+
oceanprotocol_job_details-0.0.4.dist-info/LICENSE,sha256=ni3ix7P_GxK1W3VGC4fJ3o6QoCngCEpSuTJwO4nkpbw,1055
|
|
11
|
+
oceanprotocol_job_details-0.0.4.dist-info/METADATA,sha256=UavXniH6cCXEl3BQQnd4qEMuVLwT5HsvA9A-qs2FWoU,2793
|
|
12
|
+
oceanprotocol_job_details-0.0.4.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
|
13
|
+
oceanprotocol_job_details-0.0.4.dist-info/RECORD,,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
oceanprotocol_job_details/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
oceanprotocol_job_details/dataclasses/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
oceanprotocol_job_details/dataclasses/__pycache__/__init__.cpython-313.pyc,sha256=0ONMfxi9YdNbrlvd7HHyKh2D2cclkF8_sfHxnk4QPT4,210
|
|
4
|
-
oceanprotocol_job_details/dataclasses/__pycache__/__init__.cpython-39.pyc,sha256=MkCv5cAjpecyHxAMz5DHQAXrEfnkndNFVNGLB20iBDA,210
|
|
5
|
-
oceanprotocol_job_details/dataclasses/__pycache__/constants.cpython-313.pyc,sha256=_7cahtV77VBhIQRsHzVXEkdJy-hZcJfbx50EAvwhrB8,1886
|
|
6
|
-
oceanprotocol_job_details/dataclasses/__pycache__/constants.cpython-39.pyc,sha256=FGoRRGmALOKQnWO34lRxSudHkMPhYo2_XKZDeS0PwIA,1424
|
|
7
|
-
oceanprotocol_job_details/dataclasses/__pycache__/job_details.cpython-313.pyc,sha256=kUxopSviCQSMPQCP5YcApB9TXUwR6XN9BI9m3rE-UKo,1369
|
|
8
|
-
oceanprotocol_job_details/dataclasses/__pycache__/job_details.cpython-39.pyc,sha256=_uENugVUrWWBcjqeXKKCeT9uXz8Yd7Qg6ivag2DL87M,1038
|
|
9
|
-
oceanprotocol_job_details/dataclasses/constants.py,sha256=CWkWtBgKjI8xyHPKIwJ2lStpyCTDnfnWXvcXlIFYWig,773
|
|
10
|
-
oceanprotocol_job_details/dataclasses/job_details.py,sha256=7y8LoiPmAPsS71HRzm6pWbB7TwV9qIwe1Cd2Dgd4liE,860
|
|
11
|
-
oceanprotocol_job_details/job_details.py,sha256=9DHS2ffOC26q-TxB9M4EUVTdwbF5jozJ9V5MljXNEM0,753
|
|
12
|
-
oceanprotocol_job_details/loaders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
13
|
-
oceanprotocol_job_details/loaders/__pycache__/__init__.cpython-313.pyc,sha256=caqlfFNy8aRS-NJB1cTGZcxYpTtEN-jo3ko3URP0xnA,206
|
|
14
|
-
oceanprotocol_job_details/loaders/__pycache__/__init__.cpython-39.pyc,sha256=8FYNSbVtqAB4scwvaAMl93XuXNHn3I1j_60CdM-wKrY,206
|
|
15
|
-
oceanprotocol_job_details/loaders/__pycache__/loader.cpython-313.pyc,sha256=vHfalXDEN178-qFNfAqPhkFTSB8JhlBG_lRcpPbddUU,827
|
|
16
|
-
oceanprotocol_job_details/loaders/__pycache__/loader.cpython-39.pyc,sha256=hKNDCAWHospvkKWDlkknPc6MH4tkzTbx9-vpYhX83-s,689
|
|
17
|
-
oceanprotocol_job_details/loaders/impl/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
-
oceanprotocol_job_details/loaders/impl/__pycache__/__init__.cpython-313.pyc,sha256=SfhHqoTLJUeOLvPm9_x4niYNVumJaP4L4ilj8GNLbR0,211
|
|
19
|
-
oceanprotocol_job_details/loaders/impl/__pycache__/__init__.cpython-39.pyc,sha256=RljrmsqcD5Ai1gkv0fjihE7GgTJfvugoIqyvnUBQ8r4,211
|
|
20
|
-
oceanprotocol_job_details/loaders/impl/__pycache__/environment.cpython-313.pyc,sha256=hWSoqiSjFPAPuPZTiagjcHQpKDvHJU0feETedMVXenM,5628
|
|
21
|
-
oceanprotocol_job_details/loaders/impl/__pycache__/environment.cpython-39.pyc,sha256=wDccIcI5AB2uBrKifVKI_MLa-bu1RDIYqICpxbMckSU,3808
|
|
22
|
-
oceanprotocol_job_details/loaders/impl/environment.py,sha256=YrJwDsmHzYqd6RgNy-BwtrbdioO_1geUmigGkqbztM8,3029
|
|
23
|
-
oceanprotocol_job_details/loaders/loader.py,sha256=JwR6OSkzIQQkeeyAU-ad_F89W9WNvoRwvHQY7Q3zIXI,256
|
|
24
|
-
oceanprotocol_job_details-0.0.2.dist-info/LICENSE,sha256=ni3ix7P_GxK1W3VGC4fJ3o6QoCngCEpSuTJwO4nkpbw,1055
|
|
25
|
-
oceanprotocol_job_details-0.0.2.dist-info/METADATA,sha256=abdDKU9LJIVynDY9ILeGlFMLlOrJyinllxfdMLQwjSA,2809
|
|
26
|
-
oceanprotocol_job_details-0.0.2.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
|
|
27
|
-
oceanprotocol_job_details-0.0.2.dist-info/RECORD,,
|
{oceanprotocol_job_details-0.0.2.dist-info → oceanprotocol_job_details-0.0.4.dist-info}/LICENSE
RENAMED
|
File without changes
|
{oceanprotocol_job_details-0.0.2.dist-info → oceanprotocol_job_details-0.0.4.dist-info}/WHEEL
RENAMED
|
File without changes
|