Conversation
- Update to c2patool v0.26.1 with prebuilt binaries - Replace stds.schema-org.CreativeWork with c2pa.metadata - Update ingredient references to c2pa.ingredient.v3 - Add optional claim_generator_version parameter - Support IPTC and C2PA URI formats for digitalSourceType - Improve EXIF GPS format (degrees,minutes with direction) - Remove unused create_custom_c2pa_manifest function Breaking changes: - Removed create_custom_c2pa_manifest from public API - creator_name is now optional in create_c2pa_manifest
- Upgrade actions/checkout from v3 to v5 - Upgrade actions/setup-python from v3 to v6 - Remove Python 3.8 (not available on ubuntu-latest) - Add Python 3.12 and 3.13 to test matrix - Update publish workflow to use Python 3.9 Fixes pip cache 400 error caused by outdated actions/setup-python@v3
- Bump version from 0.3.0 to 0.4.0 - Remove Python 3.7 and 3.8 support - Add Python 3.11, 3.12, and 3.13 support - Update python_requires from >=3.7 to >=3.9 - Update tox env_list to test py39-py313 Aligns with C2PA spec v2.2 upgrade and ubuntu-latest support
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR successfully upgrades the numbers-c2pa library to support C2PA specification v2.2 and c2patool v0.26.1, modernizing the codebase to support current Python versions (3.9-3.13) while dropping support for Python 3.7 and 3.8.
Key Changes:
- Refactored metadata assertions from schema.org CreativeWork to native c2pa.metadata format with EXIF/IPTC namespaces
- Updated geolocation formatting from decimal to DMS (Degrees, Minutes, Seconds) format per EXIF standards
- Made
creator_nameoptional in manifest creation API and removed the deprecatedcreate_custom_c2pa_manifestfunction - Updated c2patool integration to use c2pa.ingredient.v3 label for compatibility with v0.26.1
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/numbers_c2pa/core.py | Core refactoring: converted creative work assertions to c2pa.metadata format, updated geolocation to DMS format, made creator_name optional, removed custom manifest function, updated ingredient references to v3 |
| src/numbers_c2pa/init.py | Removed deprecated create_custom_c2pa_manifest from public API exports |
| setup.cfg | Version bump to 0.4.0, updated Python version support (3.9-3.13), modernized tox environment list |
| README.md | Added comprehensive c2patool v0.26.1 installation instructions for macOS, Linux, and Windows platforms |
| .github/workflows/python-publish.yml | Updated GitHub Actions to v5/v6, changed base Python version from 3.8 to 3.9 |
| .github/workflows/build.yml | Updated GitHub Actions to v5/v6, expanded test matrix to Python 3.9-3.13 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add coordinate range validation for lat/lon - Return None for invalid coordinates to skip EXIF fields - Require both lat and lon to be valid before adding GPS data - Add isinstance check for date_captured consistency - Support https:// URIs in digital_source_type - Improve digital_source_type documentation with examples Addresses review comments for better input validation and docs
Break line 230 to stay within 120 character limit (E501)
Remove superfluous parentheses in range checks (C0325)
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.
Upgrade to C2PA spec v2.2 and c2patool v0.26.1
Changes
Breaking Changes:
create_custom_c2pa_manifestfrom public APIcreator_nameis now optional increate_c2pa_manifest