Repository navigation
Split files into smaller ones - #517
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #517 +/- ##
==========================================
- Coverage 94.21% 88.85% -5.37%
==========================================
Files 17 62 +45
Lines 2421 2853 +432
==========================================
+ Hits 2281 2535 +254
- Misses 140 318 +178 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merged
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.
Pull Request Description
Summary
This PR refactors the Wikipedia-API codebase by splitting large monolithic files into smaller, more focused modules. The restructuring improves code organization, maintainability, and follows Python best practices for module design.
Changes Overview
📁 Module Restructuring
Split 4 large files into 35+ focused modules:
_enums.py → _enums/ package (13 files)
coordinate_type.py,coordinates_prop.py,direction.pygeosearch_sort.py,globe.py,namespace.pyredirect_filter.py,search_info.py,search_prop.pysearch_qi_profile.py,search_sort.py,search_what.py_http_client.py → _http_client/ package (5 files)
base_http_client.py,async_http_client.py,sync_http_client.pyretry_utils.py,retry_after_wait.py_params.py → _params/ package (8 files)
base_params.py,coordinates_params.py,geo_search_params.pyimages_params.py,random_params.py,search_params.pyprotocols.py_types.py → _types/ package (7 files)
coordinate.py,geo_box.py,geo_point.pygeo_search_meta.py,search_meta.py,search_results.py_resources.py → _resources/ package (3 files)
base_wikipedia_resource.py,wikipedia_resource.py,async_wikipedia_resource.pyNew exceptions package (6 files)
wikipedia_exception.py,wiki_connection_error.pywiki_http_error.py,wiki_http_timeout_error.pywiki_invalid_json_error.py,wiki_rate_limit_error.pyNew pages_dict package (3 files)
base_pages_dict.py,pages_dict.py,async_pages_dict.py🔄 Import Updates
wikipediaapi/__init__.py)📊 Impact Statistics
Benefits
🏗️ Improved Code Organization
🔧 Enhanced Maintainability
📚 Better Developer Experience
🚀 Future Extensibility
Backward Compatibility
✅ Fully Backward Compatible
Testing
Migration Notes
For Library Users: No changes required - all existing imports continue to work.
For Contributors: When working with internal code, use the new module structure: