lamindb 1.7a1__tar.gz → 1.8.0__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 (280) hide show
  1. {lamindb-1.7a1 → lamindb-1.8.0}/PKG-INFO +3 -3
  2. {lamindb-1.7a1 → lamindb-1.8.0}/docs/faq/keep-artifacts-local.ipynb +126 -136
  3. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/__init__.py +1 -1
  4. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/_context.py +7 -11
  5. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/_settings.py +31 -5
  6. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/storage/_backed_access.py +36 -28
  7. lamindb-1.8.0/lamindb/core/storage/_polars_lazy_df.py +90 -0
  8. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/curators/core.py +18 -2
  9. lamindb-1.8.0/lamindb/migrations/0115_alter_space_uid.py +52 -0
  10. lamindb-1.7a1/lamindb/migrations/0114_squashed.py → lamindb-1.8.0/lamindb/migrations/0115_squashed.py +3 -2
  11. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/_django.py +25 -6
  12. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/artifact.py +5 -36
  13. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/feature.py +14 -20
  14. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/sqlrecord.py +24 -14
  15. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/storage.py +83 -34
  16. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/setup/__init__.py +1 -0
  17. lamindb-1.8.0/lamindb/setup/_switch.py +16 -0
  18. {lamindb-1.7a1 → lamindb-1.8.0}/pyproject.toml +2 -2
  19. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_models.py +18 -0
  20. {lamindb-1.7a1 → lamindb-1.8.0}/tests/curators/test_curators_general.py +32 -0
  21. {lamindb-1.7a1 → lamindb-1.8.0}/tests/permissions/scripts/check_lamin_dev.py +1 -1
  22. {lamindb-1.7a1 → lamindb-1.8.0}/tests/storage/conftest.py +1 -1
  23. {lamindb-1.7a1 → lamindb-1.8.0}/tests/storage/test_streaming.py +22 -0
  24. lamindb-1.7a1/lamindb/core/storage/_polars_lazy_df.py +0 -51
  25. {lamindb-1.7a1 → lamindb-1.8.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  26. {lamindb-1.7a1 → lamindb-1.8.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  27. {lamindb-1.7a1 → lamindb-1.8.0}/.github/ISSUE_TEMPLATE/enhancement.yml +0 -0
  28. {lamindb-1.7a1 → lamindb-1.8.0}/.github/ISSUE_TEMPLATE/usage_question.yml +0 -0
  29. {lamindb-1.7a1 → lamindb-1.8.0}/.github/workflows/build.yml +0 -0
  30. {lamindb-1.7a1 → lamindb-1.8.0}/.github/workflows/doc-changes.yml +0 -0
  31. {lamindb-1.7a1 → lamindb-1.8.0}/.gitignore +0 -0
  32. {lamindb-1.7a1 → lamindb-1.8.0}/.gitmodules +0 -0
  33. {lamindb-1.7a1 → lamindb-1.8.0}/.pre-commit-config.yaml +0 -0
  34. {lamindb-1.7a1 → lamindb-1.8.0}/CONTRIBUTING.md +0 -0
  35. {lamindb-1.7a1 → lamindb-1.8.0}/LICENSE +0 -0
  36. {lamindb-1.7a1 → lamindb-1.8.0}/README.md +0 -0
  37. {lamindb-1.7a1 → lamindb-1.8.0}/docs/api.md +0 -0
  38. {lamindb-1.7a1 → lamindb-1.8.0}/docs/arrays.ipynb +0 -0
  39. {lamindb-1.7a1 → lamindb-1.8.0}/docs/bio-registries.ipynb +0 -0
  40. {lamindb-1.7a1 → lamindb-1.8.0}/docs/bionty.md +0 -0
  41. {lamindb-1.7a1 → lamindb-1.8.0}/docs/changelog.md +0 -0
  42. {lamindb-1.7a1 → lamindb-1.8.0}/docs/clinicore.md +0 -0
  43. {lamindb-1.7a1 → lamindb-1.8.0}/docs/curate.ipynb +0 -0
  44. {lamindb-1.7a1 → lamindb-1.8.0}/docs/faq/acid.ipynb +0 -0
  45. {lamindb-1.7a1 → lamindb-1.8.0}/docs/faq/curate-any.ipynb +0 -0
  46. {lamindb-1.7a1 → lamindb-1.8.0}/docs/faq/delete.ipynb +0 -0
  47. {lamindb-1.7a1 → lamindb-1.8.0}/docs/faq/idempotency.ipynb +0 -0
  48. {lamindb-1.7a1 → lamindb-1.8.0}/docs/faq/import-modules.ipynb +0 -0
  49. {lamindb-1.7a1 → lamindb-1.8.0}/docs/faq/pydantic-pandera.ipynb +0 -0
  50. {lamindb-1.7a1 → lamindb-1.8.0}/docs/faq/reference-field.ipynb +0 -0
  51. {lamindb-1.7a1 → lamindb-1.8.0}/docs/faq/search.ipynb +0 -0
  52. {lamindb-1.7a1 → lamindb-1.8.0}/docs/faq/setup.ipynb +0 -0
  53. {lamindb-1.7a1 → lamindb-1.8.0}/docs/faq/symbol-mapping.ipynb +0 -0
  54. {lamindb-1.7a1 → lamindb-1.8.0}/docs/faq/test_notebooks.py +0 -0
  55. {lamindb-1.7a1 → lamindb-1.8.0}/docs/faq/track-run-inputs.ipynb +0 -0
  56. {lamindb-1.7a1 → lamindb-1.8.0}/docs/faq/validate-fields.ipynb +0 -0
  57. {lamindb-1.7a1 → lamindb-1.8.0}/docs/faq/visibility.ipynb +0 -0
  58. {lamindb-1.7a1 → lamindb-1.8.0}/docs/faq.md +0 -0
  59. {lamindb-1.7a1 → lamindb-1.8.0}/docs/guide.md +0 -0
  60. {lamindb-1.7a1 → lamindb-1.8.0}/docs/includes/installation.md +0 -0
  61. {lamindb-1.7a1 → lamindb-1.8.0}/docs/index.md +0 -0
  62. {lamindb-1.7a1 → lamindb-1.8.0}/docs/lamindb.md +0 -0
  63. {lamindb-1.7a1 → lamindb-1.8.0}/docs/query-search.md +0 -0
  64. {lamindb-1.7a1 → lamindb-1.8.0}/docs/registries.ipynb +0 -0
  65. {lamindb-1.7a1 → lamindb-1.8.0}/docs/scripts/curate_anndata_flexible.py +0 -0
  66. {lamindb-1.7a1 → lamindb-1.8.0}/docs/scripts/curate_dataframe_flexible.py +0 -0
  67. {lamindb-1.7a1 → lamindb-1.8.0}/docs/scripts/curate_dataframe_minimal_errors.py +0 -0
  68. {lamindb-1.7a1 → lamindb-1.8.0}/docs/scripts/curate_mudata.py +0 -0
  69. {lamindb-1.7a1 → lamindb-1.8.0}/docs/scripts/curate_soma_experiment.py +0 -0
  70. {lamindb-1.7a1 → lamindb-1.8.0}/docs/scripts/curate_spatialdata.py +0 -0
  71. {lamindb-1.7a1 → lamindb-1.8.0}/docs/scripts/define_mini_immuno_features_labels.py +0 -0
  72. {lamindb-1.7a1 → lamindb-1.8.0}/docs/scripts/define_mini_immuno_schema_flexible.py +0 -0
  73. {lamindb-1.7a1 → lamindb-1.8.0}/docs/scripts/define_schema_anndata_ensembl_gene_ids_and_valid_features_in_obs.py +0 -0
  74. {lamindb-1.7a1 → lamindb-1.8.0}/docs/scripts/define_schema_spatialdata.py +0 -0
  75. {lamindb-1.7a1 → lamindb-1.8.0}/docs/scripts/define_valid_features.py +0 -0
  76. {lamindb-1.7a1 → lamindb-1.8.0}/docs/scripts/ingest_mini_immuno_datasets.py +0 -0
  77. {lamindb-1.7a1 → lamindb-1.8.0}/docs/scripts/run_track_and_finish.py +0 -0
  78. {lamindb-1.7a1 → lamindb-1.8.0}/docs/scripts/run_track_with_params.py +0 -0
  79. {lamindb-1.7a1 → lamindb-1.8.0}/docs/scripts/run_workflow.py +0 -0
  80. {lamindb-1.7a1 → lamindb-1.8.0}/docs/scripts/synced_with_git.py +0 -0
  81. {lamindb-1.7a1 → lamindb-1.8.0}/docs/storage/add-replace-cache.ipynb +0 -0
  82. {lamindb-1.7a1 → lamindb-1.8.0}/docs/storage/anndata-accessor.ipynb +0 -0
  83. {lamindb-1.7a1 → lamindb-1.8.0}/docs/storage/prepare-transfer-local-to-cloud.ipynb +0 -0
  84. {lamindb-1.7a1 → lamindb-1.8.0}/docs/storage/test-files/iris.csv +0 -0
  85. {lamindb-1.7a1 → lamindb-1.8.0}/docs/storage/test-files/iris.data +0 -0
  86. {lamindb-1.7a1 → lamindb-1.8.0}/docs/storage/test-files/new_iris.csv +0 -0
  87. {lamindb-1.7a1 → lamindb-1.8.0}/docs/storage/test_notebooks.py +0 -0
  88. {lamindb-1.7a1 → lamindb-1.8.0}/docs/storage/transfer-local-to-cloud.ipynb +0 -0
  89. {lamindb-1.7a1 → lamindb-1.8.0}/docs/storage/upload.ipynb +0 -0
  90. {lamindb-1.7a1 → lamindb-1.8.0}/docs/storage/vitessce.ipynb +0 -0
  91. {lamindb-1.7a1 → lamindb-1.8.0}/docs/storage.md +0 -0
  92. {lamindb-1.7a1 → lamindb-1.8.0}/docs/test_notebooks.py +0 -0
  93. {lamindb-1.7a1 → lamindb-1.8.0}/docs/track.ipynb +0 -0
  94. {lamindb-1.7a1 → lamindb-1.8.0}/docs/transfer.ipynb +0 -0
  95. {lamindb-1.7a1 → lamindb-1.8.0}/docs/wetlab.md +0 -0
  96. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/_finish.py +0 -0
  97. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/_tracked.py +0 -0
  98. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/_view.py +0 -0
  99. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/base/__init__.py +0 -0
  100. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/base/fields.py +0 -0
  101. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/base/ids.py +0 -0
  102. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/base/types.py +0 -0
  103. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/base/uids.py +0 -0
  104. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/base/users.py +0 -0
  105. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/__init__.py +0 -0
  106. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/_compat.py +0 -0
  107. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/_mapped_collection.py +0 -0
  108. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/_sync_git.py +0 -0
  109. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/_track_environment.py +0 -0
  110. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/datasets/__init__.py +0 -0
  111. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/datasets/_core.py +0 -0
  112. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/datasets/_fake.py +0 -0
  113. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/datasets/_small.py +0 -0
  114. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/datasets/mini_immuno.py +0 -0
  115. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/exceptions.py +0 -0
  116. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/loaders.py +0 -0
  117. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/storage/__init__.py +0 -0
  118. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/storage/_anndata_accessor.py +0 -0
  119. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/storage/_pyarrow_dataset.py +0 -0
  120. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/storage/_tiledbsoma.py +0 -0
  121. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/storage/_valid_suffixes.py +0 -0
  122. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/storage/_zarr.py +0 -0
  123. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/storage/objects.py +0 -0
  124. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/storage/paths.py +0 -0
  125. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/subsettings/__init__.py +0 -0
  126. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/subsettings/_annotation_settings.py +0 -0
  127. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/subsettings/_creation_settings.py +0 -0
  128. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/core/types.py +0 -0
  129. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/curators/__init__.py +0 -0
  130. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/curators/_cellxgene_schemas/__init__.py +0 -0
  131. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/curators/_cellxgene_schemas/schema_versions.csv +0 -0
  132. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/curators/_legacy.py +0 -0
  133. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/errors.py +0 -0
  134. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/examples/__init__.py +0 -0
  135. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/examples/fixtures/__init__.py +0 -0
  136. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/examples/fixtures/sheets.py +0 -0
  137. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/examples/schemas/__init__.py +0 -0
  138. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/examples/schemas/_anndata.py +0 -0
  139. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/examples/schemas/_simple.py +0 -0
  140. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/integrations/__init__.py +0 -0
  141. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/integrations/_vitessce.py +0 -0
  142. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0069_squashed.py +0 -0
  143. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0070_lamindbv1_migrate_data.py +0 -0
  144. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0071_lamindbv1_migrate_schema.py +0 -0
  145. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0072_remove_user__branch_code_remove_user_aux_and_more.py +0 -0
  146. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0073_merge_ourprojects.py +0 -0
  147. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0074_lamindbv1_part4.py +0 -0
  148. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0075_lamindbv1_part5.py +0 -0
  149. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0076_lamindbv1_part6.py +0 -0
  150. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0077_lamindbv1_part6b.py +0 -0
  151. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0078_lamindbv1_part6c.py +0 -0
  152. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0079_alter_rundata_value_json_and_more.py +0 -0
  153. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0080_polish_lamindbv1.py +0 -0
  154. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0081_revert_textfield_collection.py +0 -0
  155. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0082_alter_feature_dtype.py +0 -0
  156. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0083_alter_feature_is_type_alter_flextable_is_type_and_more.py +0 -0
  157. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0084_alter_schemafeature_feature_and_more.py +0 -0
  158. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0085_alter_feature_is_type_alter_flextable_is_type_and_more.py +0 -0
  159. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0086_various.py +0 -0
  160. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0087_rename__schemas_m2m_artifact_feature_sets_and_more.py +0 -0
  161. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0088_schema_components.py +0 -0
  162. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0089_subsequent_runs.py +0 -0
  163. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0090_runproject_project_runs.py +0 -0
  164. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0091_alter_featurevalue_options_alter_space_options_and_more.py +0 -0
  165. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0092_alter_artifactfeaturevalue_artifact_and_more.py +0 -0
  166. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0093_alter_schemacomponent_unique_together.py +0 -0
  167. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0094_writeloglock_writelogmigrationstate_and_more.py +0 -0
  168. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0095_remove_rundata_flextable.py +0 -0
  169. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0096_remove_artifact__param_values_and_more.py +0 -0
  170. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0097_remove_schemaparam_param_remove_paramvalue_param_and_more.py +0 -0
  171. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0098_alter_feature_type_alter_project_type_and_more.py +0 -0
  172. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0099_alter_writelog_seqno.py +0 -0
  173. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0100_branch_alter_artifact__branch_code_and_more.py +0 -0
  174. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0101_alter_artifact_hash_alter_feature_name_and_more.py +0 -0
  175. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0102_remove_writelog_branch_code_and_more.py +0 -0
  176. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0103_remove_writelog_migration_state_and_more.py +0 -0
  177. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0104_alter_branch_uid.py +0 -0
  178. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0105_record_unique_name.py +0 -0
  179. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0106_transfer_data_migration.py +0 -0
  180. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0107_add_schema_to_record.py +0 -0
  181. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0108_remove_record_sheet_remove_sheetproject_sheet_and_more.py +0 -0
  182. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0109_record_input_of_runs_alter_record_run_and_more.py +0 -0
  183. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0110_rename_values_artifacts_record_linked_artifacts.py +0 -0
  184. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0111_remove_record__sort_order.py +0 -0
  185. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0112_alter_recordartifact_feature_and_more.py +0 -0
  186. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0113_lower_case_branch_and_space_names.py +0 -0
  187. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/0114_alter_run__status_code.py +0 -0
  188. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/migrations/__init__.py +0 -0
  189. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/__init__.py +0 -0
  190. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/_describe.py +0 -0
  191. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/_feature_manager.py +0 -0
  192. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/_from_values.py +0 -0
  193. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/_is_versioned.py +0 -0
  194. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/_label_manager.py +0 -0
  195. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/_relations.py +0 -0
  196. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/artifact_set.py +0 -0
  197. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/can_curate.py +0 -0
  198. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/collection.py +0 -0
  199. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/has_parents.py +0 -0
  200. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/project.py +0 -0
  201. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/query_manager.py +0 -0
  202. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/query_set.py +0 -0
  203. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/record.py +0 -0
  204. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/run.py +0 -0
  205. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/save.py +0 -0
  206. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/schema.py +0 -0
  207. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/transform.py +0 -0
  208. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/models/ulabel.py +0 -0
  209. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/py.typed +0 -0
  210. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/setup/core/__init__.py +0 -0
  211. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/setup/errors/__init__.py +0 -0
  212. {lamindb-1.7a1 → lamindb-1.8.0}/lamindb/setup/types/__init__.py +0 -0
  213. {lamindb-1.7a1 → lamindb-1.8.0}/noxfile.py +0 -0
  214. {lamindb-1.7a1 → lamindb-1.8.0}/tests/conftest.py +0 -0
  215. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/_dataset_fixtures.py +0 -0
  216. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/conftest.py +0 -0
  217. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/notebooks/basic-r-notebook.Rmd.cleaned.html +0 -0
  218. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/notebooks/basic-r-notebook.Rmd.html +0 -0
  219. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/notebooks/duplicate/with-title-initialized-consecutive-finish.ipynb +0 -0
  220. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/notebooks/no-title.ipynb +0 -0
  221. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/notebooks/with-title-initialized-consecutive-finish-not-last-cell.ipynb +0 -0
  222. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/notebooks/with-title-initialized-consecutive-finish.ipynb +0 -0
  223. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/scripts/duplicate1/script-to-test-versioning.py +0 -0
  224. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/scripts/duplicate2/script-to-test-versioning.py +0 -0
  225. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/scripts/duplicate3/script-to-test-versioning.py +0 -0
  226. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/scripts/duplicate4/script-to-test-versioning.py +0 -0
  227. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/scripts/duplicate5/script-to-test-versioning.py +0 -0
  228. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/scripts/script-to-test-filename-change.py +0 -0
  229. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/scripts/script-to-test-versioning.py +0 -0
  230. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_artifact.py +0 -0
  231. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_artifact_folders.py +0 -0
  232. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_can_curate.py +0 -0
  233. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_collection.py +0 -0
  234. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_data.py +0 -0
  235. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_db.py +0 -0
  236. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_delete.py +0 -0
  237. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_describe_and_df_calls.py +0 -0
  238. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_dtype.py +0 -0
  239. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_feature.py +0 -0
  240. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_feature_label_manager.py +0 -0
  241. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_from_values.py +0 -0
  242. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_has_parents.py +0 -0
  243. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_integrity.py +0 -0
  244. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_load.py +0 -0
  245. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_manager.py +0 -0
  246. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_notebooks.py +0 -0
  247. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_queryset.py +0 -0
  248. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_record.py +0 -0
  249. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_run.py +0 -0
  250. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_save.py +0 -0
  251. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_schema.py +0 -0
  252. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_search.py +0 -0
  253. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_settings.py +0 -0
  254. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_storage.py +0 -0
  255. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_track.py +0 -0
  256. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_tracked.py +0 -0
  257. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_transform.py +0 -0
  258. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_ulabel.py +0 -0
  259. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_versioning.py +0 -0
  260. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_view.py +0 -0
  261. {lamindb-1.7a1 → lamindb-1.8.0}/tests/core/test_visibility.py +0 -0
  262. {lamindb-1.7a1 → lamindb-1.8.0}/tests/curators/conftest.py +0 -0
  263. {lamindb-1.7a1 → lamindb-1.8.0}/tests/curators/test_cat_managers.py +0 -0
  264. {lamindb-1.7a1 → lamindb-1.8.0}/tests/curators/test_curators_examples.py +0 -0
  265. {lamindb-1.7a1 → lamindb-1.8.0}/tests/curators/test_curators_multivalue.py +0 -0
  266. {lamindb-1.7a1 → lamindb-1.8.0}/tests/curators/test_cxg_curator.py +0 -0
  267. {lamindb-1.7a1 → lamindb-1.8.0}/tests/curators/test_dataframe_curators_accounting_example.py +0 -0
  268. {lamindb-1.7a1 → lamindb-1.8.0}/tests/curators/test_pert_curator.py +0 -0
  269. {lamindb-1.7a1 → lamindb-1.8.0}/tests/curators/test_records.py +0 -0
  270. {lamindb-1.7a1 → lamindb-1.8.0}/tests/permissions/conftest.py +0 -0
  271. {lamindb-1.7a1 → lamindb-1.8.0}/tests/permissions/jwt_utils.py +0 -0
  272. {lamindb-1.7a1 → lamindb-1.8.0}/tests/permissions/scripts/clean_lamin_dev.py +0 -0
  273. {lamindb-1.7a1 → lamindb-1.8.0}/tests/permissions/scripts/setup_access.py +0 -0
  274. {lamindb-1.7a1 → lamindb-1.8.0}/tests/permissions/scripts/setup_instance.py +0 -0
  275. {lamindb-1.7a1 → lamindb-1.8.0}/tests/permissions/test_permissions.py +0 -0
  276. {lamindb-1.7a1 → lamindb-1.8.0}/tests/storage/test_artifact_storage.py +0 -0
  277. {lamindb-1.7a1 → lamindb-1.8.0}/tests/storage/test_artifact_zarr.py +0 -0
  278. {lamindb-1.7a1 → lamindb-1.8.0}/tests/storage/test_cache.py +0 -0
  279. {lamindb-1.7a1 → lamindb-1.8.0}/tests/storage/test_storage_lifecycle.py +0 -0
  280. {lamindb-1.7a1 → lamindb-1.8.0}/tests/storage/test_transfer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lamindb
3
- Version: 1.7a1
3
+ Version: 1.8.0
4
4
  Summary: A data framework for biology.
5
5
  Author-email: Lamin Labs <open-source@lamin.ai>
6
6
  Requires-Python: >=3.10,<3.14
@@ -10,8 +10,8 @@ Classifier: Programming Language :: Python :: 3.11
10
10
  Classifier: Programming Language :: Python :: 3.12
11
11
  Classifier: Programming Language :: Python :: 3.13
12
12
  Requires-Dist: lamin_utils==0.15.0
13
- Requires-Dist: lamin_cli==1.5.1
14
- Requires-Dist: lamindb_setup[aws]==1.7.0
13
+ Requires-Dist: lamin_cli==1.5.5
14
+ Requires-Dist: lamindb_setup[aws]==1.8.1
15
15
  Requires-Dist: pyyaml
16
16
  Requires-Dist: pyarrow
17
17
  Requires-Dist: pandera>=0.24.0
@@ -11,7 +11,9 @@
11
11
  "cell_type": "markdown",
12
12
  "metadata": {},
13
13
  "source": [
14
- "If you want to default to keeping artifacts local in a cloud instance, enable {attr}`~lamindb.setup.core.InstanceSettings.keep_artifacts_local`."
14
+ "If you want to default to keeping artifacts local in a cloud instance, enable {attr}`~lamindb.setup.core.InstanceSettings.keep_artifacts_local`.\n",
15
+ "\n",
16
+ "Let us first create a cloud instance that woul store artifacts exclusively on S3."
15
17
  ]
16
18
  },
17
19
  {
@@ -19,7 +21,7 @@
19
21
  "execution_count": null,
20
22
  "metadata": {
21
23
  "tags": [
22
- "hide-cell"
24
+ "hide-output"
23
25
  ]
24
26
  },
25
27
  "outputs": [],
@@ -29,15 +31,10 @@
29
31
  ]
30
32
  },
