Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚸 Do not error if a schema module of an instance isn't installed #883

Merged
merged 5 commits into from
Oct 11, 2024

Conversation

falexwolf
Copy link
Member

@falexwolf falexwolf commented Oct 11, 2024

If you don't have a schema module installed, you'll not see the metadata from its registries.

For example, in an environment that lacks findrefs:

>>> import lamindb as ln
! schema module 'findrefs' is not installedno access to its registries (resolve via `pip install findrefs`)
→ connected lamindb: laminlabs/lamin-dev
>>> artifact = ln.Artifact.get("iw9RRhFApeJVHC1L0001")
>>> artifact.describe()
Artifact(uid='iw9RRhFApeJVHC1L0001', version='1.0', is_latest=True, description='my RNA-seq', suffix='.parquet', type='dataset', size=4091, hash='pYYPTWIvnIZ83a9_0WLNYg', _hash_type='md5', _accessor='DataFrame', visibility=1, _key_is_virtual=True, created_at=2024-09-02 14:15:10 UTC)
  Provenance
    .storage = 's3://lamin-eu-central-1/9fm7UN13'
    .transform = 'Introduction'
    .run = '2024-09-03 19:23:15 UTC'
    .created_by = 'falexwolf'

In an environment that has findrefs, you'll see the annotation with the reference:

>>> import lamindb as lnconnected lamindb: laminlabs/lamin-dev
>>> artifact = ln.Artifact.get("iw9RRhFApeJVHC1L0001")
>>> artifact.describe()
Artifact(uid='iw9RRhFApeJVHC1L0001', version='1.0', is_latest=True, description='my RNA-seq', suffix='.parquet', type='dataset', size=4091, hash='pYYPTWIvnIZ83a9_0WLNYg', _hash_type='md5', _accessor='DataFrame', visibility=1, _key_is_virtual=True, created_at=2024-09-02 14:15:10 UTC)
  Provenance
    .storage = 's3://lamin-eu-central-1/9fm7UN13'
    .transform = 'Introduction'
    .run = '2024-09-03 19:23:15 UTC'
    .created_by = 'falexwolf'
  Labels
    .references = 'My awesome paper'

@falexwolf falexwolf changed the title Donoterror 🚸 Do not error if a schema module of an instance isn't installed Oct 11, 2024
Copy link

github-actions bot commented Oct 11, 2024

@github-actions github-actions bot temporarily deployed to pull request October 11, 2024 08:16 Inactive
@github-actions github-actions bot temporarily deployed to pull request October 11, 2024 08:42 Inactive
Copy link

codecov bot commented Oct 11, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 83.52%. Comparing base (c4fafda) to head (06ed246).

Files with missing lines Patch % Lines
lamindb_setup/_init_instance.py 66.66% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #883      +/-   ##
==========================================
- Coverage   83.55%   83.52%   -0.04%     
==========================================
  Files          43       43              
  Lines        3357     3362       +5     
==========================================
+ Hits         2805     2808       +3     
- Misses        552      554       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions github-actions bot temporarily deployed to pull request October 11, 2024 08:56 Inactive
@falexwolf falexwolf merged commit 3abffba into main Oct 11, 2024
1 of 6 checks passed
@falexwolf falexwolf deleted the donoterror branch October 11, 2024 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant