Conversation
- Changed the return type of dedx_load_config from void to int, allowing it to return success or failure status. - Deleted the dedx_atima.c and dedx_atima.h files, removing unused ATIMA-related functions and data. - Updated error codes in dedx_error.h to remove references to ATIMA. - Removed the _dedx_get_atima_data function from dedx_file_access.c and its declaration in dedx_file_access.h. - Added tests in test_error_codes.c to verify error handling for invalid dataset IDs and configuration loading failures.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #87 +/- ##
==========================================
+ Coverage 70.54% 73.98% +3.43%
==========================================
Files 34 37 +3
Lines 2397 2856 +459
Branches 291 387 +96
==========================================
+ Hits 1691 2113 +422
+ Misses 698 693 -5
- Partials 8 50 +42 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR addresses error-handling correctness around configuration loading and stopping-power evaluation, and removes unused ATIMA-related code/data from libdedx.
Changes:
- Make
dedx_load_config()return success/failure and ensure failed loads don’t mark configs as loaded or assign a dataset id. - Fix
dedx_get_stp()to reject invalid dataset ids before dereferencing workspace data (preventing crashes). - Remove ATIMA-related headers/sources/data and the reserved ATIMA error code.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_error_codes.c | Adds regression tests for failed-load state and invalid dataset id handling. |
| libdedx/dedx.h | Changes dedx_load_config to return int and documents return value. |
| libdedx/dedx.c | Implements new dedx_load_config contract; fixes dataset-id validation order; refactors/cleans internal helpers and workspace allocation. |
| libdedx/dedx_tools.c | Removes stale TODO comments in CSDA/tooling helpers. |
| libdedx/dedx_file_access.h | Removes unused ATIMA file-access API declaration. |
| libdedx/dedx_file_access.c | Avoids probing empty local data path; removes ATIMA data reader implementation. |
| libdedx/dedx_error.h | Removes reserved ATIMA error code and updates doxygen range. |
| libdedx/dedx_atima.h | Deletes ATIMA header (unused). |
| libdedx/dedx_atima.c | Deletes ATIMA implementation (unused/incomplete). |
| libdedx/data/atima_compos | Removes ATIMA composition data file from the repo. |
| libdedx/CMakeLists.txt | Removes ATIMA data file from install/binary data lists. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ry management in dedx_wrappers.c
…ude dedx_elements.h
… typedefs to appropriate headers
…rparts for improved consistency and clarity
…clarity and organization
…e program identifiers for improved clarity and consistency
…or improved consistency and clarity
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 50 out of 50 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.