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

🥅 Check instance.modules when loading a lamindb schema module #946

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Koncopd
Copy link
Member

@Koncopd Koncopd commented Jan 16, 2025

And raise RuntimeError if it is not there.

Copy link

github-actions bot commented Jan 16, 2025

@github-actions github-actions bot temporarily deployed to pull request January 16, 2025 21:02 Inactive
@github-actions github-actions bot temporarily deployed to pull request January 16, 2025 21:13 Inactive
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

Attention: Patch coverage is 89.74359% with 4 lines in your changes missing coverage. Please review.

Project coverage is 83.90%. Comparing base (04fe679) to head (e0824f6).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lamindb_setup/_check_setup.py 90.90% 3 Missing ⚠️
lamindb_setup/_connect_instance.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #946      +/-   ##
==========================================
- Coverage   83.91%   83.90%   -0.02%     
==========================================
  Files          43       43              
  Lines        3469     3491      +22     
==========================================
+ Hits         2911     2929      +18     
- Misses        558      562       +4     

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

@Koncopd Koncopd requested review from falexwolf and Zethson January 16, 2025 21:58
@falexwolf
Copy link
Member

This looks interesting, but I don't understand why it's needed.

What's the motivation & outcome in plain words?

@falexwolf
Copy link
Member

_check_in_modules(from_module)
il.reload(il.import_module(from_module))
else:
infer_module = _module_name()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed?

Copy link
Member Author

@Koncopd Koncopd Jan 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What exactly?
this gets triggered for example in this case:

import lamindb as ln # connected, django is setup
import wetlab as wl # calls _check_instance_setup() without specifying from_module, module name needs to be inferred.

Copy link
Member

@Zethson Zethson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@github-actions github-actions bot temporarily deployed to pull request January 17, 2025 09:08 Inactive
@github-actions github-actions bot temporarily deployed to pull request January 17, 2025 13:13 Inactive
@Koncopd
Copy link
Member Author

Koncopd commented Jan 17, 2025

@falexwolf are you fine with this now?

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.

3 participants