oceanprotocol-job-details 0.2.4__tar.gz → 0.2.5__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.
- {oceanprotocol_job_details-0.2.4 → oceanprotocol_job_details-0.2.5}/PKG-INFO +1 -1
- {oceanprotocol_job_details-0.2.4 → oceanprotocol_job_details-0.2.5}/oceanprotocol_job_details/ocean.py +16 -1
- {oceanprotocol_job_details-0.2.4 → oceanprotocol_job_details-0.2.5}/pyproject.toml +1 -1
- {oceanprotocol_job_details-0.2.4 → oceanprotocol_job_details-0.2.5}/.gitignore +0 -0
- {oceanprotocol_job_details-0.2.4 → oceanprotocol_job_details-0.2.5}/LICENSE +0 -0
- {oceanprotocol_job_details-0.2.4 → oceanprotocol_job_details-0.2.5}/README.md +0 -0
- {oceanprotocol_job_details-0.2.4 → oceanprotocol_job_details-0.2.5}/oceanprotocol_job_details/__init__.py +0 -0
- {oceanprotocol_job_details-0.2.4 → oceanprotocol_job_details-0.2.5}/oceanprotocol_job_details/di.py +0 -0
- {oceanprotocol_job_details-0.2.4 → oceanprotocol_job_details-0.2.5}/oceanprotocol_job_details/loaders/__init__.py +0 -0
- {oceanprotocol_job_details-0.2.4 → oceanprotocol_job_details-0.2.5}/oceanprotocol_job_details/loaders/impl/__init__.py +0 -0
- {oceanprotocol_job_details-0.2.4 → oceanprotocol_job_details-0.2.5}/oceanprotocol_job_details/loaders/impl/ddo.py +0 -0
- {oceanprotocol_job_details-0.2.4 → oceanprotocol_job_details-0.2.5}/oceanprotocol_job_details/loaders/impl/files.py +0 -0
- {oceanprotocol_job_details-0.2.4 → oceanprotocol_job_details-0.2.5}/oceanprotocol_job_details/loaders/impl/job_details.py +0 -0
- {oceanprotocol_job_details-0.2.4 → oceanprotocol_job_details-0.2.5}/oceanprotocol_job_details/loaders/loader.py +0 -0
- {oceanprotocol_job_details-0.2.4 → oceanprotocol_job_details-0.2.5}/oceanprotocol_job_details/paths.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: oceanprotocol-job-details
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.5
|
|
4
4
|
Summary: A Python package to get details from OceanProtocol jobs
|
|
5
5
|
Project-URL: Homepage, https://github.com/AgrospAI/oceanprotocol-job-details
|
|
6
6
|
Project-URL: Issues, https://github.com/AgrospAI/oceanprotocol-job-details/issues
|
|
@@ -5,7 +5,17 @@ import os
|
|
|
5
5
|
from dataclasses import dataclass, field
|
|
6
6
|
from functools import cached_property
|
|
7
7
|
from pathlib import Path
|
|
8
|
-
from typing import
|
|
8
|
+
from typing import (
|
|
9
|
+
Any,
|
|
10
|
+
Generator,
|
|
11
|
+
Generic,
|
|
12
|
+
Iterator,
|
|
13
|
+
Optional,
|
|
14
|
+
Sequence,
|
|
15
|
+
Type,
|
|
16
|
+
TypeVar,
|
|
17
|
+
final,
|
|
18
|
+
)
|
|
9
19
|
|
|
10
20
|
import orjson
|
|
11
21
|
from dataclasses_json import config as dc_config
|
|
@@ -244,6 +254,11 @@ class JobDetails(Generic[T]):
|
|
|
244
254
|
if not hasattr(self._type, "__dataclass_fields__"):
|
|
245
255
|
raise TypeError(f"{self._type} is not a dataclass type")
|
|
246
256
|
|
|
257
|
+
def next_path(self) -> Generator[tuple[int, Path], None, None]:
|
|
258
|
+
for idx, did_files in enumerate(self.files):
|
|
259
|
+
for file in did_files.input_files:
|
|
260
|
+
yield (idx, file)
|
|
261
|
+
|
|
247
262
|
@cached_property
|
|
248
263
|
def input_parameters(self) -> T:
|
|
249
264
|
"""Read the input parameters and return them in an instance of the dataclass T"""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{oceanprotocol_job_details-0.2.4 → oceanprotocol_job_details-0.2.5}/oceanprotocol_job_details/di.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|