Skip to content

Implement web-poet serializers#268

Merged
Gallaecio merged 7 commits intomainfrom
web-poet-serialization
Jan 20, 2026
Merged

Implement web-poet serializers#268
Gallaecio merged 7 commits intomainfrom
web-poet-serialization

Conversation

@Gallaecio
Copy link
Contributor

No description provided.

@Gallaecio Gallaecio requested a review from Copilot January 9, 2026 12:14
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements serialization support for web-poet page input types (Actions, Geolocation, Screenshot) to enable proper persistence and reconstruction of these objects. The serializers convert objects to/from a dictionary format suitable for storage or transmission.

  • Adds _serialization.py module with serialize/deserialize functions for Actions, Geolocation, and Screenshot
  • Registers the serializers with web-poet's serialization system
  • Imports the serialization module in __init__.py to ensure registration happens at package import time

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
scrapy_zyte_api/_serialization.py New module defining serialization/deserialization functions for Actions, Geolocation, and Screenshot classes
scrapy_zyte_api/init.py Imports the serialization module to trigger registration of serializers

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.36%. Comparing base (8e393e5) to head (2578eed).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #268      +/-   ##
==========================================
+ Coverage   97.33%   97.36%   +0.03%     
==========================================
  Files          14       15       +1     
  Lines        1916     1939      +23     
  Branches      356      356              
==========================================
+ Hits         1865     1888      +23     
  Misses         25       25              
  Partials       26       26              
Files with missing lines Coverage Δ
scrapy_zyte_api/__init__.py 100.00% <100.00%> (ø)
scrapy_zyte_api/_page_inputs.py 100.00% <100.00%> (ø)
scrapy_zyte_api/_serialization.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Gallaecio
Copy link
Contributor Author

Test issues have been addressed by #269, and are unrelated.

@Gallaecio Gallaecio marked this pull request as ready for review January 20, 2026 12:12
@Gallaecio Gallaecio merged commit e69c30b into main Jan 20, 2026
22 checks passed
@wRAR wRAR deleted the web-poet-serialization branch January 21, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants