Skip to content

Conversation

@esoteric-ephemera
Copy link
Collaborator

@esoteric-ephemera esoteric-ephemera commented Dec 17, 2025

Expanding scope of lazy loading to:

  • Lazily load a rester for an endpoint only when it is inspected
  • Lazily initialize a rester only when it is called

Some usage examples for the LazyImport class in tests/core/test_utils.py for how it can be used beyond just the resters

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 88.60759% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 63.44%. Comparing base (a8210aa) to head (73e9a50).

Files with missing lines Patch % Lines
mp_api/client/core/utils.py 87.80% 5 Missing ⚠️
mp_api/client/routes/molecules/molecules.py 71.42% 2 Missing ⚠️
mp_api/client/core/client.py 90.00% 1 Missing ⚠️
mp_api/client/mprester.py 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1044      +/-   ##
==========================================
- Coverage   66.83%   63.44%   -3.39%     
==========================================
  Files          50       50              
  Lines        2801     2681     -120     
==========================================
- Hits         1872     1701     -171     
- Misses        929      980      +51     

☔ 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.

3 participants