Repository navigation
Conversation
This comment has been minimized.
This comment has been minimized.
|
I believe that the PR now fixes both bugs (and has tests). It also tests for changes in IERS B between astropy's built-in IERS B and the published one on the places where they overlap. There remains an awkwardness to do with IERS_Auto and IERS B, specifically that IERS_Auto never updates the IERS B data. |
mhvk
left a comment
There was a problem hiding this comment.
Thanks very much for this! Some initial comments. Note that I still haven't quite wrapped my head around the various things we actually want, and perhaps we should try to enumerate that. Is it roughly the following?
IERS_Autoshould make "best estimate from A and B" for all five columns, not just the threeUT1_UTC,PM_XandPM_Y(included here).IERS_Autowithout on-line connection should make a look-alike file from the IERS_B file (included here).- It should be possible to have
IERS_Bbe up to date (not included here). - Any update on IERS_B should propagate to
IERS_Auto(not included here).
I think (1) is uncontroversial. (2) is less obvious to me - if we do it, I think all columns should be populated, also *_A ones (or at least the column with the flag). I'd like to understand, though, whether it is useful to have those extra columns, or perhaps rather, whether it still would be useful if we did have (3) and possibly (4).
| in the downloaded IERS-A table. | ||
| """ | ||
| iers_b = IERS_B.open() | ||
| iers_b = IERS_B.open(IERS_B_FILE) |
There was a problem hiding this comment.
I think I'd prefer to change the docstring and use whatever IERS_B is available (possibly newer than bundled).
There was a problem hiding this comment.
It turns out this makes testing extremely frustrating. The astropy cache provides a kind of shared global state that makes systematic testing very difficult - I finally gave up and did this when the previous approach gave me unpredictable results. (Note that PR #9182 provides a solution to this particular problem.) I think the solution is actually a larger structural change.
There was a problem hiding this comment.
I think with adequate documentation this could be made to work:
- If the user wants a specific table version, use IERS_B.open("iers_b.table")
- If the user wants the built-in version, use IERS_B.open(IERS_B_FILE)
- If the user wants the cached version, falling back to IERS_B_FILE or raising an error for IERS_A, they can just do IERS_B.open()
- If the user wants auto-updating, use IERS_Auto.open() (which starts with whatever is in cache).
This works for earth_rotation_table as well as direct use of the tables.
It's still different from now, where using no-argument open gets you whatever is stored in the class-wide cls.iers_table. But I can make that change fairly easily.
There was a problem hiding this comment.
Agreed that from a user perspective, with the new earth_rotation_table, it is possible to select whatever one wants. Here, it is about the behaviour of IERS_Auto - where does it gets its IERS-B values. Choices are:
- Use
IERS-AIERS-B values (but those are not quite OK); - Use bundled IERS-B file (but can be out of date; would happen with your change);
- Use whatever the current default is - bundled until something specific downloaded prior to
IERS_Auto()(current behaviour; note: currently, any IERS_B_URL downloaded in a previous session is ignored); - Use most current already downloaded version (i.e., as current, but do not ignore previously downloaded IERS-B);
- Ensure IERS-B is kept up to date in the same way IERS-A is.
For this PR, my tendency would be to document the present state...
|
|
||
|
|
||
| @pytest.mark.parametrize("keyword,atol", test_columns) | ||
| @pytest.mark.xfail( |
There was a problem hiding this comment.
Since we turned expected failures that fail to fail into failures (parse that!), this seems a bit risky: don't really want CI to start failing when we update the bundled IERS_B and a downloaded IERS_B actually agrees with it! I guess we need some kind of "allowed fail".
There was a problem hiding this comment.
Well, I don't know - maybe it's good if something lets us know when we've changed the bug profile of the code base? The sequence will be: someone drops in a new IERS B table, the test suite grinds to a halt with XPASS, they say "huh", they remove the xfail notification, hopefully leaving an explanation, problem done.
There was a problem hiding this comment.
I guess the question then becomes why we are testing what IERS is doing? The tests should test that our code makes sense. In principle, we could run it with snippets of files for which the outcome is guaranteed to be correct (that's done with some IERS_A snippets in iers/tests/data)
There was a problem hiding this comment.
This is a different category of test, I guess - not "does our code do something wrong?" but "has upstream done anything we need to know about?". Maybe not appropriate as part of the test suite, exactly, but I think maybe we do need to know about it?
There was a problem hiding this comment.
Not being familiar with IERS updates and such, I just want to point out that we have set pytest to fail on XPASS with:
Line 105 in 4bf2d41
As a result, if XPASS starts to happen, CI will fail even for unrelated push events (e.g., someone else's PR). Is this what you are going for? If not, I would advise to rethink this test setup.
|
@aarchiba - I factored out the addition of For the default for off-line of just using IERS B (current) versus making it a mock-up of the IERS A/B combination, I'm less sure what the best path is. We may be better off lopping off items in #9227. |
|
Now that #9237 is merged, this needs a rebase. |
IERS_Auto merges in columns from the IERS B table. But as it stood, the version of IERS B that was used was difficult to control. Now it always uses the version built in to astropy.
pllim
left a comment
There was a problem hiding this comment.
@mhvk and @taldcroft , do you have time to do a final review before feature freeze? Thanks!
| in the downloaded IERS-A table. | ||
| """ | ||
| iers_b = IERS_B.open() | ||
| iers_b = IERS_B.open(IERS_B_FILE) |
|
|
||
|
|
||
| @pytest.mark.parametrize("keyword,atol", test_columns) | ||
| @pytest.mark.xfail( |
There was a problem hiding this comment.
Not being familiar with IERS updates and such, I just want to point out that we have set pytest to fail on XPASS with:
Line 105 in 4bf2d41
As a result, if XPASS starts to happen, CI will fail even for unrelated push events (e.g., someone else's PR). Is this what you are going for? If not, I would advise to rethink this test setup.
|
Also needs a change log. Thanks for your patience, @aarchiba ! |
|
@aarchiba - your PR directly led to #9244, which I think solves most of the probllems, hopefully more elegantly. Given that, is this PR still useful? My sense would be to eventually deprecate the caching on classes, and move to having |
|
Yes I need to take a look at this and see what if any of it is relevant in light of the ScienceState stuff - maybe just the tests, maybe nothing, maybe there is some useful code here. |
|
Some of the tests are probably still useful to make sure that table merging does something sensible, and we might still need the from_iers_b to cover when IERS A is not available. It's a little bit hard to judge as is - maybe I should rebase it on top of #9244 ? Does that make sense? I mean I think this only makes sense as an extension of the ScienceState work. I think, too, it's fair to say that this PR is not needed to introduce any new features or make significant API changes, just to (I hope) enhance testing and reveal and fix bugs. So perhaps it can wait for #9244 ? |
|
#9244 is merged. Is this still on track for 4.0? |
|
What's the status here? |
|
Let's punt this to 4.0.1. |
|
This now has conflict. |
|
Hi humans 👋 - this pull request hasn't had any new commits for approximately 5 months. I plan to close this in a month if the pull request doesn't have any new commits by then. In lieu of a stalled pull request, please consider closing this and open an issue instead if a reminder is needed to revisit in the future. Maintainers may also choose to add If this PR still needs to be reviewed, as an author, you can rebase it to reset the clock. If you believe I commented on this pull request incorrectly, please report this here. |
|
I'm going to close this pull request as per my previous message. If you think what is being added/fixed here is still important, please remember to open an issue to keep track of it. Thanks! If this is the first time I am commenting on this issue, or if you believe I closed this issue incorrectly, please report this here. |
This test suite has them marked as xfail, but there are some troubling anomalies in the handling of the IERS B data. Tests demonstrate, and currently xfail:
Also, not exactly a bug, but it is good to have tests to let us know when this has occurred: