Refactor MediaInfo handling to unify claims and statements; update te…#843
Merged
Refactor MediaInfo handling to unify claims and statements; update te…#843
Conversation
fbc1a4e to
20ceebd
Compare
a5153d1 to
b7740d4
Compare
…sts and documentation
b7740d4 to
8b78700
Compare
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors MediaInfo entity handling to properly manage the conversion between "claims" and "statements" fields, addressing compatibility differences between Wikidata and Wikimedia Commons APIs. The changes unify the handling of these fields and improve test coverage.
Key changes:
- Uncommented and improved the claims/statements conversion logic in MediaInfo JSON serialization
- Enhanced test suite with proper setUp/tearDown methods for configuration management
- Added documentation explaining the claims/statements field compatibility handling
Reviewed Changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| wikibaseintegrator/entities/mediainfo.py | Activated and improved claims-to-statements conversion logic with proper type checking |
| test/test_entity_mediainfo.py | Enhanced test setup with proper config management and added new tests for claims/statements functionality |
| README.md | Added documentation explaining MediaInfo claims/statements field compatibility |
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.
…sts and documentation