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
Deprecate astropy test runner in core and downstream #16177
Comments
I did a search for "astropy.test()" in Python files across GitHub and got 76 results. A similar search for "astropy.tests.runner" in Python files across GitHub got 132 results. (Checking on this was waaaay more fun than timing Sphinx builds.) |
Thanks for the write up @pllim! I wonder who is the audience for the deprecation? Can we remove There are a bunch of packages which use the
If we remove all the forks on github, the only active place |
Thanks for the searches, y'all! We advertise |
Here is an example of active downstream usage of the test runner: |
I agree we can stop using the test runner (and deprecate the |
As long as tests are installed, one can use |
A search for |
But how, if the wheels no longer come with tests? |
Presumably |
Oh, we talking about moving the tests out of this repo too? 😱 |
SunPy 🔥'ed the test runner a long time ago, it's very easy to just call |
This is what some people call "an epic" in JIRA-land.
A long, long time ago, in the same galaxy,
astropy
existed when Python was youngish, pytest was younger (remember when we bundled pytest as a single file?) , CI on GitHub was almost non-existent (ask Tom R about Jenkins). There was a need to be able to test installed versions ofastropy
. And thus, the test runner was created. For many years, it served us well.astropy/astropy/tests/runner.py
Lines 290 to 293 in 52d2b36
astropy/astropy/__init__.py
Line 137 in 52d2b36
We even advertised it in
package-template
(https://github.com/astropy/package-template/blob/36ed48db74c9a0bfcf214e14a1a3fb1fdaae0c6c/%7B%7B%20cookiecutter.package_name%20%7D%7D/%7B%7B%20cookiecutter.module_name%20%7D%7D/_%7B%7B%20cookiecutter._parent_project%20%7D%7D_init.py#L13), so downstream packages may have similar runners too (whether they realized it is there or not is another issue).Now in 2024, we have multi-architecture CI and wheels. The need for such a test runner has diminished greatly. In fact, having it might even hinder progress like these:
src
directory #13678Additionally, it is not aging well now that pytest is very complicated and there are plenty of pytest plugins available:
All the while, it was never feature complete:
The plea to get rid of the test runner went as far back as 2018 (#8153 (comment)), "Friends, I beg of you, let's please consider axing the test runner entirely."
Proposal
astropy.test()
function andastropy.tests.runner
module.pytest
directly (ortox
, whatever).astropy
. If downstream packages have not caught up, they need to pin to an older release ofastropy
or have a broken test runner.Impact: High!
Benefit: Less technical debt to carry forward.
Cost: Some crying maintainers.
Counter proposal
We keep everything as-is, but we have to start testing
astropy.test()
in our CI.The text was updated successfully, but these errors were encountered: