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

^ uvh5 addition #1511

Merged
Merged

Conversation

radonnachie
Copy link
Contributor

Patched a minor bug that arose in the addition of two uvh5 objects at the ATA.

Description

The catalog entries were expected to have the optional "info_source" key-values. Instead, this optionally retrieved and processed if not None.

Motivation and Context

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation change (documentation changes only)
  • Version change
  • Build or continuous integration change

Checklist:

Bug fix checklist:

  • My fix includes a new test that breaks as a result of the bug (if possible).
  • All new and existing tests pass.
  • I have updated the CHANGELOG.

New feature checklist:

  • I have added or updated the docstrings associated with my feature using the numpy docstring format.
  • I have updated the tutorial to highlight my new feature (if appropriate).
  • I have added tests to cover my new feature.
  • All new and existing tests pass.
  • I have updated the CHANGELOG.

Breaking change checklist:

  • I have updated the docstrings associated with my change using the numpy docstring format.
  • I have updated the tutorial to reflect my changes (if appropriate).
  • My change includes backwards compatibility and deprecation warnings (if possible).
  • I have added tests to cover my changes.
  • All new and existing tests pass.
  • I have updated the CHANGELOG.

Documentation change checklist:

  • Any updated docstrings use the numpy docstring format.
  • If this is a significant change to the readme or other docs, I have checked that they are rendered properly on ReadTheDocs. (you may need help to get this branch to build on RTD, just ask!)

Version change checklist:

  • I have updated the CHANGELOG to put all the unreleased changes under the new version (leaving the unreleased section empty).
  • I have noted any dependency changes since the last version and will update the conda package build accordingly.

Build or continuous integration change checklist:

  • If required or optional dependencies have changed (including version numbers), I have updated the readme to reflect this.
  • If this is a new CI setup, I have added the associated badge to the readme and to references/make_index.py (if appropriate).

@radonnachie
Copy link
Contributor Author

The test results for the commit before the patch (6072930) are here.

I couldn't think of a simpler way to support the test than to add some minified uvh5 files from the ATA. I down selected the time and frequency axes to minimise the data content.

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.93%. Comparing base (c4a1f1d) to head (2601df0).
Report is 14 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##             main    #1511    +/-   ##
========================================
  Coverage   99.93%   99.93%            
========================================
  Files          63       63            
  Lines       21834    22066   +232     
========================================
+ Hits        21819    22051   +232     
  Misses         15       15            

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@kartographer kartographer left a comment

Choose a reason for hiding this comment

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

One minor comment, and one additional request -- now that we have lunarsky patched, I can see that there's an unfiltered warning from the test that was merge in #1506. Could you just add @pytest.mark.filterwarnings("ignore:The uvw_array does not match the expected values") above the test in question? Looks like this was already taken care of!

Also, make sure to update the CHANGELOG =)

Comment on lines 1400 to 1402
self.phase_center_catalog[cat_id]["info_source"] = cat_entry["info_source"]
info_source = cat_entry.get("info_source")
if info_source is not None:
self.phase_center_catalog[cat_id]["info_source"] = info_source
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you change this to:
self.phase_center_catalog[cat_id]["info_source"] = cat_entry.get("info_source")
Realizing this is pretty minor, although the plan for the phase dict is to become an actual object, where these will become optional attributes (which always exist as attributes on the object, but are filled in w/ None when not set), and this will basically make the code easier to migrate.

@kartographer
Copy link
Contributor

@radonnachie - also, I think the test files are also sufficiently small enough that the additions should be totally fine. I'd just say make sure those are the test files you want to include (but very happy to add some ATA data finally to the list of test datasets!).

Copy link
Contributor

@kartographer kartographer left a comment

Choose a reason for hiding this comment

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

Looks good!

@kartographer kartographer merged commit ed71586 into RadioAstronomySoftwareGroup:main Dec 27, 2024
40 of 42 checks passed
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