31
33
  {
32
- "cell_type": "code",
33
- "execution_count": null,
34
+ "cell_type": "markdown",
34
35
  "metadata": {},
35
- "outputs": [],
36
36
  "source": [
37
- "# !pip install 'lamindb[jupyter,aws]'\n",
38
- "import lamindb as ln\n",
39
- "\n",
40
- "ln.track(\"l9lFf83aPwRc0000\")"
37
+ "Let's import lamindb and track the current notebook run."
41
38
  ]
42
39
  },
43
40
  {
@@ -45,21 +42,38 @@
45
42
  "execution_count": null,
46
43
  "metadata": {
47
44
  "tags": [
48
- "hide-cell"
45
+ "hide-output"
49
46
  ]
50
47
  },
51
48
  "outputs": [],
52
49
  "source": [
53
- "# the setting should be enabled on lamin.ai\n",
54
- "# we're temporarily setting it here only for testing purposes\n",
55
- "ln.setup.settings.instance._keep_artifacts_local = True"
50
+ "# !pip install 'lamindb[jupyter]'\n",
51
+ "import lamindb as ln\n",
52
+ "\n",
53
+ "ln.track(\"l9lFf83aPwRc0000\")"
54
+ ]
55
+ },
56
+ {
57
+ "cell_type": "markdown",
58
+ "metadata": {},
59
+ "source": [
60
+ "## Toggling setting \"keep artifacts local\""
56
61
  ]
57
62
  },
