Fix vanilla_yaml to process regular dicts containing datetime objects#65
Merged
DavidHuber-NOAA merged 3 commits intodevelopfrom Jan 8, 2026
Merged
Fix vanilla_yaml to process regular dicts containing datetime objects#65DavidHuber-NOAA merged 3 commits intodevelopfrom
DavidHuber-NOAA merged 3 commits intodevelopfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #65 +/- ##
===========================================
+ Coverage 60.24% 60.39% +0.15%
===========================================
Files 24 24
Lines 1972 1972
Branches 370 307 -63
===========================================
+ Hits 1188 1191 +3
+ Misses 727 726 -1
+ Partials 57 55 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: CoryMartin-NOAA <[email protected]>
Copilot
AI
changed the title
[WIP] Fix Vanilla YAML processing for regular dictionaries
Fix vanilla_yaml to process regular dicts containing datetime objects
Jan 8, 2026
CoryMartin-NOAA
approved these changes
Jan 8, 2026
Collaborator
|
@copilot please fix the pynorms test that is failing |
Co-authored-by: CoryMartin-NOAA <[email protected]>
Contributor
Author
CoryMartin-NOAA
approved these changes
Jan 8, 2026
DavidHuber-NOAA
approved these changes
Jan 8, 2026
Contributor
DavidHuber-NOAA
left a comment
There was a problem hiding this comment.
Looks good to me. Thanks for this additional functionality @CoryMartin-NOAA!
Contributor
|
Let us know when you are satisfied with your testing and mark it Ready for Review. |
Collaborator
|
Thanks @DavidHuber-NOAA. I love when I am debugging something for like 5 hours and it's a simple fix! haha |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The
vanilla_yamlfunction only recursively processedAttrDictinstances, leaving datetime objects (and other special types) unprocessed in regular Python dictionaries. This caused YAML serialization to fail when regular dicts containing datetime objects appeared in the data structure.Changes
isinstance(ctx, AttrDict)check toisinstance(ctx, dict)invanilla_yamlfunctionAttrDictinherits fromdict, existing behavior is preserved while extending support to regular dictionariesExample
Type of change
How Has This Been Tested?
Checklist
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.