fix: isolate required and optional dependencies#237
Conversation
nicrie
left a comment
There was a problem hiding this comment.
LGTM! I also agree with your suggestion to make Numba and statsmodels optional. What should we call this additional category -- perhaps perf?
Could we add the different installation options to the installation instructions to clarify things for users? Specifically, users of MCA/CCA (which ultimately depend on CPCCA) should be aware that they need the statsmodels dependency.
|
Ok, I went ahead and moved I used |
|
hey @slevang I was quite packed over the last days, I will have a look now. 👍 for |
nicrie
left a comment
There was a problem hiding this comment.
shouldn't this be a class attribute?__
self.extra_modules = []
sorry my bad somehow missed that you defined it before the __init__ method.
nicrie
left a comment
There was a problem hiding this comment.
LGTM, if you want to address the one point regarding 5hnetcdf great! But even without from my side feel free to merge! :)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #237 +/- ##
=======================================
Coverage ? 24.50%
=======================================
Files ? 56
Lines ? 3962
Branches ? 0
=======================================
Hits ? 971
Misses ? 2991
Partials ? 0 ☔ View full report in Codecov by Sentry. |
This makes the i/o dependencies, which are only required for the
.save()/.load()methods, optional. I have an environment where I would really rather not havenetcdf4installed and realizedxeofswas the reason it kept getting pulled in.Along the same lines,
numbais a heavyweight dependency and has very limited use here so far (only inGWPCA).numbais probably bigger in size than all other deps combined.statsmodelsalso has very minimal use (CPCCA). I'm tempted to try and make those optional as well, since probably the majority of people who use this package just stick toEOF. Wanted to get your thoughts first though @nicrie .EDIT: this does make
numbaandstatsmodelsoptional as well