Repository navigation
Fix pageid for images - #549
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #549 +/- ##
==========================================
- Coverage 94.36% 94.04% -0.33%
==========================================
Files 72 76 +4
Lines 3339 3373 +34
==========================================
+ Hits 3151 3172 +21
- Misses 188 201 +13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
I'll create a PR description based on the changes from master. Let me first check the current branch and examine the changes.
Based on the changes from master, here's a comprehensive PR description:
Fix pageid generation for images and reorganize module structure
Summary
This PR fixes a critical issue with pageid generation for Wikipedia images and reorganizes the codebase into logical modules for better maintainability.
Key Changes
🐛 Bug Fixes
🏗️ Code Organization
wikipediaapi/_image/- Image-related classeswikipediaapi/_page/- Page-related classeswikipediaapi/_wikipedia/- Main Wikipedia client classes📝 Documentation Updates
Technical Details
Pageid Fix
The core issue was that
WikipediaImageobjects were generating random pageids instead of deterministic ones based on the image title. This caused:Solution: Implemented deterministic pageid generation using hash-based approach on image titles, ensuring:
Module Reorganization
The codebase was restructured from a flat layout to logical modules:
Before:
After:
Files Changed
Testing
Breaking Changes
None - This is a purely internal refactoring with full backward compatibility. All existing public APIs continue to work unchanged.
Migration Guide
No migration required - all existing code will continue to work without changes. The internal reorganization is transparent to users.
Quality Assurance
This PR improves code maintainability while fixing a critical bug and maintaining full backward compatibility.