Update to new Pangaeapy version - #62
Merged
Merged
Conversation
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.
pangaeapy 1.1.2changedPanDataSet.eventsfrom a list of PanEvent objects to a dict of{eventLabel: PanEvent}. Every place in pyleotups that did for ev inself._panobj.events: was now iterating over dict keys (plain strings) instead of PanEvent objects, soev.latitudeblew up withAttributeError: 'str' object has no attribute 'latitude'. That one change cascaded into_compute_coverage(),get_geo(), and the "Sites" field ofto_summary_dict()— which is whysearch_studies(),get_summary(),get_geo(),get_variables(),get_funding(), andget_publications()all failed (they all end up callingto_summary_dict()).Fix
Added
PangaeaStudy._iter_events()— a small compatibility shim that returns events.values() if events is a dict, else events itself — and routed the three call sites through it instead of touchingself._panobj.eventsdirectly. This keeps pyleotups working against both the old list-shaped and new dict-shaped events, so it won't silently break again if the pin drifts either direction.Verified
pyleotups/tests/test_PangaeaDataset.py: 10/10 pass (was 0/10)
Full suite: 121/121 pass, no regressions elsewhere
Confirmed no other .events usage in the codebase bypasses the new helper
No other pangaeapy API shapes (params, projects, relations, supplement_to, collection_members, isCollection, abstract/title/doi/keywords properties) appear to have changed — all those tests were passing already and stayed green.
Manually tested on the tutorials.
AI Use
Fix was made by Claude. Manually checked on the tutorials to ensure proper working conditions.