Skip to content

Conversation

@ConnorStoneAstro
Copy link
Owner

No description provided.

@ConnorStoneAstro ConnorStoneAstro added the enhancement New feature or request label Oct 31, 2025
@codecov-commenter
Copy link

codecov-commenter commented Oct 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (143f39a) to head (9c9a9b2).

Additional details and impacted files
@@            Coverage Diff            @@
##              main        #7   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines          233       238    +5     
=========================================
+ Hits           233       238    +5     

☔ 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

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 modifies the return behavior of pted and pted_coverage_test functions to consistently return the p-value when return_all=True, changing the return signature from a 2-tuple to a 3-tuple.

  • Modified pted() to return a 3-tuple (test, permute, p) when return_all=True instead of a 2-tuple
  • Modified pted_coverage_test() to similarly return a 3-tuple (test_stats, permute_stats, p) when return_all=True
  • Updated test files to unpack the new 3-tuple return values

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/pted/pted.py Updated return signatures and logic for both pted() and pted_coverage_test() to include p-value in the tuple when return_all=True; added two_tailed=False parameter to internal pted call; added clamping logic for two-tailed test
src/pted/utils.py Added debug print statement to confidence_alert() function
tests/test_pted.py Updated test assertions to unpack 3-tuple returns from pted() and pted_coverage_test() when return_all=True
Comments suppressed due to low confidence (1)

src/pted/pted.py:173

  • The return type annotation is incorrect. When return_all=True, the function now returns a 3-tuple (np.ndarray, np.ndarray, float), but the type hint only specifies a 2-tuple. This should be updated to Union[float, tuple[np.ndarray, np.ndarray, float]] to match the actual return behavior.
) -> Union[float, tuple[np.ndarray, np.ndarray]]:

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ConnorStoneAstro
Copy link
Owner Author

Closes #6

@ConnorStoneAstro ConnorStoneAstro merged commit 2f616a0 into main Oct 31, 2025
12 checks passed
@ConnorStoneAstro ConnorStoneAstro deleted the realreturnall branch October 31, 2025 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Return both Energy Distance and p value when return_all is set to True

3 participants