-
Notifications
You must be signed in to change notification settings - Fork 20
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
fix: isolate required and optional dependencies #237
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be a class attribute?__
self.extra_modules = []
sorry my bad somehow missed that you defined it before the __init__
method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 havenetcdf4
installed and realizedxeofs
was the reason it kept getting pulled in.Along the same lines,
numba
is a heavyweight dependency and has very limited use here so far (only inGWPCA
).numba
is probably bigger in size than all other deps combined.statsmodels
also 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
numba
andstatsmodels
optional as well