Closed schrockn closed 5 years ago
That's completely reasonable idea. It's be pretty easy to implement.
It was also raised this week that papermill doesn't even need the dependency at all now that scrapbook has the ipython specific items.
Cool. Btw, I tried to do this quick on a fork but ran into some issues with mocks etc. Specifically @mock.patch("scrapbook.api.ip_display")
in test_api.py. Don't have time to dig in today!
Likely you need to change that to @mock.patch("IPython.display")
, or if that fails the second option in https://stackoverflow.com/questions/41873928/how-can-i-mock-a-module-that-is-imported-from-a-function-and-not-present-in-sys?rq=1 is probably the best option.
Will perform a release something soon to pick up the change.
Hello!
Right now scrapbook (and papermill) incurs a fairly significant cost at import time (2 seconds) because of the transitive dependency on IPython. It would be great if this were incurred only if the the code is actually executed. We are looking at things like unit test performance and larger codebases.
Totally understand if this is not super-high priority!