58
63
  {
59
64
  "cell_type": "markdown",
60
65
  "metadata": {},
61
66
  "source": [
62
- "You can register a managed local storage location as follows:"
67
+ "You checkmark the \"Keep artifacts local\" box on the instance settings tab.\n",
68
+ "\n",
69
+ "<img src=\"https://lamin-site-assets.s3.amazonaws.com/.lamindb/6Kt20kV5sQIFyV0Q0000.png\" width=\"400px\">"
70
+ ]
71
+ },
72
+ {
73
+ "cell_type": "markdown",
74
+ "metadata": {},
75
+ "source": [
76
+ "For the current test instance, we toggle it through the following private attribute."
63
77
  ]
64
78
  },
65
79
  {
@@ -68,14 +82,21 @@
68
82
  "metadata": {},
69
83
  "outputs": [],
70
84
  "source": [
71
- "ln.settings.storage_local = \"./my_storage_local\""
85
+ "ln.setup.settings.instance._keep_artifacts_local = True"
72
86
  ]
73
87
  },
74
88
  {
75
89
  "cell_type": "markdown",
76
90
  "metadata": {},
77
91
  "source": [
78
- "Now, you have two storage locations: one in the S3 bucket, and the other locally."
92
+ "## Create a local storage location"
93
+ ]
94
+ },
95
+ {
96
+ "cell_type": "markdown",
97
+ "metadata": {},
98
+ "source": [
99
+ "Call the following for a -- potentially pre-existing -- root path and a unique host identifier."
79
100
  ]
80
101
  },
