lamindb 0.76.7__py3-none-any.whl → 0.76.8__py3-none-any.whl
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.
- lamindb/__init__.py +113 -113
- lamindb/_artifact.py +1205 -1178
- lamindb/_can_validate.py +579 -579
- lamindb/_collection.py +387 -387
- lamindb/_curate.py +1601 -1601
- lamindb/_feature.py +155 -155
- lamindb/_feature_set.py +242 -242
- lamindb/_filter.py +23 -23
- lamindb/_finish.py +256 -256
- lamindb/_from_values.py +382 -382
- lamindb/_is_versioned.py +40 -40
- lamindb/_parents.py +476 -476
- lamindb/_query_manager.py +125 -125
- lamindb/_query_set.py +362 -362
- lamindb/_record.py +649 -649
- lamindb/_run.py +57 -57
- lamindb/_save.py +308 -295
- lamindb/_storage.py +14 -14
- lamindb/_transform.py +127 -127
- lamindb/_ulabel.py +56 -56
- lamindb/_utils.py +9 -9
- lamindb/_view.py +72 -72
- lamindb/core/__init__.py +94 -94
- lamindb/core/_context.py +574 -574
- lamindb/core/_data.py +438 -438
- lamindb/core/_feature_manager.py +867 -867
- lamindb/core/_label_manager.py +253 -253
- lamindb/core/_mapped_collection.py +597 -597
- lamindb/core/_settings.py +187 -187
- lamindb/core/_sync_git.py +138 -138
- lamindb/core/_track_environment.py +27 -27
- lamindb/core/datasets/__init__.py +59 -59
- lamindb/core/datasets/_core.py +571 -571
- lamindb/core/datasets/_fake.py +36 -36
- lamindb/core/exceptions.py +90 -77
- lamindb/core/fields.py +12 -12
- lamindb/core/loaders.py +164 -164
- lamindb/core/schema.py +56 -56
- lamindb/core/storage/__init__.py +25 -25
- lamindb/core/storage/_anndata_accessor.py +740 -740
- lamindb/core/storage/_anndata_sizes.py +41 -41
- lamindb/core/storage/_backed_access.py +98 -98
- lamindb/core/storage/_tiledbsoma.py +204 -204
- lamindb/core/storage/_valid_suffixes.py +21 -21
- lamindb/core/storage/_zarr.py +110 -110
- lamindb/core/storage/objects.py +62 -62
- lamindb/core/storage/paths.py +172 -141
- lamindb/core/subsettings/__init__.py +12 -12
- lamindb/core/subsettings/_creation_settings.py +38 -38
- lamindb/core/subsettings/_transform_settings.py +21 -21
- lamindb/core/types.py +19 -19
- lamindb/core/versioning.py +158 -158
- lamindb/integrations/__init__.py +12 -12
- lamindb/integrations/_vitessce.py +107 -107
- lamindb/setup/__init__.py +14 -14
- lamindb/setup/core/__init__.py +4 -4
- {lamindb-0.76.7.dist-info → lamindb-0.76.8.dist-info}/LICENSE +201 -201
- {lamindb-0.76.7.dist-info → lamindb-0.76.8.dist-info}/METADATA +3 -3
- lamindb-0.76.8.dist-info/RECORD +60 -0
- {lamindb-0.76.7.dist-info → lamindb-0.76.8.dist-info}/WHEEL +1 -1
- lamindb-0.76.7.dist-info/RECORD +0 -60
@@ -1,27 +1,27 @@
|
|
1
|
-
from __future__ import annotations
|
2
|
-
|
3
|
-
import subprocess
|
4
|
-
from typing import TYPE_CHECKING
|
5
|
-
|
6
|
-
import lamindb_setup as ln_setup
|
7
|
-
from lamin_utils import logger
|
8
|
-
|
9
|
-
if TYPE_CHECKING:
|
10
|
-
from lnschema_core.models import Run
|
11
|
-
|
12
|
-
|
13
|
-
def track_environment(run: Run) -> None:
|
14
|
-
filepath = ln_setup.settings.storage.cache_dir / f"run_env_pip_{run.uid}.txt"
|
15
|
-
# create a requirements.txt
|
16
|
-
# we don't create a conda environment.yml mostly for its slowness
|
17
|
-
try:
|
18
|
-
with open(filepath, "w") as f:
|
19
|
-
result = subprocess.run(
|
20
|
-
["pip", "freeze"],
|
21
|
-
stdout=f,
|
22
|
-
)
|
23
|
-
except OSError as e:
|
24
|
-
result = None
|
25
|
-
logger.warning(f"could not run pip freeze with error {e}")
|
26
|
-
if result is not None and result.returncode == 0:
|
27
|
-
logger.info(f"tracked pip freeze > {str(filepath)}")
|
1
|
+
from __future__ import annotations
|
2
|
+
|
3
|
+
import subprocess
|
4
|
+
from typing import TYPE_CHECKING
|
5
|
+
|
6
|
+
import lamindb_setup as ln_setup
|
7
|
+
from lamin_utils import logger
|
8
|
+
|
9
|
+
if TYPE_CHECKING:
|
10
|
+
from lnschema_core.models import Run
|
11
|
+
|
12
|
+
|
13
|
+
def track_environment(run: Run) -> None:
|
14
|
+
filepath = ln_setup.settings.storage.cache_dir / f"run_env_pip_{run.uid}.txt"
|
15
|
+
# create a requirements.txt
|
16
|
+
# we don't create a conda environment.yml mostly for its slowness
|
17
|
+
try:
|
18
|
+
with open(filepath, "w") as f:
|
19
|
+
result = subprocess.run(
|
20
|
+
["pip", "freeze"],
|
21
|
+
stdout=f,
|
22
|
+
)
|
23
|
+
except OSError as e:
|
24
|
+
result = None
|
25
|
+
logger.warning(f"could not run pip freeze with error {e}")
|
26
|
+
if result is not None and result.returncode == 0:
|
27
|
+
logger.info(f"tracked pip freeze > {str(filepath)}")
|
@@ -1,59 +1,59 @@
|
|
1
|
-
"""Test collections.
|
2
|
-
|
3
|
-
.. autosummary::
|
4
|
-
:toctree: .
|
5
|
-
|
6
|
-
file_fcs
|
7
|
-
file_fcs_alpert19
|
8
|
-
file_tsv_rnaseq_nfcore_salmon_merged_gene_counts
|
9
|
-
file_jpg_paradisi05
|
10
|
-
file_tiff_suo22
|
11
|
-
file_fastq
|
12
|
-
file_bam
|
13
|
-
file_mini_csv
|
14
|
-
dir_scrnaseq_cellranger
|
15
|
-
dir_iris_images
|
16
|
-
df_iris
|
17
|
-
df_iris_in_meter
|
18
|
-
df_iris_in_meter_study1
|
19
|
-
df_iris_in_meter_study2
|
20
|
-
anndata_mouse_sc_lymph_node
|
21
|
-
anndata_human_immune_cells
|
22
|
-
anndata_pbmc68k_reduced
|
23
|
-
anndata_file_pbmc68k_test
|
24
|
-
anndata_pbmc3k_processed
|
25
|
-
anndata_with_obs
|
26
|
-
anndata_suo22_Visium10X
|
27
|
-
mudata_papalexi21_subset
|
28
|
-
schmidt22_crispra_gws_IFNG
|
29
|
-
schmidt22_perturbseq
|
30
|
-
fake_bio_notebook_titles
|
31
|
-
"""
|
32
|
-
|
33
|
-
from ._core import (
|
34
|
-
anndata_file_pbmc68k_test,
|
35
|
-
anndata_human_immune_cells,
|
36
|
-
anndata_mouse_sc_lymph_node,
|
37
|
-
anndata_pbmc3k_processed,
|
38
|
-
anndata_pbmc68k_reduced,
|
39
|
-
anndata_suo22_Visium10X,
|
40
|
-
anndata_with_obs,
|
41
|
-
df_iris,
|
42
|
-
df_iris_in_meter,
|
43
|
-
df_iris_in_meter_study1,
|
44
|
-
df_iris_in_meter_study2,
|
45
|
-
dir_iris_images,
|
46
|
-
dir_scrnaseq_cellranger,
|
47
|
-
file_bam,
|
48
|
-
file_fastq,
|
49
|
-
file_fcs,
|
50
|
-
file_fcs_alpert19,
|
51
|
-
file_jpg_paradisi05,
|
52
|
-
file_mini_csv,
|
53
|
-
file_tiff_suo22,
|
54
|
-
file_tsv_rnaseq_nfcore_salmon_merged_gene_counts,
|
55
|
-
mudata_papalexi21_subset,
|
56
|
-
schmidt22_crispra_gws_IFNG,
|
57
|
-
schmidt22_perturbseq,
|
58
|
-
)
|
59
|
-
from ._fake import fake_bio_notebook_titles
|
1
|
+
"""Test collections.
|
2
|
+
|
3
|
+
.. autosummary::
|
4
|
+
:toctree: .
|
5
|
+
|
6
|
+
file_fcs
|
7
|
+
file_fcs_alpert19
|
8
|
+
file_tsv_rnaseq_nfcore_salmon_merged_gene_counts
|
9
|
+
file_jpg_paradisi05
|
10
|
+
file_tiff_suo22
|
11
|
+
file_fastq
|
12
|
+
file_bam
|
13
|
+
file_mini_csv
|
14
|
+
dir_scrnaseq_cellranger
|
15
|
+
dir_iris_images
|
16
|
+
df_iris
|
17
|
+
df_iris_in_meter
|
18
|
+
df_iris_in_meter_study1
|
19
|
+
df_iris_in_meter_study2
|
20
|
+
anndata_mouse_sc_lymph_node
|
21
|
+
anndata_human_immune_cells
|
22
|
+
anndata_pbmc68k_reduced
|
23
|
+
anndata_file_pbmc68k_test
|
24
|
+
anndata_pbmc3k_processed
|
25
|
+
anndata_with_obs
|
26
|
+
anndata_suo22_Visium10X
|
27
|
+
mudata_papalexi21_subset
|
28
|
+
schmidt22_crispra_gws_IFNG
|
29
|
+
schmidt22_perturbseq
|
30
|
+
fake_bio_notebook_titles
|
31
|
+
"""
|
32
|
+
|
33
|
+
from ._core import (
|
34
|
+
anndata_file_pbmc68k_test,
|
35
|
+
anndata_human_immune_cells,
|
36
|
+
anndata_mouse_sc_lymph_node,
|
37
|
+
anndata_pbmc3k_processed,
|
38
|
+
anndata_pbmc68k_reduced,
|
39
|
+
anndata_suo22_Visium10X,
|
40
|
+
anndata_with_obs,
|
41
|
+
df_iris,
|
42
|
+
df_iris_in_meter,
|
43
|
+
df_iris_in_meter_study1,
|
44
|
+
df_iris_in_meter_study2,
|
45
|
+
dir_iris_images,
|
46
|
+
dir_scrnaseq_cellranger,
|
47
|
+
file_bam,
|
48
|
+
file_fastq,
|
49
|
+
file_fcs,
|
50
|
+
file_fcs_alpert19,
|
51
|
+
file_jpg_paradisi05,
|
52
|
+
file_mini_csv,
|
53
|
+
file_tiff_suo22,
|
54
|
+
file_tsv_rnaseq_nfcore_salmon_merged_gene_counts,
|
55
|
+
mudata_papalexi21_subset,
|
56
|
+
schmidt22_crispra_gws_IFNG,
|
57
|
+
schmidt22_perturbseq,
|
58
|
+
)
|
59
|
+
from ._fake import fake_bio_notebook_titles
|