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
build: improve opt deps #16340
base: main
Are you sure you want to change the base?
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 |
pyproject.toml
Outdated
"astropy[recommended]", # installs the [recommended] dependencies | ||
# Install grouped optional dependencies | ||
"astropy[recommended]", | ||
"astropy[docs]", |
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.
test_all
has already been discussed, but I don't think all
dependencies should contain docs
dependencies either.
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 |
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
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.
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!
@@ -88,11 +91,8 @@ all = [ | |||
"mpmath", | |||
"asdf-astropy>=0.3", | |||
"bottleneck", | |||
"ipython>=4.2", |
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.
Actually, given our discussion over in #16351, perhaps we shouldn't have "hidden" dependencies - code has a dependence on whether ipython
is installed in utils.console
.
But possibly that is best done separately - here, what we list is the dependencies needed for all astropy functionality.
Anyway, am happy either with this as-is, or with ipython
put back.
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.
#16354 👀
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.
Let's leave it then instead of deleting.
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.
Any dependency we have should be listed exactly once, but it would indeed be better to keep ipython
here and to delete the duplicate from the test_all
set instead.
"astropy[all]", # installs all optional run-time dependencies | ||
"astropy[test]", # installs the [test] dependencies |
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.
The first comment is useful (because it mentiones "run-time"), the second comment is not. The useless comment isn't added by this pull request, but several analogous and equally useless comments are being introduced that should all be cleaned up.
"astropy[all]", # installs all optional run-time dependencies | |
"astropy[test]", # installs the [test] dependencies | |
"astropy[all]", # installs all optional run-time dependencies | |
"astropy[test]" |
dev = [ | ||
"astropy[recommended]", # installs the most common optional dependencies | ||
"astropy[test]", # installs the [test] dependencies | ||
"astropy[docs]", # installs the [docs] dependencies | ||
"astropy[typing]", # installs the [typing] dependencies | ||
] | ||
dev_all = [ |
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.
These new installation options should be (briefly) introduced somewhere in the developer documentation.
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.yaml
verification, and 2.pytest
-powered stuff.