lamindb 0.48a2__py3-none-any.whl → 0.48.1__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.
@@ -6,7 +6,7 @@ from typing import Union
6
6
  import anndata as ad
7
7
  import fsspec
8
8
  import pandas as pd
9
- from lamin_logger import logger
9
+ from lamin_utils import logger
10
10
  from lamindb_setup import settings
11
11
  from lamindb_setup.dev import StorageSettings
12
12
  from lamindb_setup.dev.upath import UPath, infer_filesystem
@@ -59,6 +59,8 @@ def attempt_accessing_path(file: File, storage_key: str):
59
59
 
60
60
  # add type annotations back asap when re-organizing the module
61
61
  def filepath_from_file(file: File):
62
+ if hasattr(file, "_local_filepath") and file._local_filepath is not None:
63
+ return file._local_filepath.resolve()
62
64
  storage_key = auto_storage_key_from_file(file)
63
65
  path = attempt_accessing_path(file, storage_key)
64
66
  return path
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: lamindb
3
- Version: 0.48a2
3
+ Version: 0.48.1
4
4
  Summary: LaminDB: Manage R&D data & analyses.
5
5
  Author-email: Lamin Labs <laminlabs@gmail.com>
6
6
  Requires-Python: >=3.8
@@ -8,9 +8,9 @@ Description-Content-Type: text/markdown
8
8
  Classifier: Programming Language :: Python :: 3.8
9
9
  Classifier: Programming Language :: Python :: 3.9
10
10
  Classifier: Programming Language :: Python :: 3.10
11
- Requires-Dist: lnschema_core==0.39.0
12
- Requires-Dist: lamindb_setup==0.49.0
13
- Requires-Dist: lamin_logger==0.8.2
11
+ Requires-Dist: lnschema_core==0.42.2
12
+ Requires-Dist: lamindb_setup==0.49.1
13
+ Requires-Dist: lamin_utils==0.9.3
14
14
  Requires-Dist: erdiagram>=0.1.2
15
15
  Requires-Dist: rapidfuzz
16
16
  Requires-Dist: pydantic[dotenv]
@@ -25,7 +25,7 @@ Requires-Dist: botocore==1.29.76 ; extra == "aws"
25
25
  Requires-Dist: urllib3<2 ; extra == "aws"
26
26
  Requires-Dist: boto3==1.26.76 ; extra == "aws"
27
27
  Requires-Dist: fsspec[s3]==2023.5.0 ; extra == "aws"
28
- Requires-Dist: lnschema_bionty==0.27.3 ; extra == "bionty"
28
+ Requires-Dist: lnschema_bionty==0.28.2 ; extra == "bionty"
29
29
  Requires-Dist: pre-commit ; extra == "dev"
30
30
  Requires-Dist: nox ; extra == "dev"
31
31
  Requires-Dist: laminci>=0.3 ; extra == "dev"
@@ -73,7 +73,7 @@ Update 2023-06-14:
73
73
 
74
74
  ## Introduction
75
75
 
76
- LaminDB is a free & open-source Python library to:
76
+ LaminDB is an open-source Python library to:
77
77
 
78
78
  - Manage files & datasets while tracking provenance across pipelines, notebooks & app uploads.
79
79
  - Manage biological registries, ontologies, features & schemas.
@@ -83,7 +83,7 @@ LaminDB is a free & open-source Python library to:
83
83
 
84
84
  LaminApp is a data management app built on LaminDB. If LaminDB ~ git, LaminApp ~ GitHub.
85
85
 
86
- LaminApp, support, code templates & auto-dispatched integration tests for a BioTech data & analytics platform are currently only available on an enterprise plan. LaminApp is available for your cloud or AWS infrastructure or hosted by us.
86
+ LaminApp, support, code templates & auto-dispatched integration tests for a BioTech data & analytics platform are currently only available on an enterprise plan. LaminApp is available for your cloud infrastructure or hosted by us.
87
87
 
88
88
  ## Quickstart
89
89
 
@@ -257,7 +257,7 @@ pip install lamindb # basic data management
257
257
  You can configure the installation using `extras`, e.g.,
258
258
 
259
259
  ```shell
260
- pip install lamindb[jupyter,bionty,fcs,aws]
260
+ pip install 'lamindb[jupyter,bionty,fcs,aws]'
261
261
  ```
262
262
 
263
263
  Supported `extras` are:
@@ -313,6 +313,8 @@ LaminDB consists of the `lamindb` Python package (repository [here](https://gith
313
313
  - [lnschema-bionty](https://github.com/laminlabs/lnschema-bionty): Bionty schema, ORMs that are coupled to Bionty's entities.
314
314
  - [lnschema-lamin1](https://github.com/laminlabs/lnschema-lamin1): Exemplary configured schema to track samples, treatments, etc.
315
315
  - [nbproject](https://github.com/laminlabs/nbproject): Parse metadata from Jupyter notebooks.
316
+ - [lamin-utils](https://github.com/laminlabs/lamin-utils): Utilities for LaminDB and Bionty.
317
+ - [readfcs](https://github.com/laminlabs/readfcs): FCS file reader.
316
318
 
317
319
  LaminHub & LaminApp are not open-sourced, and neither are templates that model lab operations.
318
320
 
@@ -0,0 +1,42 @@
1
+ lamindb/__init__.py,sha256=2z4YI7b6UvGZHwooeAkDKiCVDpQ5TkxRK62EDLT9iMA,2647
2
+ lamindb/_context.py,sha256=lRGju9hB_rqaSAtIFY28kIciPSxy9yG86frdIBI1bBc,17875
3
+ lamindb/_dataset.py,sha256=nR1cGJZmNEoiATECFEBMKskk5ynP46ODejvSoOLH_hA,5546
4
+ lamindb/_delete.py,sha256=Jzb0sTlpdNDMa90ORMFiPbX0d-GhZsjmobQFc1miuJ8,1877
5
+ lamindb/_feature.py,sha256=CNSZpnMX25JX5C11ie6GPAvwPiKzd7EYhLZ9Uk1HEWk,4043
6
+ lamindb/_feature_manager.py,sha256=EaIUaFa67VyIJZ1u6ncPfiCzJkGNKmt2RZ9P3b_tzUA,6713
7
+ lamindb/_feature_set.py,sha256=zkhCuH33PgTc3-zsWT7XlJcxIf7fBv7OI4n8R8cS_8I,6747
8
+ lamindb/_file.py,sha256=sKCkAg0IMm0M4f0FwZhBKmgRUZPVN97vvwakicAp6oM,32815
9
+ lamindb/_from_values.py,sha256=bbahbzm18yLam3LC_rguX7wFaBX8KYG3So6BrPcvJzI,12106
10
+ lamindb/_label.py,sha256=taBj95rOrj56xQhjKN04E4FA1qWtsKZbCzC5OGLcIPA,2771
11
+ lamindb/_logger.py,sha256=Q9ugUnZE4EwH0N6qFMG2HlILmu-SArnEEy-nafTPjRg,47
12
+ lamindb/_manager.py,sha256=x6-rRsFlPHL1VAN_mipfNKInY_E6E-M28Q8xn4fphUo,1895
13
+ lamindb/_orm.py,sha256=AHia6AzRKLldg6n1emm02e9BOFGTbTv1qy-tdMJjWdY,23727
14
+ lamindb/_queryset.py,sha256=hhToC5NcKS2PF59jxpdbsA16VBg1oVqVeMzWEFQXQRE,9713
15
+ lamindb/_save.py,sha256=ZgV5qXBKLf84U0ssCS8z19bkIsh9SgjcJe38-laKlY8,9004
16
+ lamindb/_select.py,sha256=w-a_vOLBm-HFIfDhtLJd9ieeU-V8vn16EQ2QlgU0jyA,325
17
+ lamindb/_transform.py,sha256=K-Y37UqQPu06lsA3Jfnkyt5dssRpuMnpCDDHDbT40Z4,1251
18
+ lamindb/_view.py,sha256=V5zatnXT40UmcRQx1ZBxyRJUnIqTv_iEelv4Tli3WyI,2074
19
+ lamindb/types.py,sha256=svg5S_aynuGfbEOsbmqkR_gF9d9YMzfOkcvGN37Rzvg,232
20
+ lamindb/dev/__init__.py,sha256=JYmmgCbPdYNGL6J4aXxWd988su__uFAScRppvLsOzLo,431
21
+ lamindb/dev/_settings.py,sha256=2mV4K29PZaf1FVM5XbMZD85_1wSvHc3iF20VSBRsFKY,2842
22
+ lamindb/dev/_view_parents.py,sha256=IgW2fSwgViSJPIZhloW76pWvvljJ07Ev7Y1xl3ixF1E,7844
23
+ lamindb/dev/hashing.py,sha256=oYHDSEjINsmDYgCLasnhh_VHbB1dLag27ufVUwDgLyQ,1385
24
+ lamindb/dev/utils.py,sha256=LGdiW4k3GClLz65vKAVRkL6Tw-Gkx9DWAdez1jyA5bE,428
25
+ lamindb/dev/datasets/__init__.py,sha256=ZVnWS5LhUjzrIe_v81hlqoCzgi_gDiV-W9T_rnqTuXo,1215
26
+ lamindb/dev/datasets/_core.py,sha256=NAjisahI6C7GaZfIvmaIl_MTgvin-1NJAjxSG-EZbUA,11767
27
+ lamindb/dev/datasets/_fake.py,sha256=S8mNho-oSh1M9x9oOSsUBLLHmBAegsOLlFk6LnF81EA,942
28
+ lamindb/dev/storage/__init__.py,sha256=zFr8mpH1c3fzaQMYMwoLU9-zIMQ7laiPn5YDHDdFL5Y,424
29
+ lamindb/dev/storage/_anndata_sizes.py,sha256=0XVzA6AQeVGPaGPrhGusKyxFgFjeo3qSN29hxb8D5E8,993
30
+ lamindb/dev/storage/_backed_access.py,sha256=V7fhzx2R41ps91T0zzTLVN3x7wUuMZOxxMF_0PoJjxI,18695
31
+ lamindb/dev/storage/_zarr.py,sha256=7W1Jos1QOOF3f41uML_arQoDTNPZVpRyP2m3SLWaCAo,2766
32
+ lamindb/dev/storage/file.py,sha256=hO3t8nUncrUhSHtOdgvtfOAGnUJ2C9IRqPeq1TvFG0o,5978
33
+ lamindb/dev/storage/object.py,sha256=x8sy23WqkGir2sg2c3AngQPgv0RbErEA6cpvVN0Zc4I,945
34
+ lamindb/schema/__init__.py,sha256=PznznlFvbeNSZKpn1RS6Gv0JMXFkLmU2_ej_1hVLSTs,796
35
+ lamindb/schema/_core.py,sha256=nWR3X_rNd1AbWw3naMiBi8ppAEpqIDyEYqM54feRB_s,766
36
+ lamindb/setup/__init__.py,sha256=8-0F2C4Glx23-b8-D_1CBGgRBM5PppVhazhoXZYOLsg,275
37
+ lamindb/setup/dev/__init__.py,sha256=iD0f2lx_Hgp-udkiPGal7si5waJSOgvnG6Id-g1mMOY,213
38
+ lamindb-0.48.1.dist-info/entry_points.txt,sha256=MioM8vSpKwXxY3geNBwjo1wnwy1l15WjJYlI3lpKuZI,53
39
+ lamindb-0.48.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
40
+ lamindb-0.48.1.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
41
+ lamindb-0.48.1.dist-info/METADATA,sha256=hV5390-kWv89OW9gmlWPCNQ3-t2ynnezhp18bhh3klM,10843
42
+ lamindb-0.48.1.dist-info/RECORD,,
lamindb/_category.py DELETED
@@ -1,42 +0,0 @@
1
- from typing import List
2
-
3
- from lamindb_setup.dev._docs import doc_args
4
- from lnschema_core import Category, Feature
5
- from lnschema_core.types import ListLike
6
-
7
- from lamindb.dev.utils import attach_func_to_class_method
8
-
9
- from . import _TESTING
10
- from ._from_values import get_or_create_records, index_iterable
11
-
12
-
13
- @classmethod # type:ignore
14
- @doc_args(Category.from_values.__doc__)
15
- def from_values(cls, values: ListLike, feature: Feature, **kwargs) -> List["Category"]:
16
- """{}"""
17
- iterable_idx = index_iterable(values)
18
- records = get_or_create_records(
19
- iterable=iterable_idx,
20
- field=Category.name,
21
- # here, feature_id is a kwarg, which is an additional condition
22
- # in queries for potentially existing records
23
- feature_id=feature.id,
24
- )
25
- return records
26
-
27
-
28
- METHOD_NAMES = [
29
- "from_values",
30
- ]
31
-
32
- if _TESTING:
33
- from inspect import signature
34
-
35
- SIGS = {
36
- name: signature(getattr(Category, name))
37
- for name in METHOD_NAMES
38
- if name != "__init__"
39
- }
40
-
41
- for name in METHOD_NAMES:
42
- attach_func_to_class_method(name, Category, globals())
@@ -1,41 +0,0 @@
1
- lamindb/__init__.py,sha256=lYI9U2XcQVYh27tMMGvGIge12n3p6iSU2UoUs6JSMV4,2768
2
- lamindb/_category.py,sha256=YfSFedvi6CoqwneXGwG1Xt1emnq_-Zr1FW2mCE7BZuQ,1100
3
- lamindb/_context.py,sha256=c07en-4ELXpAOIrQ8YO3Kd8amgorFZw1hnE36CZZQNk,17848
4
- lamindb/_dataset.py,sha256=J4kmPfS9cSPr9qJ5Rn7L0Zv2FnVA6FrUBvwEgGBMUDQ,5438
5
- lamindb/_delete.py,sha256=XwPqQ6AePgBLv6o0Uz-PHKaZQUgwwISPXDG03f6RCcs,1854
6
- lamindb/_feature.py,sha256=1C3pfOo76HJXEhy7fEUjlDoakweycLoxTuGURIW5MMw,2889
7
- lamindb/_feature_set.py,sha256=IJG5fiAyM1Z1xTJ1NffVdJQ_jD77r6ChSq4LH5qFghI,5511
8
- lamindb/_file.py,sha256=-TRRIZ0d9yb9myA7fY5wTIHzkFk8pZLKjDOk3hbY04o,31625
9
- lamindb/_from_values.py,sha256=Rxx8jmVP5ScA9iBz7ellzKKPP9adgYPdmRV4nH6ErQc,9583
10
- lamindb/_logger.py,sha256=d1jQdFL4gMKbzcc1dMOgKoEaUlWhyK-VsnxYLlG9caY,48
11
- lamindb/_manager.py,sha256=ZvBG9X8v1Vyvopd-_9zAGlxluFTN07Slq5kEv7Dq_0s,1651
12
- lamindb/_orm.py,sha256=CIk10FcHRLqMVhnmP8RQ9LjkOoM5q8r2W8IxmneagVI,19156
13
- lamindb/_queryset.py,sha256=RErd6jLi94qh14_3Ios9NPxMc2q4b4yEgezYqhmgaro,9693
14
- lamindb/_save.py,sha256=ZauBc5Fr6vMmCd-O66ap6cvS-5ZWvGA2DGInRSE1Rm4,8546
15
- lamindb/_select.py,sha256=w-a_vOLBm-HFIfDhtLJd9ieeU-V8vn16EQ2QlgU0jyA,325
16
- lamindb/_transform.py,sha256=EG87wlUffGI_-N92Qu-qklNRs4hTEeHpEtspYIVGKtc,911
17
- lamindb/_view.py,sha256=dgsIsCbPqtIiaBgvjm5z0ouzC0kjpAI5PXBuYZZAHFE,2075
18
- lamindb/types.py,sha256=svg5S_aynuGfbEOsbmqkR_gF9d9YMzfOkcvGN37Rzvg,232
19
- lamindb/dev/__init__.py,sha256=Dw-JxVxRW6UzZTf5ENiaGmeB5VPXqmu0x44R5v8BOLE,311
20
- lamindb/dev/_settings.py,sha256=lppVzaIQouqUC2RX8kocR1kdkauIC-gKeykQYjZcLmg,2843
21
- lamindb/dev/_view_parents.py,sha256=lSRhOdAdDQAVps5tI6hcVk7hI38cNOLe1FWSpni5pCs,6823
22
- lamindb/dev/hashing.py,sha256=oYHDSEjINsmDYgCLasnhh_VHbB1dLag27ufVUwDgLyQ,1385
23
- lamindb/dev/utils.py,sha256=LGdiW4k3GClLz65vKAVRkL6Tw-Gkx9DWAdez1jyA5bE,428
24
- lamindb/dev/datasets/__init__.py,sha256=4HzUArEtxe_QXMCiqmSFXhurCU09iKRWfUL0wLXbWpQ,905
25
- lamindb/dev/datasets/_core.py,sha256=peXltcOhWlzgbgs_y_Hd7Vgz0LPjlg0IOAtpBVyWRTg,10043
26
- lamindb/dev/datasets/_fake.py,sha256=S8mNho-oSh1M9x9oOSsUBLLHmBAegsOLlFk6LnF81EA,942
27
- lamindb/dev/storage/__init__.py,sha256=ux4W0cpr5jRn5bLjawMqVK4GIwTgp7eKSf_lgdo3lBk,463
28
- lamindb/dev/storage/_anndata_sizes.py,sha256=0XVzA6AQeVGPaGPrhGusKyxFgFjeo3qSN29hxb8D5E8,993
29
- lamindb/dev/storage/_backed_access.py,sha256=X03LRnFir3JdtKlriRExoPLscO7cX9qF01dfHstbHh4,16435
30
- lamindb/dev/storage/_zarr.py,sha256=7W1Jos1QOOF3f41uML_arQoDTNPZVpRyP2m3SLWaCAo,2766
31
- lamindb/dev/storage/file.py,sha256=IrkVNAZq0YhIKvR2p5x0USZ3rg3A6VvgtxxNyA0Z8Rs,5855
32
- lamindb/dev/storage/object.py,sha256=x8sy23WqkGir2sg2c3AngQPgv0RbErEA6cpvVN0Zc4I,945
33
- lamindb/schema/__init__.py,sha256=PznznlFvbeNSZKpn1RS6Gv0JMXFkLmU2_ej_1hVLSTs,796
34
- lamindb/schema/_core.py,sha256=nWR3X_rNd1AbWw3naMiBi8ppAEpqIDyEYqM54feRB_s,766
35
- lamindb/setup/__init__.py,sha256=8-0F2C4Glx23-b8-D_1CBGgRBM5PppVhazhoXZYOLsg,275
36
- lamindb/setup/dev/__init__.py,sha256=iD0f2lx_Hgp-udkiPGal7si5waJSOgvnG6Id-g1mMOY,213
37
- lamindb-0.48a2.dist-info/entry_points.txt,sha256=MioM8vSpKwXxY3geNBwjo1wnwy1l15WjJYlI3lpKuZI,53
38
- lamindb-0.48a2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
39
- lamindb-0.48a2.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
40
- lamindb-0.48a2.dist-info/METADATA,sha256=tpzX1nV9ihv4HfZZ1TIjit0GNv6cxhYazTnygRvGmYg,10694
41
- lamindb-0.48a2.dist-info/RECORD,,