deriva-ml 1.14.39__tar.gz → 1.14.41__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.14.39 → deriva_ml-1.14.41}/PKG-INFO +1 -1
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/execution/workflow.py +1 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/run_notebook.py +3 -2
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml.egg-info/PKG-INFO +1 -1
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/dataset/test_download.py +26 -2
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/execution/test_execution.py +1 -1
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/.github/release-drafter.yml +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/.github/workflows/publish-docs.yml +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/.github/workflows/release.yml +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/.gitignore +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/LICENSE +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/README.md +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/.DS_Store +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/Notebooks/DerivaML Create Notes.ipynb +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/Notebooks/DerivaML Dataset.ipynb +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/Notebooks/DerivaML Execution.ipynb +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/Notebooks/DerivaML Features.ipynb +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/Notebooks/DerivaML Ingest.ipynb +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/Notebooks/DerivaML Vocabulary.ipynb +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/assets/ERD.png +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/assets/Launcher.png +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/assets/copy_minid.png +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/assets/deriva-logo.png +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/assets/deriva-ml.pdf +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/assets/sharing-at-home.pdf +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/code-docs/dataset.md +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/code-docs/dataset_aux_classes.md +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/code-docs/dataset_bag.md +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/code-docs/deriva_definitions.md +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/code-docs/deriva_ml_base.md +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/code-docs/deriva_model.md +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/code-docs/execution.md +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/code-docs/execution_configuration.md +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/code-docs/feature.md +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/code-docs/upload.md +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/index.md +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/release-notes.md +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/user-guide/datasets.md +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/user-guide/deriva_ml_structure.md +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/user-guide/execution-configuration.md +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/user-guide/file-assets.md +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/user-guide/identifiers.md +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/user-guide/install.md +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/user-guide/notebooks.md +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/docs/user-guide/overview.md +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/mkdocs.yml +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/pyproject.toml +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/setup.cfg +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/__init__.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/bump_version.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/core/__init__.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/core/base.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/core/constants.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/core/definitions.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/core/enums.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/core/ermrest.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/core/exceptions.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/core/filespec.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/dataset/__init__.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/dataset/aux_classes.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/dataset/dataset.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/dataset/dataset_bag.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/dataset/history.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/dataset/upload.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/demo_catalog.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/execution/__init__.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/execution/environment.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/execution/execution.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/execution/execution_configuration.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/feature.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/install_kernel.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/model/__init__.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/model/catalog.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/model/database.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/model/sql_mapper.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/schema/__init__.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/schema/annotations.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/schema/check_schema.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/schema/create_schema.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/schema/deriva-ml-reference.json +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/schema/policy.json +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml/schema/table_comments_utils.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml.egg-info/SOURCES.txt +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml.egg-info/dependency_links.txt +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml.egg-info/entry_points.txt +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml.egg-info/requires.txt +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/src/deriva_ml.egg-info/top_level.txt +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/__init__.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/conftest.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/core/__init__.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/core/test_basic_tables.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/core/test_file.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/core/test_vocabulary.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/dataset/__init__.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/dataset/demo-catalog-schema.json +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/dataset/deriva-ml-reference.json +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/dataset/eye-ai-catalog-schema.json +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/dataset/test_dataset_export.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/dataset/test_dataset_version.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/dataset/test_datasets.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/execution/__init__.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/execution/workflow-test.ipynb +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/execution/workflow-test.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/feature/test_features.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/model/__init__.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/model/test_database.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/model/test_models.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/test-files/execution-parameters.json +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/test-files/notebook-parameters.json +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/tests/test_utils.py +0 -0
- {deriva_ml-1.14.39 → deriva_ml-1.14.41}/uv.lock +0 -0
|
@@ -121,6 +121,7 @@ class Workflow(BaseModel):
|
|
|
121
121
|
if "DERIVA_ML_WORKFLOW_URL" in os.environ:
|
|
122
122
|
self.url = os.environ["DERIVA_ML_WORKFLOW_URL"]
|
|
123
123
|
self.checksum = os.environ["DERIVA_ML_WORKFLOW_CHECKSUM"]
|
|
124
|
+
self.git_root = Workflow._get_git_root(Path(os.environ["DERIVA_ML_NOTEBOOK_PATHL"]))
|
|
124
125
|
self.is_notebook = True
|
|
125
126
|
|
|
126
127
|
if not self.url:
|
|
@@ -76,7 +76,7 @@ class DerivaMLRunNotebookCLI(BaseCLI):
|
|
|
76
76
|
def main(self):
|
|
77
77
|
"""Parse arguments and set up execution environment."""
|
|
78
78
|
args = self.parse_cli()
|
|
79
|
-
notebook_file = args.notebook_file
|
|
79
|
+
notebook_file: Path = args.notebook_file
|
|
80
80
|
parameter_file = args.file
|
|
81
81
|
|
|
82
82
|
# args.parameter is now a list of [KEY, VALUE] lists
|
|
@@ -115,10 +115,11 @@ class DerivaMLRunNotebookCLI(BaseCLI):
|
|
|
115
115
|
print(f" {param}:{value}")
|
|
116
116
|
self.run_notebook(notebook_file.resolve(), parameters, kernel=args.kernel[0], log=args.log_output)
|
|
117
117
|
|
|
118
|
-
def run_notebook(self, notebook_file, parameters, kernel=None, log=False):
|
|
118
|
+
def run_notebook(self, notebook_file: Path, parameters, kernel=None, log=False):
|
|
119
119
|
url, checksum = Workflow.get_url_and_checksum(Path(notebook_file))
|
|
120
120
|
os.environ["DERIVA_ML_WORKFLOW_URL"] = url
|
|
121
121
|
os.environ["DERIVA_ML_WORKFLOW_CHECKSUM"] = checksum
|
|
122
|
+
os.environ["DERIVA_ML_NOTEBOOK_PATH"] = notebook_file.as_posix()
|
|
122
123
|
|
|
123
124
|
with tempfile.TemporaryDirectory() as tmpdirname:
|
|
124
125
|
notebook_output = Path(tmpdirname) / Path(notebook_file).name
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
2
|
|
|
3
3
|
# Local imports
|
|
4
|
-
from deriva_ml import DatasetSpec, DerivaML, MLVocab
|
|
4
|
+
from deriva_ml import DatasetSpec, DerivaML, MLVocab, TableDefinition, VersionPart
|
|
5
5
|
from deriva_ml.demo_catalog import DatasetDescription
|
|
6
6
|
from tests.test_utils import MLDatasetCatalog
|
|
7
7
|
|
|
@@ -98,7 +98,6 @@ class TestDatasetDownload:
|
|
|
98
98
|
|
|
99
99
|
self.compare_datasets(ml_instance, dataset_test, dataset_spec)
|
|
100
100
|
|
|
101
|
-
|
|
102
101
|
def test_dataset_download_recurse(self, dataset_test, tmp_path):
|
|
103
102
|
hostname = dataset_test.catalog.hostname
|
|
104
103
|
catalog_id = dataset_test.catalog.catalog_id
|
|
@@ -147,3 +146,28 @@ class TestDatasetDownload:
|
|
|
147
146
|
|
|
148
147
|
self.compare_datasets(ml_instance, dataset_test, current_spec)
|
|
149
148
|
self.compare_datasets(ml_instance, dataset_test, new_spec)
|
|
149
|
+
|
|
150
|
+
def test_dataset_download_schemas(self, dataset_test, tmp_path):
|
|
151
|
+
hostname = dataset_test.catalog.hostname
|
|
152
|
+
catalog_id = dataset_test.catalog.catalog_id
|
|
153
|
+
ml_instance = DerivaML(hostname, catalog_id, working_dir=tmp_path, use_minid=False)
|
|
154
|
+
dataset_description = dataset_test.dataset_description
|
|
155
|
+
|
|
156
|
+
current_version = ml_instance.dataset_version(dataset_description.rid)
|
|
157
|
+
current_spec = DatasetSpec(rid=dataset_description.rid, version=current_version)
|
|
158
|
+
ml_instance.create_table(
|
|
159
|
+
TableDefinition(
|
|
160
|
+
name="NewTable",
|
|
161
|
+
column_defs=[],
|
|
162
|
+
)
|
|
163
|
+
)
|
|
164
|
+
new_version = ml_instance.increment_dataset_version(
|
|
165
|
+
dataset_rid=dataset_description.rid, component=VersionPart.minor
|
|
166
|
+
)
|
|
167
|
+
new_spec = DatasetSpec(rid=dataset_description.rid, version=new_version)
|
|
168
|
+
|
|
169
|
+
current_bag = ml_instance.download_dataset_bag(current_spec)
|
|
170
|
+
new_bag = ml_instance.download_dataset_bag(new_spec)
|
|
171
|
+
|
|
172
|
+
assert "NewTable" in new_bag.model.schemas[ml_instance.domain_schema].tables
|
|
173
|
+
assert "NewTable" not in current_bag.model.schemas[ml_instance.domain_schema].tables
|
|
@@ -49,7 +49,7 @@ class TestWorkflow:
|
|
|
49
49
|
workflow_url = workflows[0]["URL"]
|
|
50
50
|
|
|
51
51
|
workflow_rid = ml_instance.lookup_workflow(workflow_url)
|
|
52
|
-
|
|
52
|
+
print(f"Workflow url: {workflow_url}")
|
|
53
53
|
assert workflow_url.endswith("workflow-test.py")
|
|
54
54
|
|
|
55
55
|
# Make sure that workflow is not duplicated if created again.
|
|
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
|