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

Switch spreadsheet interface to load dependencies on demand #84

Merged
merged 2 commits into from
Mar 13, 2020

Conversation

jsiirola
Copy link
Contributor

Fixes: #N/A

Summary/Motivation:

Reworks how optional dependent libraries are imported so that many optional dependencies (notably pkg_resources and openpyxl) are only imported "on demand". This significantly speeds up importing pyutilib.

Changes proposed in this PR:

  • rework optional dependency imports

Legal Acknowledgement

By contributing to this software project, I agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the BSD license.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@jsiirola jsiirola requested a review from blnicho March 13, 2020 22:54
@coveralls
Copy link

coveralls commented Mar 13, 2020

Coverage Status

Coverage increased (+0.09%) to 61.12% when pulling f25a549 on jsiirola:defer-excel-imports into f49e95e on PyUtilib:master.

@codecov-io
Copy link

codecov-io commented Mar 13, 2020

Codecov Report

Merging #84 into master will decrease coverage by 0.09%.
The diff coverage is 75%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master      #84     +/-   ##
=========================================
- Coverage   63.06%   62.96%   -0.1%     
=========================================
  Files          87       87             
  Lines        8784     8817     +33     
=========================================
+ Hits         5540     5552     +12     
- Misses       3244     3265     +21
Impacted Files Coverage Δ
pyutilib/excel/spreadsheet.py 77.77% <75%> (+13.94%) ⬆️
pyutilib/subprocess/processmngr.py 60.34% <0%> (-1.68%) ⬇️
pyutilib/workflow/task.py 97.68% <0%> (-0.57%) ⬇️
pyutilib/dev/runtests.py 71.64% <0%> (-0.54%) ⬇️
pyutilib/misc/config.py 94.28% <0%> (-0.42%) ⬇️
pyutilib/workflow/functor.py 97.51% <0%> (-0.41%) ⬇️
pyutilib/component/core/core.py 84.73% <0%> (-0.33%) ⬇️
pyutilib/misc/archivereader.py 82.01% <0%> (-0.18%) ⬇️
pyutilib/pyro/dispatcher.py 22.93% <0%> (-0.18%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f49e95e...f25a549. Read the comment docs.

@jsiirola jsiirola merged commit f61be88 into PyUtilib:master Mar 13, 2020
@jsiirola jsiirola deleted the defer-excel-imports branch March 13, 2020 23:10
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.

4 participants