Repository navigation
build: improve opt deps - #16340
build: improve opt deps#16340
Conversation
|
Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.
|
|
Looks reasonable but let me run the other jobs, just in case. Thanks! |
|
Should all actually include test_all? I think of it as meaning all runtime dependencies? Not a strong opinion though. |
|
Good point... There is a distinction between what users need and what testers need. |
|
As in I should reverse the relationship and have all = [...] # doesn't have test_all |
I think this makes more sense. What do you think, @astrofrog ? |
|
Yes probably makes more sense |
|
It would be nice to have an "absolutely everything" category, which makes getting setting up astropy dev environments super simple. I was making |
|
Agreed that I always thought of I like the idea of a |
mhvk
left a comment
There was a problem hiding this comment.
See my one remaining comment, which mostly means another reason to leave this open for a little longer so others can comment.
But I think this little reorganization makes good sense now!
d94cd6a to
6887bbb
Compare
|
Given the merge conflict I took this opportunity to add code comments and some discussion in the docs. I also added the |
neutrinoceros
left a comment
There was a problem hiding this comment.
Just a couple of extremely minor suggestions
| "astropy[test]", | ||
| # Install all remaining dependencies | ||
| "objgraph", | ||
| "coverage[toml]", |
There was a problem hiding this comment.
shouldn't this line be in [test] ? I also note that it's actually already there in a way (pytest-astropy requires pytest-cov which itself requires coverage[toml])
| "array-api-strict", | ||
| ] | ||
| typing = [ | ||
| "typing_extensions>=4.0.0" |
There was a problem hiding this comment.
| "typing_extensions>=4.0.0" | |
| "typing_extensions>=4.0.0", |
eerovaher
left a comment
There was a problem hiding this comment.
I'm not convinced we need separate ipython and jupyter dependency sets.
It does look like it would be a good idea to rewrite the astropy development version installation instructions and the dependency descriptions, but doing that properly is beyond the scope of this pull request.
| To test the full set of optional dependencies, use the ``test_all`` option:: | ||
|
|
||
| python -m pip install --editable ".[test_all]" |
There was a problem hiding this comment.
It would be much better if these descriptions could link to relevant subsections in the description of dependencies, but that would require those subsections to exist. It looks like all the installation instructions (including the installation instructions for building documentation) could benefit from being rewritten, but that's going beyond the scope of this pull request and is best done in a separate pull request instead.
| jupyter = [ # these are optional dependencies for `utils.console` | ||
| "astropy[ipython]", | ||
| "ipywidgets", | ||
| "ipykernel", | ||
| ] |
There was a problem hiding this comment.
I don't think it does. But I'm also not sure it should: jupyter comes in different shapes (jupyterlab and notebook) and we don't need to impose a choice onto our users (I think ?)
There was a problem hiding this comment.
Something seems to be pulling in jupyter stack but it is already that way in main. Hmm!
2024-05-19T22:19:37.9405799Z jupyter_client==8.6.1
2024-05-19T22:19:37.9406161Z jupyter_core==5.7.2
2024-05-19T22:19:37.9406568Z jupyterlab_widgets==3.0.10
There was a problem hiding this comment.
This is just moving around the dependencies, not adding any. I titled it jupyter since it's for use when in a Jupyter environment.
There was a problem hiding this comment.
This is in contrast to the ipython dep, which enables functionality in astropy.utils.console within any ipython environment not just a Jupyter one.
There was a problem hiding this comment.
Do you expect anyone to ever use the ipython and jupyter dependency sets?
There was a problem hiding this comment.
Yes. Even if not publicly advertised, these things have a way of finding their users, in my experience.
There was a problem hiding this comment.
For another PR, but I do think we should have a page detailing these install options. Like...
If you're using an IPYthon environment, use astropy[ipython]. This is further improved by astropy[jupyter] when in a Jupyter notebook. astropy[typing] improves static typing compatibility. To get everything do astropy[all].
There was a problem hiding this comment.
It might indeed be the case that documentation could explain what these dependency sets would be good for, but the more dependency sets we have, the more documentation we need to explain them. At some point the more granular dependency sets will not be worth the effort of documenting them.
mhvk
left a comment
There was a problem hiding this comment.
Nice! Good to go with the remaining suggested changes from others as far as I'm concerned.
Signed-off-by: nstarman <[email protected]>
4e54edc to
7b84565
Compare
Does this mean we're still seeking a couple of more approvals? |
eerovaher
left a comment
There was a problem hiding this comment.
I'm still not convinced we need separate ipython and jupyter dependency sets, but listing the dependencies is definitely done much better in this pull request than on main.
I thought the comments given by others had not yet been all addressed, so was hoping to see those addressed or dismissed. |
|
Looking at this again, I think there are actually no outstanding issues - and if there are, these can be dealt with later. So, let's get this in. Thanks, @nstarman, this is substantially nicer! |
|
tl;dr -- Did you double check that |
| "ipykernel", | ||
| "ipython>=7.32", | ||
| "ipywidgets", | ||
| "pytest>=7.0", |
There was a problem hiding this comment.
Why has been pytest removed as a dependency here? The test runner uses it, so strictly speaking it's a genuine optional dependency.
Small improvements to the specification of optional dependencies. In particular, this improves
astropy[all]to actually have everything and installs pre-commit forastropy[test]since our CI consists of 1. pre-commit checks, e.g.yamlverification, and 2.pytest-powered stuff.