GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — TST: should we test time-based environments ? · Issue #17788 · astropy/astropy

TST: should we test time-based environments ? #17788

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
TST: should we test time-based environments ?#17788
Copy link
Labels
Close?Tell stale bot that this issue/PR is stalequestiontestingutils.iers

Description

@neutrinoceros
neutrinoceros
opened on Feb 17, 2025
Issue body actions

This 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:

  • uv's resolver supports a --exclude-newer=<datetime> option
  • @astrofrog's pypi-timemachine

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.

Activity

  1. neutrinoceros
    added
    question
    testing
    on Feb 17, 2025
  2. astrofrog commented on Feb 17, 2025

    @astrofrog
    astrofrog
    on Feb 17, 2025
    Member
    More actions

    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.

  3. neutrinoceros commented on Feb 17, 2025

    @neutrinoceros
    neutrinoceros
    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 ? 😄

    Reacted by Nick Murphy
  4. pllim
    added
    utils.iers
    on Feb 17, 2025
  5. pllim commented on Feb 17, 2025

    @pllim
    pllim
    on Feb 17, 2025
    Member
    More actions

    I agree with @astrofrog . Is your question answered? Can we close this issue?

  6. mhvk commented on Feb 18, 2025

    @mhvk
    mhvk
    on Feb 18, 2025
    Contributor
    More actions

    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?)

    Reacted by Nick Murphy
  7. neutrinoceros commented on Feb 18, 2025

    @neutrinoceros
    neutrinoceros
    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
  8. pllim
    added
    Close?Tell stale bot that this issue/PR is stale
    on Feb 18, 2025
  9. namurphy commented on Mar 19, 2025

    @namurphy
    namurphy
    on Mar 19, 2025
    Contributor
    More actions

    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. 😅

  10. neutrinoceros commented on Mar 20, 2025

    @neutrinoceros
    neutrinoceros
    on Mar 20, 2025
    ContributorAuthor
    More actions

    Yes, --lowest is basically unsuable anywhere since pytest itself doesn't has lower bounds on its dependencies

    Reacted by Nick Murphy
  11. namurphy commented on Mar 21, 2025

    @namurphy
    namurphy
    on Mar 21, 2025
    Contributor
    More actions

    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
  12. mhvk commented on Mar 21, 2025

    @mhvk
    mhvk
    on Mar 21, 2025
    Contributor
    More actions

    @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
  13. neutrinoceros commented on Dec 10, 2025

    @neutrinoceros
    neutrinoceros
    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.

  14. neutrinoceros
    closed this as not plannedon Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Close?Tell stale bot that this issue/PR is stalequestiontestingutils.iers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.