Add face attributes and fix jsonable by updating capybara-docsaid to 0.12.0#15
Merged
kunkunlin1221 merged 4 commits intomainfrom Aug 29, 2025
Merged
Add face attributes and fix jsonable by updating capybara-docsaid to 0.12.0#15kunkunlin1221 merged 4 commits intomainfrom
kunkunlin1221 merged 4 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds face attributes functionality to the pyface library. It updates dependencies, improves JSON serialization for face objects, and adds comprehensive testing for the new jsonable functionality.
- Update capybara-docsaid dependency to version 0.12.0 or higher
- Enhance JSON serialization by replacing custom base64 encoding with capybara utility functions
- Add comprehensive test suite for face object JSON serialization functionality
Reviewed Changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/test_jsonable.py | New test file for validating face object JSON serialization with parametrized test cases |
| pyproject.toml | Updates dependency requirement for capybara-docsaid to minimum version 0.12.0 |
| pyface/object.py | Replaces custom base64 encoding with capybara utility functions and adds jsonable functions for new fields |
| pyface/face_service.py | Minor formatting cleanup removing unnecessary blank line |
| .github/workflows/release.yml | Improves version bumping regex pattern to be more robust |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
ba70b5f to
0d340aa
Compare
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.
This pull request introduces significant improvements to the JSON serialization and deserialization capabilities of the
pyfacelibrary, particularly for face-related objects. It addsfrom_jsonclass methods to core dataclasses, refines encoding/decoding logic for image and numpy data, and ensures compatibility with updated dependencies. Additionally, a new test verifies the correctness of the JSON (de)serialization process.Enhancements to JSON (de)serialization:
from_jsonclass methods to key dataclasses (Eye,Mouth,WhetherOrNot,Liveness,TDDFA,Encode,Who,Attribute,Face,Faces), enabling robust and consistent deserialization from JSON for all face-related objects. [1] [2] [3] [4] [5]Faceand related classes, standardizing the use ofcapybarautility functions for base64 conversions. [1] [2]pyface/__init__.py.Dependency and compatibility updates:
capybara-docsaidto0.12.0inpyproject.tomlto ensure compatibility with new features.pybase64import frompyface/object.pysince base64 operations are now handled bycapybara.Testing improvements:
tests/test_jsonable.py) to verify that face data can be serialized to JSON and accurately reconstructed, ensuring data integrity for the newfrom_jsonmethods.Minor bug fixes:
lmk68pttolmk3d68ptin both theTDDFAdataclass and its usage inface_service.pyfor consistency. [1] [2]face_service.pyfor improved readability.