deriva-ml 1.14.26__tar.gz → 1.14.28__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.
Files changed (110) hide show
  1. {deriva_ml-1.14.26/src/deriva_ml.egg-info → deriva_ml-1.14.28}/PKG-INFO +1 -1
  2. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/release.sh +1 -1
  3. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/dataset/dataset.py +2 -1
  4. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/execution/workflow.py +38 -12
  5. {deriva_ml-1.14.26 → deriva_ml-1.14.28/src/deriva_ml.egg-info}/PKG-INFO +1 -1
  6. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml.egg-info/SOURCES.txt +6 -0
  7. deriva_ml-1.14.28/tests/dataset/demo-catalog-schema.json +1 -0
  8. deriva_ml-1.14.28/tests/dataset/deriva-ml-reference.json +8525 -0
  9. deriva_ml-1.14.28/tests/dataset/eye-ai-catalog-schema.json +1 -0
  10. deriva_ml-1.14.28/tests/dataset/test_dataset_export.py +30 -0
  11. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/tests/dataset/test_dataset_version.py +12 -0
  12. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/tests/dataset/test_download.py +2 -1
  13. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/tests/execution/test_execution.py +55 -0
  14. deriva_ml-1.14.28/tests/execution/workflow-script.py +19 -0
  15. deriva_ml-1.14.28/tests/execution/workflow_test.ipynb +94 -0
  16. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/.github/release-drafter.yml +0 -0
  17. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/.github/workflows/publish-docs.yml +0 -0
  18. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/.github/workflows/release.yml +0 -0
  19. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/.gitignore +0 -0
  20. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/LICENSE +0 -0
  21. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/README.md +0 -0
  22. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/.DS_Store +0 -0
  23. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/Notebooks/DerivaML Create Notes.ipynb +0 -0
  24. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/Notebooks/DerivaML Dataset.ipynb +0 -0
  25. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/Notebooks/DerivaML Execution.ipynb +0 -0
  26. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/Notebooks/DerivaML Features.ipynb +0 -0
  27. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/Notebooks/DerivaML Ingest.ipynb +0 -0
  28. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/Notebooks/DerivaML Vocabulary.ipynb +0 -0
  29. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/assets/ERD.png +0 -0
  30. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/assets/Launcher.png +0 -0
  31. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/assets/copy_minid.png +0 -0
  32. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/assets/deriva-logo.png +0 -0
  33. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/assets/deriva-ml.pdf +0 -0
  34. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/assets/sharing-at-home.pdf +0 -0
  35. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/code-docs/dataset.md +0 -0
  36. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/code-docs/dataset_aux_classes.md +0 -0
  37. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/code-docs/dataset_bag.md +0 -0
  38. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/code-docs/deriva_definitions.md +0 -0
  39. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/code-docs/deriva_ml_base.md +0 -0
  40. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/code-docs/deriva_model.md +0 -0
  41. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/code-docs/execution.md +0 -0
  42. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/code-docs/execution_configuration.md +0 -0
  43. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/code-docs/feature.md +0 -0
  44. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/code-docs/upload.md +0 -0
  45. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/index.md +0 -0
  46. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/release-notes.md +0 -0
  47. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/user-guide/datasets.md +0 -0
  48. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/user-guide/deriva_ml_structure.md +0 -0
  49. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/user-guide/execution-configuration.md +0 -0
  50. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/user-guide/file-assets.md +0 -0
  51. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/user-guide/identifiers.md +0 -0
  52. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/user-guide/install.md +0 -0
  53. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/user-guide/notebooks.md +0 -0
  54. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/docs/user-guide/overview.md +0 -0
  55. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/mkdocs.yml +0 -0
  56. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/pyproject.toml +0 -0
  57. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/setup.cfg +0 -0
  58. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/__init__.py +0 -0
  59. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/core/__init__.py +0 -0
  60. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/core/base.py +0 -0
  61. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/core/constants.py +0 -0
  62. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/core/definitions.py +0 -0
  63. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/core/enums.py +0 -0
  64. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/core/ermrest.py +0 -0
  65. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/core/exceptions.py +0 -0
  66. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/core/filespec.py +0 -0
  67. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/dataset/__init__.py +0 -0
  68. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/dataset/aux_classes.py +0 -0
  69. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/dataset/dataset_bag.py +0 -0
  70. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/dataset/history.py +0 -0
  71. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/dataset/upload.py +0 -0
  72. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/demo_catalog.py +0 -0
  73. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/execution/__init__.py +0 -0
  74. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/execution/environment.py +0 -0
  75. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/execution/execution.py +0 -0
  76. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/execution/execution_configuration.py +0 -0
  77. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/feature.py +0 -0
  78. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/model/__init__.py +0 -0
  79. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/model/catalog.py +0 -0
  80. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/model/database.py +1 -1
  81. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/model/sql_mapper.py +0 -0
  82. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/run_notebook.py +0 -0
  83. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/schema/__init__.py +0 -0
  84. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/schema/annotations.py +0 -0
  85. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/schema/check_schema.py +0 -0
  86. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/schema/create_schema.py +0 -0
  87. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/schema/deriva-ml-reference.json +0 -0
  88. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/schema/policy.json +0 -0
  89. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml/schema/table_comments_utils.py +0 -0
  90. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml.egg-info/dependency_links.txt +0 -0
  91. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml.egg-info/entry_points.txt +0 -0
  92. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml.egg-info/requires.txt +0 -0
  93. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/src/deriva_ml.egg-info/top_level.txt +0 -0
  94. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/tests/__init__.py +0 -0
  95. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/tests/conftest.py +0 -0
  96. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/tests/core/__init__.py +0 -0
  97. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/tests/core/test_basic_tables.py +0 -0
  98. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/tests/core/test_file.py +0 -0
  99. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/tests/core/test_vocabulary.py +0 -0
  100. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/tests/dataset/__init__.py +0 -0
  101. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/tests/dataset/test_datasets.py +0 -0
  102. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/tests/execution/__init__.py +0 -0
  103. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/tests/feature/test_features.py +0 -0
  104. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/tests/model/__init__.py +0 -0
  105. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/tests/model/test_database.py +0 -0
  106. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/tests/model/test_models.py +0 -0
  107. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/tests/test-files/execution-parameters.json +0 -0
  108. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/tests/test-files/notebook-parameters.json +0 -0
  109. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/tests/test_utils.py +0 -0
  110. {deriva_ml-1.14.26 → deriva_ml-1.14.28}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deriva-ml
3
- Version: 1.14.26
3
+ Version: 1.14.28
4
4
  Summary: Utilities to simplify use of Dervia and Pandas to create reproducable ML pipelines
5
5
  Author-email: ISRD <isrd-dev@isi.edu>
6
6
  Requires-Python: >=3.10
@@ -14,7 +14,7 @@ echo "Bumping version: $VERSION_TYPE"
14
14
 
15
15
  # Bump the version using bump-my-version.
16
16
  # This command should update version files, commit the changes, and create a Git tag.
17
- bump-my-version bump "$VERSION_TYPE" --verbose
17
+ uv run bump-my-version bump "$VERSION_TYPE" --verbose
18
18
 
19
19
  # Push commits and tags to the remote repository.
20
20
  echo "Pushing changes to remote repository..."
@@ -211,6 +211,7 @@ class Dataset:
211
211
  dataset_path.update([{"RID": dataset, "Version": version["RID"]} for dataset, version in versions.items()])
212
212
 
213
213
  def _set_version_snapshot(self):
214
+ """Update the Snapshot column of the Dataset_Version table to the correct time."""
214
215
  dataset_version_path = self._model.catalog.getPathBuilder().schemas[self._ml_schema].tables["Dataset_Version"]
215
216
  versions = dataset_version_path.entities().fetch()
216
217
  dataset_version_path.update(
@@ -1023,7 +1024,7 @@ class Dataset:
1023
1024
  self._logger.info(
1024
1025
  "Downloading dataset %s for catalog: %s@%s"
1025
1026
  % (
1026
- 'minid' if self._use_minid else 'bag',
1027
+ "minid" if self._use_minid else "bag",
1027
1028
  dataset.rid,
1028
1029
  str(dataset.version),
1029
1030
  )
@@ -2,6 +2,7 @@ import inspect
2
2
  import logging
3
3
  import os
4
4
  import subprocess
5
+ import sys
5
6
  from pathlib import Path
6
7
  from typing import Any
7
8
 
@@ -297,22 +298,46 @@ class Workflow(BaseModel):
297
298
  pass
298
299
  return None, None
299
300
 
301
+ @staticmethod
302
+ def _in_repl():
303
+ # Standard Python interactive mode
304
+ if hasattr(sys, "ps1"):
305
+ return True
306
+
307
+ # Interactive mode forced by -i
308
+ if sys.flags.interactive:
309
+ return True
310
+
311
+ # IPython / Jupyter detection
312
+ try:
313
+ from IPython import get_ipython
314
+
315
+ if get_ipython() is not None:
316
+ return True
317
+ except ImportError:
318
+ pass
319
+
320
+ return False
321
+
300
322
  @staticmethod
301
323
  def _get_python_script() -> tuple[Path, bool]:
302
324
  """Return the path to the currently executing script"""
303
325
  is_notebook = True
304
326
  if not (filename := Workflow._get_notebook_path()):
305
327
  is_notebook = False
306
- stack = inspect.stack()
328
+ stack = [
329
+ s.filename
330
+ for s in inspect.stack()
331
+ if ("pycharm" not in s.filename) and ("site-packages" not in s.filename)
332
+ ]
333
+ # Get the caller's filename, which is two up the stack from here.
334
+ filename = Path(stack[-1])
335
+ if not filename.exists() or Workflow._in_repl():
336
+ # Being called from the command line interpreter.
337
+ filename = Path.cwd() / Path("REPL")
307
338
  # Get the caller's filename, which is two up the stack from here.
308
- if len(stack) > 1:
309
- filename = Path(stack[2].filename)
310
- if not filename.exists():
311
- # Being called from the command line interpreter.
312
- filename = Path("REPL")
313
- # Get the caller's filename, which is two up the stack from here.
314
- else:
315
- raise DerivaMLException("Looking for caller failed") # Stack is too shallow
339
+ else:
340
+ raise DerivaMLException("Looking for caller failed") # Stack is too shallow
316
341
  return filename, is_notebook
317
342
 
318
343
  @staticmethod
@@ -352,19 +377,20 @@ class Workflow(BaseModel):
352
377
  cwd=executable_path.parent,
353
378
  capture_output=True,
354
379
  text=True,
355
- check=True,
380
+ check=False,
356
381
  )
357
382
  is_dirty = bool("M " in result.stdout.strip()) # Returns True if the output indicates a modified file
358
383
  except subprocess.CalledProcessError:
359
384
  is_dirty = False # If the Git command fails, assume no changes
360
385
 
361
386
  """Get SHA-1 hash of latest commit of the file in the repository"""
387
+
362
388
  result = subprocess.run(
363
389
  ["git", "log", "-n", "1", "--pretty=format:%H--", executable_path],
364
- cwd=executable_path.parent,
390
+ cwd=repo_root,
365
391
  capture_output=True,
366
392
  text=True,
367
- check=True,
393
+ check=False,
368
394
  )
369
395
  sha = result.stdout.strip()
370
396
  url = f"{github_url}/blob/{sha}/{executable_path.relative_to(repo_root)}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deriva-ml
3
- Version: 1.14.26
3
+ Version: 1.14.28
4
4
  Summary: Utilities to simplify use of Dervia and Pandas to create reproducable ML pipelines
5
5
  Author-email: ISRD <isrd-dev@isi.edu>
6
6
  Requires-Python: >=3.10
@@ -89,11 +89,17 @@ tests/core/test_basic_tables.py
89
89
  tests/core/test_file.py
90
90
  tests/core/test_vocabulary.py
91
91
  tests/dataset/__init__.py
92
+ tests/dataset/demo-catalog-schema.json
93
+ tests/dataset/deriva-ml-reference.json
94
+ tests/dataset/eye-ai-catalog-schema.json
95
+ tests/dataset/test_dataset_export.py
92
96
  tests/dataset/test_dataset_version.py
93
97
  tests/dataset/test_datasets.py
94
98
  tests/dataset/test_download.py
95
99
  tests/execution/__init__.py
96
100
  tests/execution/test_execution.py
101
+ tests/execution/workflow-script.py
102
+ tests/execution/workflow_test.ipynb
97
103
  tests/feature/test_features.py
98
104
  tests/model/__init__.py
99
105
  tests/model/test_database.py