GeezerVison is showing github.com — TST: should we test time-based environments ? · Issue #17788 · astropy/astropy
TST: should we test time-based environments ? #17788DescriptionThis came up on slack while discussing #16963: instead of, or in complement of oldestdeps jobs, (also) have jobs running against time-based Python environments ? For instance, we could simulate an environment with all dependencies "pinned" to "a year ago". We know of a couple tools that can make this relatively easy to implement:
One immediate technical problem I see with this testing approach however is that astropy-dev always requires a very recent version of astropy-iers-data, which makes the implementation non trivial (I actually didn't manage to make it work with uv, even decomposing installation into several steps).
So, I have two questions in this perspective, that can be answered conjointly or separately:
- do we think this is worth doing ?
- why does astropy need to continuously bump
astropy-iers-data ? I can guess that it's desirable that our users transparently updates both at the same time, but other than that, I'm not sure it should be mandated if it's also creating problems with testing.
Activityastrofrog commented on Feb 17, 2025
why does astropy need to continuously bump astropy-iers-data ? I can guess that it's desirable that our users transparently updates both at the same time, but other than that, I'm not sure it should be mandated if it's also creating problems with testing.
If we didn't do this, someone updating to a new version of astropy by specifying a minimum version or specific version of astropy wouldn't get the astropy-iers-data package updated. I would be reluctant to make things less good for users for the sake of facilitating certain types of testing. neutrinoceros commented on Feb 17, 2025 ContributorAuthor More actions It's a long shot, but maybe that's one more potential use case for your PEP 771 ? 😄 pllim commented on Feb 17, 2025 I agree with @astrofrog . Is your question answered? Can we close this issue? mhvk commented on Feb 18, 2025 astropy-iers-data took care of a real problem, which was our own "live" updating. And any time you are dealing with real-time observations/analysis, you need to be sure you have those time and position corrections; I agree we cannot give that up for easier running of tests (not completely sure what case there is for the time-based testing anyway; what were recent problems that would have been caught?)
neutrinoceros commented on Feb 18, 2025 ContributorAuthor More actions
Is your question answered? Can we close this issue?
well the more important question I think is the first one, but I'm only the messenger: this was originally proposed by @astrofrog, so I think he should decide whether it should be closed now.
From where I'm standing, I don't see a particular need for it, but I'm also not willing to bet we wouldn't discover any bugs if we tried. It also seems to me that it could be very easy to implement if PEP 771 (or a similar mechanism) was accepted, so I'm -0.1 on closing the ticket on the basis that the cost seems too high right now: it may well be lifted in the future. Reacted by P. L. Lim and Nick Murphy namurphy commented on Mar 19, 2025 The oldestdeps environment in tox.ini uses uv's --lowest-direct resolution strategy to test the lowest versions of direct dependencies, which satisfies most of the need for time-based environments. I'd say it's not worth the effort to add time-based environments, unless it becomes trivial to do so in the future.
For PlasmaPy, we require recent versions of pytest + extensions for tests, so the --exclude-newer resolution strategy led to contradictions & headaches like with astropy-iers-data above.
In contrast, the --lowest resolution strategy didn't work for us since some dependencies didn't specify lowest versions of their dependencies, so the environment included versions like 0.0.0.1 of some packages. 😅 neutrinoceros commented on Mar 20, 2025 ContributorAuthor More actions Yes, --lowest is basically unsuable anywhere since pytest itself doesn't has lower bounds on its dependencies namurphy commented on Mar 21, 2025
Yes, --lowest is basically unsuable anywhere since pytest itself doesn't has lower bounds on its dependencies
Just submitted pytest-dev/pytest#13317 to address this! Reacted by Clément Robert mhvk commented on Mar 21, 2025 @namurphy - great! Sometimes we need a reminder that other packages are open source too, and that they would generally welcome bugfixes and improvements!! Reacted by Clément Robert and Nick Murphy Reacted by Nick Murphy neutrinoceros commented on Dec 10, 2025 ContributorAuthor More actions FYI for anyone subscribed to this issue:
This just landed in uv 0.9.17: astral-sh/uv#16814
Other than that, this proposal didn't get much traction, and we're now running oldestdeps with --resolution=lowest, which also reduces the need (if any) for time-based resolutions, so let's just close it now.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|