PyUtilib / pyutilib

A collection of general Python utilities, including logging and file IO, subprocess management, plugin systems, and workflow management.
BSD 3-Clause "New" or "Revised" License
34 stars 20 forks source link

Switch spreadsheet interface to load dependencies on demand #84

Closed jsiirola closed 4 years ago

jsiirola commented 4 years ago

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:

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.
coveralls commented 4 years ago

Coverage Status

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

codecov-io commented 4 years ago

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%) :arrow_up:
pyutilib/subprocess/processmngr.py 60.34% <0%> (-1.68%) :arrow_down:
pyutilib/workflow/task.py 97.68% <0%> (-0.57%) :arrow_down:
pyutilib/dev/runtests.py 71.64% <0%> (-0.54%) :arrow_down:
pyutilib/misc/config.py 94.28% <0%> (-0.42%) :arrow_down:
pyutilib/workflow/functor.py 97.51% <0%> (-0.41%) :arrow_down:
pyutilib/component/core/core.py 84.73% <0%> (-0.33%) :arrow_down:
pyutilib/misc/archivereader.py 82.01% <0%> (-0.18%) :arrow_down:
pyutilib/pyro/dispatcher.py 22.93% <0%> (-0.18%) :arrow_down:

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.