Skip to content
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

pass exclude/ignore options to table meta comparison #1226

Closed
wants to merge 1 commit into from

Conversation

braingram
Copy link
Collaborator

This PR allows passing ignore paths that include items in astropy.Table metadata by parsing the exclude_paths handled by DeepDiff and passing them through to the diff called on the table metadata. A test is added for the new feature.

@schlafly would you try this with the table date metadata issue you mentioned? Thanks!

Checklist

  • added entry in CHANGES.rst under the corresponding subsection
  • updated relevant tests
  • updated relevant documentation
  • updated relevant milestone(s)
  • added relevant label(s)
  • ran regression tests, post a link to the Jenkins job below. How to run regression tests on a PR

@schlafly
Copy link
Collaborator

schlafly commented May 6, 2024

Yes. I am regenerating the regtest files right now, though, so it will be a bit. Here was the approach I took:
https://github.com/schlafly/romancal/blob/ba1e79d2893602a9f52ca398fa4d8d5ed7efcf32/romancal/regtest/regtestdata.py#L617
Just making sure I follow, my version does the one dumb necessary thing, and your version takes the whole exclude_paths and copies them so they apply to the Table metadata as well. In particular, roman.meta.date is in there, and we hope that handles meta.date here as well?

@braingram
Copy link
Collaborator Author

Thanks! No rush from my end. I gave this a look (as a reprieve from hunting down memory usage) and saw what might be a relatively general approach.

For this PR let's say there is a astropy.Table for the source_catalog attribute of a datamodel. If that table contains a meta.date that you want compare_asdf to ignore you could modify ignore_asdf_paths to include:

source_catalog.meta.date

and it would ignore specifically the date metadata entry for the source_catalog table.

@braingram
Copy link
Collaborator Author

This can likely be "revived" if the changes are wanted. Since it currently has conflicts I'm closing it until that point.

@braingram braingram closed this May 17, 2024
@braingram braingram deleted the ignore_table_meta branch May 17, 2024 20:08
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.

None yet

2 participants