81
102
  {
@@ -88,32 +109,26 @@
88
109
  },
89
110
  "outputs": [],
90
111
  "source": [
91
- "ln.Storage.df()"
92
- ]
93
- },
94
- {
95
- "cell_type": "markdown",
96
- "metadata": {},
97
- "source": [
98
- "## Update storage description"
112
+ "ln.Storage(root=\"./our_local_storage\", host=\"abc-institute-drive1\").save()"
99
113
  ]
100
114
  },
101
115
  {
102
116
  "cell_type": "markdown",
103
117
  "metadata": {},
104
118
  "source": [
105
- "You can add a description to the storage by using the description parameter:"
119
+ "Now, you have two storage locations: one in the S3 bucket, and the other locally."
106
120
  ]
107
121
  },
108
122
  {
109
123
  "cell_type": "code",
110
124
  "execution_count": null,
111
- "metadata": {},
125
+ "metadata": {
126
+ "tags": [
127
+ "hide-output"
128
+ ]
129
+ },
112
130
  "outputs": [],
113
131
  "source": [
114
- "storage_record = ln.Storage.get(root=ln.settings.storage_local.root)\n",
115
- "storage_record.description = \"Files stored locally in site X on server Y for reason ABC\"\n",
116
- "storage_record.save()\n",
117
132
  "ln.Storage.df()"
118
133
  ]
119
134
  },
@@ -121,14 +136,14 @@
121
136
  "cell_type": "markdown",
122
137
  "metadata": {},
123
138
  "source": [
124
- "## Use local storage"
139
+ "## Use a local storage location"
125
140
  ]
126
141
  },
127
142
  {
128
143
  "cell_type": "markdown",
129
144
  "metadata": {},
130
145
  "source": [
131
- "If you save an artifact, by default, it's stored in local storage."
146
+ "If you save an artifact in keep-artifacts-local mode, by default, it's stored in local storage."
132
147
  ]
133
148
  },
134
149
  {
@@ -142,8 +157,8 @@
142
157
  "outputs": [],
143
158
  "source": [
144
159
  "original_filepath = ln.core.datasets.file_fcs()\n",
145
- "artifact = ln.Artifact(original_filepath, description=\"My fcs file\").save()\n",
146
- "local_path = artifact.path\n",
160
+ "artifact = ln.Artifact(original_filepath, key=\"example_datasets/file1.fcs\").save()\n",
161
+ "local_path = artifact.path # local storage path\n",
147
162
  "local_path"
148
163
  ]
149
164
  },
@@ -151,7 +166,7 @@
151
166
  "cell_type": "markdown",
152
167
  "metadata": {},
153
168
  "source": [
154
- "You'll see the `.fcs` file named by the `uid` in your `.lamindb/` directory under `./my_storage_local/`:"
169
+ "You'll see the `.fcs` file named by the `uid` in your `.lamindb/` directory under `./our_local_storage/`:"
155
170
  ]
156
171
  },
157
172
  {
@@ -164,28 +179,23 @@
164
179
  },
165
180
  "outputs": [],
166
181
  "source": [
167
- "ln.settings.storage_local.root.view_tree()"
182
+ "assert artifact.path.exists()\n",
183
+ "assert artifact.path.as_posix().startswith(ln.settings.local_storage.root.as_posix())\n",
184
+ "ln.settings.local_storage.root.view_tree()"
168
185
  ]
169
186
  },
170
187
  {
171
- "cell_type": "code",
172
- "execution_count": null,
173
- "metadata": {
174
- "tags": [
175
- "hide-cell"
176
- ]
177
- },
178
- "outputs": [],
188
+ "cell_type": "markdown",
189
+ "metadata": {},
179
190
  "source": [
180
- "assert local_path.exists()\n",
181
- "assert artifact.path.as_posix().startswith(ln.settings.storage_local.root.as_posix())"
191
+ "## Pre-existing artifacts"
182
192
  ]
183
193
  },
184
194
  {
185
195
  "cell_type": "markdown",
186
196
  "metadata": {},
187
197
  "source": [
188
- "If you'd like to upload an artifact, you pass `upload=True` to the `save()` method."
198
+ "Assume you already have a file in your local storage location:"
189
199
  ]
190
200
  },
191
201
  {
@@ -198,14 +208,16 @@
198
208
  },
199
209
  "outputs": [],
200
210
  "source": [
201
- "artifact.save(upload=True)"
211
+ "file_in_local_storage = ln.core.datasets.file_bam()\n",
212
+ "file_in_local_storage.rename(\"./our_local_storage/output.bam\")\n",
213
+ "ln.UPath(\"our_local_storage/\").view_tree()"
202
214
  ]
203
215
  },
204
216
  {
205
217
  "cell_type": "markdown",
206
218
  "metadata": {},
207
219
  "source": [
208
- "You now see the artifact in the S3 bucket:"
220
+ "When registering an artifact for it, it remains where it is."
209
221
  ]
210
222
  },
211
223
  {
@@ -218,14 +230,15 @@
218
230
  },
219
231
  "outputs": [],
220
232
  "source": [
221
- "ln.setup.settings.storage.root.view_tree()"
233
+ "my_existing_file = ln.Artifact(\"./our_local_storage/output.bam\").save()\n",
234
+ "ln.UPath(\"our_local_storage/\").view_tree()"
222
235
  ]
223
236
  },
224
237
  {
225
238
  "cell_type": "markdown",
226
239
  "metadata": {},
227
240
  "source": [
228
- "And it's no longer present in local storage:"
241
+ "The storage path of the artifact matches the pre-existing file:"
229
242
  ]
230
243
  },
231
244
  {
@@ -238,38 +251,21 @@
238
251
  },
239
252
  "outputs": [],
240
253
  "source": [
241
- "ln.setup.settings.instance.storage_local.root.view_tree()"
242
- ]
243
- },
244
- {
245
- "cell_type": "code",
246
- "execution_count": null,
247
- "metadata": {
248
- "tags": [
249
- "hide-cell"
250
- ]
251
- },
252
- "outputs": [],
253
- "source": [
254
- "assert artifact.path.exists()\n",
255
- "assert not local_path.exists()\n",
256
- "assert artifact.path.as_posix().startswith(\n",
257
- " ln.setup.settings.instance.storage.root.as_posix()\n",
258
- ")"
254
+ "my_existing_file.path"
259
255
  ]
260
256
  },
261
257
  {
262
258
  "cell_type": "markdown",
263
259
  "metadata": {},
264
260
  "source": [
265
- "## Direct upload"
261
+ "## Switching between local storage locations"
266
262
  ]
267
263
  },
268
264
  {
269
265
  "cell_type": "markdown",
270
266
  "metadata": {},
271
267
  "source": [
272
- "You can also directly upload a file by passing `upload=True`:"
268
+ "You might have several local storage locations. Here is how you can switch between them."
273
269
  ]
274
270
  },
275
271
  {
@@ -282,29 +278,32 @@
282
278
  },
283
279
  "outputs": [],
284
280
  "source": [
285
- "filepath = ln.core.datasets.file_mini_csv()\n",
286
- "artifact2 = ln.Artifact(filepath, description=\"My csv file\").save(upload=True)\n",
287
- "artifact2.path"
281
+ "ln.Storage(root=\"./our_local_storage2\", host=\"abc-institute-drive1\").save()\n",
282
+ "ln.settings.local_storage = \"./our_local_storage2\" # switch to the new storage location"
288
283
  ]
289
284
  },
290
285
  {
291
286
  "cell_type": "markdown",
292
287
  "metadata": {},
293
288
  "source": [
294
- "Now we have two files on S3:"
289
+ "Ingest a file into the new local storage location."
295
290
  ]
296
291
  },
