Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #56 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 4
Lines 380 384 +4
Branches 65 66 +1
=========================================
+ Hits 380 384 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Thank you for your contribution! AntroPy now has guidelines for pull requests, including specific steps for AI-assisted PRs: #61 Before I review this PR, could you please go through those steps and update the PR accordingly? In particular: state the user-impact rating (P1-P3) with a short justification, start the description with a summary in your own words, report the exact AI model used (if any), and run an AI review and post a summary of it as a comment. Thanks! |
|
Returned this to draft while applying the new guidelines. The original changes and this AI review used AI review: checked the final diff, the zero-crossing convention for zero derivatives, signed/unsigned 64-bit comparisons, booleans, axis handling, and the independent Python-integer reference. No new correctness issue was found. The floating path is unchanged. The recorded EEG/piano replay again checks 4,158 feature values with no mismatch, and every result matches the previous validated revision. The full suite and Ruff checks pass. The simplification pass found no further change needed: direct comparisons avoid both subtraction overflow and loss of close 64-bit integers through a float cast. The single added regression covers those distinct dtype cases and both axes. No changelog change or extra tests were added. Suggested impact: P2, since integer ADC input is legitimate and gives incorrect feature values, while floating inputs are unaffected. The opening summary still needs to be written by the human contributor before this is ready for review. |
| assert_allclose(aal(petrosian_fd, axis=1, arr=data), petrosian_fd(data)) | ||
| assert_allclose(aal(petrosian_fd, axis=0, arr=data), petrosian_fd(data, axis=0)) | ||
|
|
||
| def test_petrosian_integer_differences(self): |
There was a problem hiding this comment.
Please trim the tests as much as possible, while ensuring 100% coverage of the new if else. No need to test for all possible int dtypes
There was a problem hiding this comment.
Trimmed to one uint8 case in b9019b0. It and the existing floating tests cover both outcomes of the new branch.
|
Trimmed to one uint8 regression in |
|
The current red coverage job failed in Codecov's report upload: |
petrosian_fdtakesnp.diffin the input dtype before counting changes in derivative sign. Unsigned inputs cannot represent falling differences, while narrow signed inputs can overflow. For example,np.array([10, 4, 9, 3, 8, 2, 7], dtype=np.uint8)gives 1 instead of approximately 1.1483.For integer and boolean inputs, compare neighboring values directly and count changes between falling and non-falling steps. This also preserves full 64-bit integer comparisons. Keep the existing floating-point path.
Keep one uint8 regression for the integer path; the existing floating tests cover the other branch, and both new branch outcomes are covered. The larger dtype/layout matrix stays in the external recorded-data evidence. Full tests and Ruff pass. An independent Python-integer sign-change reference on recorded EEG and piano ADC traces checks 4,158 feature values across 42 dtype/layout calls: 1,188 wrong unsigned results become correct. All 1,188 floating-point feature controls are unchanged. This validates feature computation, without a clinical or classification-quality claim.
Impact: P2. Integer ADC input is legitimate and can give incorrect feature values; the floating path is unchanged. Original implementation and AI review:
gpt-6.1-solvia Codex. This remains a draft pending the human contributor's opening summary.