-
Notifications
You must be signed in to change notification settings - Fork 5
Add tests for mrtrix utils + tsf export #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #26 +/- ##
===========================================
+ Coverage 73.40% 85.67% +12.26%
===========================================
Files 18 9 -9
Lines 2824 2917 +93
Branches 466 462 -4
===========================================
+ Hits 2073 2499 +426
+ Misses 751 418 -333
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:
|
There was a problem hiding this 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 pull request adds comprehensive test coverage for MRtrix utilities and TSF (Track Scalars File) export functionality in the TRX library. The changes enhance the library's ability to handle both text and binary TSF formats, with proper support for endianness conversion and robust error handling.
Changes:
- Added tests for utility functions including dtype detection, dtype code mapping, and path normalization
- Implemented binary TSF format support in
add_dpv_from_tsfwith endianness handling for Float32/Float64 LE/BE formats - Added new
export_dpv_to_tsffunction to export data-per-vertex to TSF format with proper header alignment and binary encoding - Enhanced test coverage with helper functions for TSF file generation and validation
- Updated codecov configuration to exclude third_party and examples directories
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_trx_mmap.cpp | Added tests for path normalization, dtype size mappings, and dtype code conversions to ensure utility functions work correctly |
| tests/test_trx_io.cpp | Added comprehensive test suite for TSF import/export with test helpers, covering both success and error scenarios for text/binary formats |
| include/trx/trx.tpp | Enhanced add_dpv_from_tsf to support binary TSF formats with endianness conversion; added new export_dpv_to_tsf function for TSF export |
| include/trx/trx.h | Added function declaration for export_dpv_to_tsf and necessary includes for the new functionality |
| codecov.yml | Updated coverage configuration to ignore third_party and examples directories from coverage reports |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.