297
292
  {
298
293
  "cell_type": "code",
299
294
  "execution_count": null,
300
- "metadata": {
301
- "tags": [
302
- "hide-output"
303
- ]
304
- },
295
+ "metadata": {},
305
296
  "outputs": [],
306
297
  "source": [
307
- "ln.Artifact.df(include=\"storage__root\")"
298
+ "filepath = ln.core.datasets.file_fastq()\n",
299
+ "artifact3 = ln.Artifact(filepath, key=\"example_datasets/file.fastq.gz\").save()"
300
+ ]
301
+ },
302
+ {
303
+ "cell_type": "markdown",
304
+ "metadata": {},
305
+ "source": [
306
+ "Inspect where all the files are."
308
307
  ]
309
308
  },
310
309
  {
@@ -312,147 +311,137 @@
312
311
  "execution_count": null,
313
312
  "metadata": {
314
313
  "tags": [
315
- "hide-cell"
314
+ "hide-output"
316
315
  ]
317
316
  },
318
317
  "outputs": [],
319
318
  "source": [
320
- "assert artifact2.path.exists()"
319
+ "ln.Artifact.df(include=[\"storage__root\", \"storage__region\"])"
321
320
  ]
322
321
  },
323
322
  {
324
323
  "cell_type": "markdown",
325
324
  "metadata": {},
326
325
  "source": [
327
- "## Pre-existing artifacts"
326
+ "## Upload a local artifact to the cloud"
328
327
  ]
329
328
  },
330
329
  {
331
330
  "cell_type": "markdown",
332
331
  "metadata": {},
333
332
  "source": [
334
- "Assume we already have a file in our registered local storage location:"
333
+ "If you'd like to upload an artifact to the cloud storage location to more easily share it or view it through web applications, you pass `upload=True` to the `save()` method."
335
334
  ]
336
335
  },
337
336
  {
338
337
  "cell_type": "code",
339
338
  "execution_count": null,
340
- "metadata": {
341
- "tags": [
342
- "hide-input"
343
- ]
344
- },
339
+ "metadata": {},
345
340
  "outputs": [],
346
341
  "source": [
347
- "file_in_local_storage = ln.core.datasets.file_bam()\n",
348
- "file_in_local_storage.rename(\"./my_storage_local/output.bam\")\n",
349
- "ln.UPath(\"my_storage_local/\").view_tree()"
342
+ "artifact.save(upload=True)"
350
343
  ]
351
344
  },
352
345
  {
353
346
  "cell_type": "markdown",
354
347
  "metadata": {},
355
348
  "source": [
356
- "If we create an artifact from it, it remains where it is during saving:"
349
+ "You now see the artifact in the S3 bucket:"
357
350
  ]
358
351
  },
359
352
  {
360
353
  "cell_type": "code",
361
354
  "execution_count": null,
362
- "metadata": {
363
- "tags": [
364
- "hide-output"
365
- ]
366
- },
355
+ "metadata": {},
367
356
  "outputs": [],
368
357
  "source": [
369
- "my_existing_file = ln.Artifact(\n",
370
- " \"./my_storage_local/output.bam\", description=\"my existing file\"\n",
371
- ").save()\n",
372
- "ln.UPath(\"my_storage_local/\").view_tree()"
358
+ "ln.settings.storage.root.view_tree()"
373
359
  ]
374
360
  },
375
361
  {
376
362
  "cell_type": "markdown",
377
363
  "metadata": {},
378
364
  "source": [
379
- "The storage path of the artifact is constructed using `key` because `key_is_virtual=False`:"
365
+ "And it's no longer present in local storage:"
380
366
  ]
381
367
  },
382
368
  {
383
369
  "cell_type": "code",
384
370
  "execution_count": null,
385
- "metadata": {
386
- "tags": [
387
- "hide-output"
388
- ]
389
- },
371
+ "metadata": {},
390
372
  "outputs": [],
391
373
  "source": [
392
- "my_existing_file"
374
+ "assert artifact.path.exists()\n",
375
+ "assert not local_path.exists()\n",
376
+ "assert artifact.path.as_posix().startswith(ln.settings.storage.root.as_posix())\n",
377
+ "ln.settings.local_storage.root.view_tree()"
378
+ ]
379
+ },
380
+ {
381
+ "cell_type": "markdown",
382
+ "metadata": {},
383
+ "source": [
384
+ "## Upload directly to the cloud"
393
385
  ]
394
386
  },
395
387
  {
396
388
  "cell_type": "markdown",
397
389
  "metadata": {},
398
390
  "source": [
399
- "However, if we decide to upload the artifact, we'll use the `uid` for constructing the storage path and switch `key_is_virtual=True`:"
391
+ "You can also directly upload via `upload=True`:"
400
392
  ]
401
393
  },
402
394
  {
403
395
  "cell_type": "code",
404
396
  "execution_count": null,
405
- "metadata": {
406
- "tags": [
407
- "hide-output"
408
- ]
409
- },
397
+ "metadata": {},
410
398
  "outputs": [],
411
399
  "source": [
412
- "my_existing_file.save(upload=True)"
400
+ "filepath = ln.core.datasets.file_mini_csv()\n",
401
+ "artifact2 = ln.Artifact(filepath, key=\"example_datasets/mini.csv\").save(upload=True)\n",
402
+ "artifact2.path"
413
403
  ]
414
404
  },
415
405
  {
416
406
  "cell_type": "markdown",
417
407
  "metadata": {},
418
408
  "source": [
419
- "Here is the remote path of the artifact:"
409
+ "Now we have two files on S3:"
420
410
  ]
421
411
  },
422
412
  {
423
413
  "cell_type": "code",
424
414
  "execution_count": null,
425
- "metadata": {
426
- "tags": [
427
- "hide-output"
428
- ]
429
- },
415
+ "metadata": {},
430
416
  "outputs": [],
431
417
  "source": [
432
- "my_existing_file.path"
418
+ "ln.Artifact.df(include=\"storage__root\")"
433
419
  ]
434
420
  },
