laminlabs / lamindb

A data framework for biology.
https://docs.lamin.ai
Apache License 2.0
129 stars 12 forks source link

✨ Enable curating multiple categorical features per artifact against the same label registry #2080

Closed falexwolf closed 1 month ago

falexwolf commented 1 month ago

The Curator hadn't yet understood a case where two categoricals map against the same registry.

Now the following works.

ln.Curator.from_anndata(
    adata,
    categoricals={"cell_type1": bt.CellType.name, "cell_type2": bt.CellType.name},
)

This PR resolves this issue:

There is a test case in the unit tests and here in the usecases docs:

Needs:

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 86.95652% with 3 lines in your changes missing coverage. Please review.

Project coverage is 92.60%. Comparing base (80fb3b0) to head (0d52349). Report is 23 commits behind head on main.

Files with missing lines Patch % Lines
lamindb/core/_data.py 57.14% 3 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2080 +/- ## ========================================== + Coverage 92.39% 92.60% +0.20% ========================================== Files 54 54 Lines 6341 6419 +78 ========================================== + Hits 5859 5944 +85 + Misses 482 475 -7 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 1 month ago

🚀 Deployed on https://67128700ee5caa652f9ef65e--lamindb-qnwk.netlify.app