Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for JSON and CBOR (Concise Binary Object Representation) formats to the psm_utils I/O module, providing lossless serialization of PSM data structures.
- Implements JSON and CBOR reader/writer classes following the existing psm_utils I/O patterns
- Adds comprehensive test coverage for both formats including roundtrip testing
- Updates documentation and configuration to include the new formats
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_io/test_json.py | Comprehensive test suite for JSON reader/writer with roundtrip validation |
| tests/test_io/test_cbor.py | Comprehensive test suite for CBOR reader/writer with conditional import handling |
| pyproject.toml | Adds optional dependencies for cbor2 package |
| psm_utils/io/json.py | JSON reader/writer implementation with lossless PSM serialization |
| psm_utils/io/cbor.py | CBOR reader/writer implementation with binary format support |
| psm_utils/io/init.py | Registers JSON and CBOR as supported file types |
| example_files/example.psm_utils.tsv | Example TSV data file for reference |
| example_files/example.psm_utils.json | Example JSON output demonstrating the new format |
| docs/source/api/psm_utils.io.rst | API documentation updates for new formats |
| README.rst | Updates supported file formats table with JSON and CBOR entries |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #129 +/- ##
==========================================
+ Coverage 70.12% 70.86% +0.74%
==========================================
Files 30 32 +2
Lines 3059 3192 +133
==========================================
+ Hits 2145 2262 +117
- Misses 914 930 +16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Added
io: Add io support for JSON and CBOR formats, following thepsm_utilsPSM data structure.