435
421
  {
436
422
  "cell_type": "markdown",
437
423
  "metadata": {},
438
424
  "source": [
439
- "And here are the contents of the storage locations:"
425
+ "## Update storage description"
426
+ ]
427
+ },
428
+ {
429
+ "cell_type": "markdown",
430
+ "metadata": {},
431
+ "source": [
432
+ "You can add a description to the storage location by using the `description` field."
440
433
  ]
441
434
  },
442
435
  {
443
436
  "cell_type": "code",
444
437
  "execution_count": null,
445
- "metadata": {
446
- "tags": [
447
- "hide-output"
448
- ]
449
- },
438
+ "metadata": {},
450
439
  "outputs": [],
451
440
  "source": [
452
- "# the path on S3\n",
453
- "ln.setup.settings.storage.root.view_tree()\n",
454
- "# the local path\n",
455
- "ln.setup.settings.instance.storage_local.root.view_tree()"
441
+ "storage_record = ln.Storage.get(root__endswith=\"our_local_storage\")\n",
442
+ "storage_record.description = \"Our shared directory for project X\"\n",
443
+ "storage_record.save()\n",
444
+ "ln.Storage.df()"
456
445
  ]
457
446
  },
458
447
  {
@@ -477,7 +466,8 @@
477
466
  "source": [
478
467
  "artifact.delete(permanent=True)\n",
479
468
  "artifact2.delete(permanent=True)\n",
480
- "my_existing_file.delete(permanent=True)"
469
+ "artifact3.delete(permanent=True)\n",
470
+ "my_existing_file.delete(permanent=True, storage=False)"
481
471
  ]
482
472
  },
483
473
  {
@@ -503,7 +493,7 @@
503
493
  ],
504
494
  "metadata": {
505
495
  "kernelspec": {
506
- "display_name": "py310",
496
+ "display_name": "py312",
507
497
  "language": "python",
508
498
  "name": "python3"
509
499
  },
@@ -517,7 +507,7 @@
517
507
  "name": "python",
518
508
  "nbconvert_exporter": "python",
519
509
  "pygments_lexer": "ipython3",
520
- "version": "3.10.13"
510
+ "version": "3.12.8"
521
511
  }
522
512
  },
523
513
  "nbformat": 4,
@@ -108,7 +108,7 @@ Backwards compatibility.
108
108
 
109
109
  # ruff: noqa: I001
110
110
  # denote a release candidate for 0.1.0 with 0.1rc1, 0.1a1, 0.1b1, etc.
111
- __version__ = "1.7a1"
111
+ __version__ = "1.8.0"
112
112
 
113
113
  import warnings
114
114
 
@@ -17,20 +17,18 @@ from lamin_utils import logger
17
17
  from lamindb_setup.core import deprecated
18
18
  from lamindb_setup.core.hashing import hash_file
19
19
 
20
- from lamindb.base import ids
21
- from lamindb.base.ids import base62_12
22
- from lamindb.models import Run, Transform, format_field_value
23
-
24
- from ..core._settings import settings
20
+ from ..base.ids import base62_12
25
21
  from ..errors import (
26
22
  InvalidArgument,
27
23
  TrackNotCalled,
28
24
  UpdateContext,
29
25
  )
26
+ from ..models import Run, Transform, format_field_value
30
27
  from ..models._is_versioned import bump_version as bump_version_function
31
28
  from ..models._is_versioned import (
32
29
  increment_base62,
33
30
  )
31
+ from ._settings import is_read_only_connection, settings
34
32
  from ._sync_git import get_transform_reference_from_git_repo
35
33
  from ._track_environment import track_python_environment
36
34
 
@@ -334,8 +332,8 @@ class Context:
334
332
  Args:
335
333
  transform: A transform (stem) `uid` (or record). If `None`, auto-creates a `transform` with its `uid`.
336
334
  project: A project (or its `name` or `uid`) for labeling entities.
337
- space: A restricted space (or its `name` or `uid`) in which to store artifacts, collections, transforms, and runs.
338
- Default: the `"All"` space.
335
+ space: A restricted space (or its `name` or `uid`) in which to store entities.
336
+ Default: the `"all"` space. Note that bionty entities ignore this setting and always get written to the `"all"` space.
339
337
  If you want to manually move entities to a different space, set the `.space` field (:doc:`docs:access`).
340
338
  branch: A branch (or its `name` or `uid`) on which to store records.
341
339
  params: A dictionary of parameters to track for the run.
@@ -365,10 +363,8 @@ class Context:
365
363
  save_context_core,
366
364
  )
367
365
 
368
- instance_settings = ln_setup.settings.instance
369
366
  # similar logic here: https://github.com/laminlabs/lamindb/pull/2527
370
- # TODO: refactor upon new access management
371
- if instance_settings.dialect == "postgresql" and "read" in instance_settings.db:
367
+ if is_read_only_connection():
372
368
  logger.warning("skipping track(), connected in read-only mode")
373
369
  return None
374
370
  if project is None:
@@ -856,7 +852,7 @@ class Context:
856
852
  and not transform_was_saved
857
853
  ):
858
854
  raise UpdateContext(
859
- f'{transform.created_by.name} ({transform.created_by.handle}) already works on this draft {transform.type}.\n\nPlease create a revision via `ln.track("{uid[:-4]}{increment_base62(uid[-4:])}")` or a new transform with a *different* key and `ln.track("{ids.base62_12()}0000")`.'
855
+ f'{transform.created_by.name} ({transform.created_by.handle}) already works on this draft {transform.type}.\n\nPlease create a revision via `ln.track("{uid[:-4]}{increment_base62(uid[-4:])}")` or a new transform with a *different* key and `ln.track("{base62_12()}0000")`.'
860
856
  )
861
857
  # check whether transform source code was already saved
862
858
  if transform_was_saved: