Skip to content

fix #74#87

Merged
nbassler merged 24 commits into
mainfrom
74-resolve-outstanding-todofixme-comments-in-source
Mar 31, 2026
Merged

fix #74#87
nbassler merged 24 commits into
mainfrom
74-resolve-outstanding-todofixme-comments-in-source

Conversation

@nbassler
Copy link
Copy Markdown
Member

No description provided.

- 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.
Copilot AI review requested due to automatic review settings March 31, 2026 15:58
@nbassler nbassler linked an issue Mar 31, 2026 that may be closed by this pull request
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 31, 2026

Codecov Report

❌ Patch coverage is 69.06318% with 284 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.98%. Comparing base (8507275) to head (0d39c9c).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
libdedx/dedx.c 71.16% 47 Missing ⚠️
tests/test_core_api.c 48.83% 27 Missing and 17 partials ⚠️
tests/test_tools.c 43.54% 23 Missing and 12 partials ⚠️
libdedx/dedx_wrappers.c 63.33% 33 Missing ⚠️
libdedx/dedx_validate.c 60.75% 31 Missing ⚠️
libdedx/dedx_file_access.c 74.22% 25 Missing ⚠️
tests/test_mstar.c 72.28% 14 Missing and 9 partials ⚠️
examples/dedx_get.c 33.33% 16 Missing ⚠️
tests/test_validate_internal.c 89.04% 4 Missing and 4 partials ⚠️
libdedx/dedx_tools.c 75.86% 7 Missing ⚠️
... and 5 more
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 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.

Comment thread libdedx/dedx.c
Comment thread libdedx/dedx.c Outdated
Comment thread libdedx/dedx_tools.c Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread libdedx/dedx_mstar.c Outdated
Comment thread libdedx/dedx_wrappers.c Outdated
Comment thread libdedx/dedx_wrappers.c Outdated
Comment thread libdedx/dedx_tools.c
Comment thread CONTRIBUTING.md Outdated
@nbassler nbassler linked an issue Mar 31, 2026 that may be closed by this pull request
@nbassler nbassler merged commit dd367e7 into main Mar 31, 2026
22 checks passed
@nbassler nbassler deleted the 74-resolve-outstanding-todofixme-comments-in-source branch March 31, 2026 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix memory leaks in dedx_wrappers.c helper APIs Resolve outstanding TODO/FIXME comments in source

2 participants