deriva-ml 1.17.0__tar.gz → 1.17.2__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.
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/PKG-INFO +1 -1
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/pyproject.toml +1 -4
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/dataset/aux_classes.py +8 -22
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/execution/execution.py +1 -1
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml.egg-info/PKG-INFO +1 -1
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/core/test_file.py +2 -1
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/.github/release-drafter.yml +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/.github/workflows/publish-docs.yml +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/.github/workflows/release.yml +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/.gitignore +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/LICENSE +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/README.md +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/.DS_Store +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/Notebooks/DerivaML Create Notes.ipynb +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/Notebooks/DerivaML Dataset.ipynb +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/Notebooks/DerivaML Execution.ipynb +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/Notebooks/DerivaML Features.ipynb +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/Notebooks/DerivaML Ingest.ipynb +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/Notebooks/DerivaML Vocabulary.ipynb +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/assets/ERD.png +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/assets/Launcher.png +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/assets/copy_minid.png +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/assets/deriva-logo.png +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/assets/deriva-ml.pdf +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/assets/sharing-at-home.pdf +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/code-docs/dataset.md +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/code-docs/dataset_aux_classes.md +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/code-docs/dataset_bag.md +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/code-docs/deriva_definitions.md +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/code-docs/deriva_ml_base.md +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/code-docs/deriva_model.md +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/code-docs/execution.md +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/code-docs/execution_configuration.md +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/code-docs/feature.md +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/code-docs/upload.md +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/index.md +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/release-notes.md +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/user-guide/datasets.md +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/user-guide/deriva_ml_structure.md +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/user-guide/execution-configuration.md +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/user-guide/file-assets.md +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/user-guide/identifiers.md +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/user-guide/install.md +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/user-guide/notebooks.md +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/docs/user-guide/overview.md +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/mkdocs.yml +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/setup.cfg +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/.DS_Store +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/.DS_Store +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/__init__.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/bump_version.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/core/__init__.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/core/base.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/core/config.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/core/constants.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/core/definitions.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/core/enums.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/core/ermrest.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/core/exceptions.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/core/filespec.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/dataset/__init__.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/dataset/dataset.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/dataset/dataset_bag.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/dataset/history.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/dataset/upload.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/demo_catalog.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/execution/__init__.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/execution/environment.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/execution/execution_configuration.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/execution/workflow.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/feature.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/install_kernel.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/model/__init__.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/model/catalog.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/model/database.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/protocols/dataset.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/run_notebook.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/schema/__init__.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/schema/annotations.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/schema/check_schema.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/schema/create_schema.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/schema/deriva-ml-reference.json +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/schema/policy.json +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/schema/table_comments_utils.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml/test.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml.egg-info/SOURCES.txt +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml.egg-info/dependency_links.txt +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml.egg-info/entry_points.txt +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml.egg-info/requires.txt +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/src/deriva_ml.egg-info/top_level.txt +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/__init__.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/conftest.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/core/__init__.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/core/test_basic_tables.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/core/test_vocabulary.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/dataset/__init__.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/dataset/demo-catalog-schema.json +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/dataset/deriva-ml-reference.json +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/dataset/eye-ai-catalog-schema.json +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/dataset/test_dataset_version.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/dataset/test_datasets.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/dataset/test_download.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/execution/__init__.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/execution/test_execution.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/execution/workflow-test.ipynb +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/execution/workflow-test.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/feature/test_features.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/model/__init__.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/model/test_database.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/model/test_models.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/test-files/execution-parameters.json +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/test-files/notebook-parameters.json +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/tests/test_utils.py +0 -0
- {deriva_ml-1.17.0 → deriva_ml-1.17.2}/uv.lock +0 -0
|
@@ -80,13 +80,10 @@ pre_commit_hooks = []
|
|
|
80
80
|
post_commit_hooks = []
|
|
81
81
|
|
|
82
82
|
[tool.pytest]
|
|
83
|
-
mock_use_standalone_module = true
|
|
84
|
-
|
|
85
|
-
[tool.pytest.ini_options]
|
|
86
83
|
testpaths = ["tests"]
|
|
87
84
|
python_files = ["test_*.py"]
|
|
88
85
|
#addopts = "-v --cov=deriva_ml --cov-report=term-missing --import-mode=importlib"
|
|
89
|
-
addopts = "-v
|
|
86
|
+
addopts = ["-v", "--import-mode=importlib"]
|
|
90
87
|
|
|
91
88
|
|
|
92
89
|
[tool.ruff]
|
|
@@ -3,7 +3,7 @@ THis module defines the DataSet class with is used to manipulate n
|
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
from enum import Enum
|
|
6
|
-
from typing import Any, Optional, SupportsInt
|
|
6
|
+
from typing import Any, Optional, SupportsInt
|
|
7
7
|
|
|
8
8
|
from hydra_zen import hydrated_dataclass
|
|
9
9
|
from pydantic import (
|
|
@@ -43,9 +43,6 @@ class DatasetVersion(Version):
|
|
|
43
43
|
replace(major, minor, patch): Replace the major and minor versions
|
|
44
44
|
"""
|
|
45
45
|
|
|
46
|
-
@overload
|
|
47
|
-
def __init__(self, version: str): ...
|
|
48
|
-
@overload
|
|
49
46
|
def __init__(self, major: SupportsInt, minor: SupportsInt = 0, patch: SupportsInt = 0):
|
|
50
47
|
"""Initialize a DatasetVersion object.
|
|
51
48
|
|
|
@@ -54,21 +51,6 @@ class DatasetVersion(Version):
|
|
|
54
51
|
minor: Minor version number. Used to indicate additional members added, or change in member values.
|
|
55
52
|
patch: Patch number of the dataset. Used to indicate minor clean-up and edits
|
|
56
53
|
"""
|
|
57
|
-
...
|
|
58
|
-
|
|
59
|
-
def __init__(self, *args):
|
|
60
|
-
"""Initialize a DatasetVersion object.
|
|
61
|
-
|
|
62
|
-
Args:
|
|
63
|
-
major: Major version number. Used to indicate schema changes.
|
|
64
|
-
minor: Minor version number. Used to indicate additional members added, or change in member values.
|
|
65
|
-
patch: Patch number of the dataset. Used to indicate minor clean-up and edits
|
|
66
|
-
"""
|
|
67
|
-
if len(args) == 1 and isinstance(args[0], str):
|
|
68
|
-
v = Version.parse(args[0])
|
|
69
|
-
major, minor, patch = v.major, v.minor, v.patch
|
|
70
|
-
else:
|
|
71
|
-
major, minor, patch = args
|
|
72
54
|
super().__init__(major, minor, patch)
|
|
73
55
|
|
|
74
56
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -123,12 +105,16 @@ class DatasetHistory(BaseModel):
|
|
|
123
105
|
dataset_rid: RID
|
|
124
106
|
version_rid: RID
|
|
125
107
|
execution_rid: Optional[RID] = None
|
|
126
|
-
description: str = ""
|
|
127
|
-
minid:
|
|
128
|
-
snapshot:
|
|
108
|
+
description: str | None = ""
|
|
109
|
+
minid: str | None = None
|
|
110
|
+
snapshot: str | None = None
|
|
129
111
|
|
|
130
112
|
model_config = ConfigDict(arbitrary_types_allowed=True)
|
|
131
113
|
|
|
114
|
+
@field_validator("description", mode="after")
|
|
115
|
+
def _default_description(cls, v) -> str:
|
|
116
|
+
return v or ""
|
|
117
|
+
|
|
132
118
|
|
|
133
119
|
class DatasetMinid(BaseModel):
|
|
134
120
|
"""Represent information about a MINID that refers to a dataset
|
|
@@ -1100,7 +1100,7 @@ class Execution:
|
|
|
1100
1100
|
description: Description of the files.
|
|
1101
1101
|
|
|
1102
1102
|
Returns:
|
|
1103
|
-
RID: Dataset RID that
|
|
1103
|
+
RID: Dataset RID that identifies newly added files. Will be nested to mirror original directory structure
|
|
1104
1104
|
of the files.
|
|
1105
1105
|
|
|
1106
1106
|
Raises:
|
|
@@ -6,7 +6,8 @@ from tempfile import TemporaryDirectory
|
|
|
6
6
|
import pytest
|
|
7
7
|
from deriva.core.datapath import DataPathException
|
|
8
8
|
|
|
9
|
-
from deriva_ml import DerivaML, DerivaMLInvalidTerm,
|
|
9
|
+
from deriva_ml import DerivaML, DerivaMLInvalidTerm, FileSpec, MLVocab
|
|
10
|
+
from deriva_ml.execution import ExecutionConfiguration
|
|
10
11
|
|
|
11
12
|
FILE_COUNT = 5
|
|
12
13
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|