Skip to content

Use numpy testing utilities instead of custom close_to* #6961

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

Merged
merged 7 commits into from
Oct 20, 2023

Conversation

erik-werner
Copy link
Contributor

@erik-werner erik-werner commented Oct 18, 2023

Closes #6748

What is this PR about?
This PR replaces our custom close_to* functions with numpy testing asserts with nice error displays and more careful array shape checking.

Checklist

Major / Breaking Changes

  • ...

New features

  • ...

Bugfixes

  • Fix test_simplex_accuracy() which was previously broken

Documentation

  • ...

Maintenance

  • Replace custom close_to functions with numpy equivalents

📚 Documentation preview 📚: https://pymc--6961.org.readthedocs.build/en/6961/

@welcome
Copy link

welcome bot commented Oct 18, 2023

Thank You Banner
💖 Thanks for opening this pull request! 💖 The PyMC community really appreciates your time and effort to contribute to the project. Please make sure you have read our Contributing Guidelines and filled in our pull request template to the best of your ability.

- The previous identity_f function returned an empty array.
  This was missed by our check but captured by numpy.
@ricardoV94 ricardoV94 changed the title [WIP] Fix issue #6748 Use numpy testing utilities instead of custom close_to* #6748 Oct 18, 2023
@ricardoV94 ricardoV94 changed the title Use numpy testing utilities instead of custom close_to* #6748 Use numpy testing utilities instead of custom close_to* Oct 18, 2023
@codecov
Copy link

codecov bot commented Oct 18, 2023

Codecov Report

Merging #6961 (11c953c) into main (03f9f72) will decrease coverage by 20.20%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #6961       +/-   ##
===========================================
- Coverage   89.01%   68.82%   -20.20%     
===========================================
  Files         100      100               
  Lines       16859    16857        -2     
===========================================
- Hits        15007    11601     -3406     
- Misses       1852     5256     +3404     

see 63 files with indirect coverage changes

@erik-werner erik-werner marked this pull request as ready for review October 18, 2023 15:13
@erik-werner
Copy link
Contributor Author

@ricardoV94 Any idea about what happened here? The measured code coverage has gone down by 20%.

@ricardoV94
Copy link
Member

ricardoV94 commented Oct 20, 2023

The codecov is stupid, it doesn't rerun after the first time, and if that failed that's what stays: #6660

No need to worry about it in your case

@ricardoV94 ricardoV94 merged commit eb1d63a into pymc-devs:main Oct 20, 2023
@welcome
Copy link

welcome bot commented Oct 20, 2023

Congratulations Banner
Congrats on merging your first pull request! 🎉 We here at PyMC are proud of you! 💖 Thank you so much for your contribution 🎁

@ricardoV94
Copy link
Member

Thanks a ton @erik-werner

@erik-werner erik-werner deleted the issue_6748 branch October 20, 2023 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use numpy testing utilities instead of custom close_to*
2 participants