-
Notifications
You must be signed in to change notification settings - Fork 19
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
Make pandas and mpl dependencies for optional features #141
Conversation
6877af7
to
73b4b4d
Compare
73b4b4d
to
f07b131
Compare
Good idea! It's always good to keep things as lightweight as possible. Could you also add this to the docs (installation instruction and the tutorial guide we have). People might expect the analysis features to "just work" only to be presented with an error when they try it ... |
Yes, I was going to add docs anyways, but was waiting for your feedback on the idea in general 👍 |
Docs added. Note that I won't update the local conda recipes anymore, they will hopefully be removed soon... |
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.
A few more nits about the docs. In DFTK we actually started running the (small and fast) examples in CI to ensure the code is not suddenly broken. Maybe that's something we should think about as well?
|
||
Optional dependencies for analysis features | ||
------------------------------------------- | ||
|
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.
From my experience users rarely read such a block text in the docs. I think it's wise to first show a list of "optional packages" along with a code block listing the conda or pip command to install them. You can then add the more detailed info in a paragraph afterwards.
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.
Yes, you are right. I removed the large block text and replaced it with a concise list, looks much better now. I'll have a look at the docs from build artifacts and will merge the PR if everything looks fine.
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.
Sounds good to be.
I noticed that sphinx does not process some files, and as such they do not appear in the docs 😠 Wonder why we didn't notice it before... |
|
||
Optional dependencies for analysis features | ||
------------------------------------------- | ||
|
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.
Sounds good to be.
Probably because no-one checked ... |
Now the docs are looking good again 😄 |
mpl is used in two functions, pandas in one function, both could be considered as optional features (see #140).
This PR removes the two modules as mandatory dependencies, making
adcc
a bit more lightweight. 🚀A new decorator for the functions requiring the modules checks upon call whether the modules are found on the system or not and gives instructions on how to obtain them.
Unrelated to that, I have fixed all broken example python scripts in
examples
.