owid-catalog v1.0.1: ResponseSet ergonomics (.items, .to_dict(), .to_frame(all_fields=))#5718
Merged
lucasrodes merged 12 commits intomasterfrom Feb 26, 2026
Merged
Conversation
Contributor
|
Quick links (staging server):
Login: chart-diff: ✅No charts for review.data-diff: ✅ No differences foundAutomatically updated datasets matching excess_mortality|covid|fluid|flunet|country_profile|garden/ihme_gbd/2019/gbd_risk are not included Edited: 2026-02-26 09:41:42 UTC |
Rename the redundant `.results` attribute to `.items` and add a `.to_dict()` method for easy serialization to plain dicts (useful for AI/LLM context windows). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allow users to pass `advanced=True/False` to `.to_frame()` to temporarily override the instance `_ui_advanced` setting without mutating it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Marigold
reviewed
Feb 26, 2026
|
|
||
| @property | ||
| def results(self) -> list[T]: | ||
| """Deprecated: use ``.items`` instead.""" |
Collaborator
There was a problem hiding this comment.
How about just removing it? I don't think we need to keep it backward compatible so early after release.
Member
Author
There was a problem hiding this comment.
technically it's a breaking change, but sure, we can drop it
|
⌛ Merge Schedule |
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.
Summary
ResponseSet.results→.itemsto eliminate the redundantresults.resultsaccess pattern.to_dict()method that returns[item.model_dump() for item in self.items]— useful for serializing search results into AI/LLM context windows. Use itresults.to_dict()all_fieldsparameter to.to_frame()to temporarily override display mode (basic vs all fields) without mutating instance statev1.0.1with changelog entryTest plan
make checkpasses (format, lint, typecheck)test_client.pypass (including 2 new tests forall_fields)self.resultsorResponseSet(results=references🤖 Generated with Claude Code
/schedule