Skip to content

✨ Add lazy import mechanism to enable model import before django setup #1064

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ap--
Copy link
Collaborator

@ap-- ap-- commented Jun 16, 2025

This add a lazy proxy mechanism that hooks into pythons import machinery to automatically create lazy class and function wrappers to defer import to when lamin is connected to an instance.

xref: laminlabs/lamindb#2849

…etup

This add a lazy proxy mechanism that hooks into pythons import machinery to automatically create lazy class and function wrappers to defer import to when lamin is connected to an instance
Copy link

@github-actions github-actions bot temporarily deployed to pull request June 16, 2025 23:43 Inactive
Copy link

codecov bot commented Jun 16, 2025

Codecov Report

Attention: Patch coverage is 25.90909% with 163 lines in your changes missing coverage. Please review.

Project coverage is 81.79%. Comparing base (4d615e1) to head (a408b8c).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
lamindb_setup/lazy_import.py 23.58% 162 Missing ⚠️
lamindb_setup/_connect_instance.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1064      +/-   ##
==========================================
- Coverage   84.65%   81.79%   -2.86%     
==========================================
  Files          44       46       +2     
  Lines        3753     3955     +202     
==========================================
+ Hits         3177     3235      +58     
- Misses        576      720     +144     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants