Skip to content

TST: update cooodinates accuracy test data#16980

Closed
neutrinoceros wants to merge 2 commits intoastropy:mainfrom
neutrinoceros:coordinates/tst/update_accuracy_test_data
Closed

TST: update cooodinates accuracy test data#16980
neutrinoceros wants to merge 2 commits intoastropy:mainfrom
neutrinoceros:coordinates/tst/update_accuracy_test_data

Conversation

@neutrinoceros
Copy link
Contributor

Description

This is a continuation of #16976 with the addition of a commit that updates test data following a run of the generate_ref_ast.py script.
Let's see how this does in CI.

  • By checking this box, the PR author has requested that maintainers do NOT use the "Squash and Merge" button. Maintainers should respect this when possible; however, the final decision is at the discretion of the maintainer that merges the PR.

@github-actions
Copy link
Contributor

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.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the Astropy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see instructions for rebase and squash.
  • Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the "Extra CI" label. Codestyle issues can be fixed by the bot.
  • Is a change log needed? If yes, did the change log check pass? If no, add the "no-changelog-entry-needed" label. If this is a manual backport, use the "skip-changelog-checks" label unless special changelog handling is necessary.
  • Is this a big PR that makes a "What's new?" entry worthwhile and if so, is (1) a "what's new" entry included in this PR and (2) the "whatsnew-needed" label applied?
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate "backport-X.Y.x" label(s) before merge.

@github-actions
Copy link
Contributor

👋 Thank you for your draft pull request! Do you know that you can use [ci skip] or [skip ci] in your commit messages to skip running continuous integration tests until you are ready?

@eerovaher
Copy link
Member

I didn't go over all the values, but from the quick glance I took I got the impression that the numbers aren't different at all, the updated script just writes out more digits. If it is indeed the case that limiting the number of digits in the output replicates the data as it is then the only changes would be in the file headers, and those are small enough that we can easily handle them in #16976 and this pull request wouldn't be needed.

@neutrinoceros
Copy link
Contributor Author

Does the unified IO interface allows to set the output precision somehow ?

@eerovaher
Copy link
Member

@pllim
Copy link
Member

pllim commented Sep 10, 2024

If you can get the diff smaller with the precision thingy, that would be nice. My two cents, FWIW. Thanks, all!

@neutrinoceros neutrinoceros force-pushed the coordinates/tst/update_accuracy_test_data branch from 9cbc353 to 470d198 Compare September 10, 2024 17:47
@neutrinoceros
Copy link
Contributor Author

Thanks ! I think I got the diff smaller by forcing outputs to 10 digits. I updated both PRs.

@eerovaher
Copy link
Member

It looks to me like the original format is 12 digits in total (meaning 9-11 digits to the right of the decimal point depending on how many digits there are to the left of it), but without trailing zeros. If there is a way to force the new data to be like that then it should be possible to make the diff much smaller.

@neutrinoceros
Copy link
Contributor Author

I don't know how to achieve what you're suggesting. I also suspect that it might also have to do with Python 2 VS 3.

)
t.write(f, format="ascii", delimiter=",")
formats = {
k: "%0.10f" for k in "ra_in,dec_in,ra_fk5,dec_fk5,ra_fk4,dec_fk4".split(",")
Copy link
Member

@eerovaher eerovaher Sep 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
k: "%0.10f" for k in "ra_in,dec_in,ra_fk5,dec_fk5,ra_fk4,dec_fk4".split(",")
k: ".12g" for k in "ra_in,dec_in,ra_fk5,dec_fk5,ra_fk4,dec_fk4".split(",")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's it ! thanks a LOT. There's no difference after that, so I'll close this PR and include your suggestion in #16976

@neutrinoceros neutrinoceros deleted the coordinates/tst/update_accuracy_test_data branch September 10, 2024 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants