feat(copilot): add wordpress loader to extract#186
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #186 +/- ##
==========================================
+ Coverage 94.52% 96.03% +1.50%
==========================================
Files 7 7
Lines 1133 1361 +228
Branches 148 155 +7
==========================================
+ Hits 1071 1307 +236
+ Misses 52 44 -8
Partials 10 10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a WordPress REST API loader to palletjack.extract so callers can retrieve posts (or other endpoint records) into pandas DataFrames and fetch/parse media item metadata into typed models.
Changes:
- Introduces
WordpressRestLoaderwith automatic pagination viaX-WP-TotalPages, optional ACF field flattening, and configurable timeout/User-Agent. - Adds
WordpressMediaItem/WordpressMediaDetails/WordpressMediaSizedataclasses to parse/wp/v2/mediaresponses. - Expands
tests/test_extract.pywith coverage for the new loader and media parsing (plus minor SFTP test formatting changes).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/palletjack/extract.py |
Adds WordPress REST loader and media-response dataclasses. |
tests/test_extract.py |
Adds tests for WordPress pagination, params, ACF expansion, and media-item parsing. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot, add test cases to cover the changes you suggested in the last commit. |
…and_acf Agent-Logs-Url: https://github.com/agrc/palletjack/sessions/1564c949-48f9-453a-975a-0768d658066d Co-authored-by: jacobdadams <38168030+jacobdadams@users.noreply.github.com>
Added 5 new test cases in commit 4a4474c covering all the changes from the last commit:
|
Adding a wordpress loader to extract.py to load posts and/or media items from public Wordpress REST API endpoints.