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

all flytekit plugins use lazy module loading #2045

Closed
wants to merge 5 commits into from

Conversation

cosmicBboy
Copy link
Contributor

Tracking issue

Fixes flyteorg/flyte#4401

Why are the changes needed?

This change is primarily to simplify the dependencies needed for things like generating API reference documentation for flytekit. Before one needed all dependencies of all plugins to render API docs.

What changes were proposed in this pull request?

Use flytekit.lazy_module to lazily load modules in the plugin packages.

How was this patch tested?

Run tests locally with pytest

@cosmicBboy cosmicBboy force-pushed the plugins-use-lazy-module branch from dd5c5e9 to 238a7b0 Compare December 12, 2023 23:37
Copy link

codecov bot commented Dec 12, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (530ad26) 83.18% compared to head (a7c2a2c) 84.54%.
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2045      +/-   ##
==========================================
+ Coverage   83.18%   84.54%   +1.35%     
==========================================
  Files         173      231      +58     
  Lines       16840    19191    +2351     
  Branches     3471     3468       -3     
==========================================
+ Hits        14009    16225    +2216     
- Misses       2236     2366     +130     
- Partials      595      600       +5     

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

Signed-off-by: Niels Bantilan <[email protected]>
Signed-off-by: Niels Bantilan <[email protected]>
Signed-off-by: Niels Bantilan <[email protected]>
Signed-off-by: Niels Bantilan <[email protected]>
@cosmicBboy
Copy link
Contributor Author

cosmicBboy commented Dec 13, 2023

The offending file in the failing lint test isn't changed in this PR, not sure what's going on:

Fixed 1 error:
- flytekit/models/literals.py:
    1 × I001 (unsorted-imports)

@cosmicBboy cosmicBboy closed this Dec 14, 2023
@cosmicBboy cosmicBboy deleted the plugins-use-lazy-module branch December 14, 2023 19:36
@cosmicBboy cosmicBboy restored the plugins-use-lazy-module branch December 14, 2023 19:36
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.

[Housekeeping] Make flytekit plugins use lazy module loading
1 participant