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
Add memray support #7376
Add memray support #7376
Conversation
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## master #7376 +/- ##
=======================================
Coverage 76.56% 76.56%
=======================================
Files 456 456
Lines 36877 36877
=======================================
Hits 28234 28234
Misses 8643 8643
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -78,6 +78,7 @@ test = | |||
pytest>=6.0.0 | |||
pytest-cov>=2.9.0 | |||
pytest-doctestplus>=0.10.0 | |||
pytest-memray |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this require a version number?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, failing CI are from the tests that fail on Python 3.11
Unless there are cases/reasons to check memory usage during CI, I would think we do not want it on by default. However, if this feature can be test-specific, developing some canary-in-the-mine tests would be useful. |
7cb69a6
to
fd86e1c
Compare
This PR adds usage of the
pytest-memray
plugin to the tests. This is part of the effort to begin tracking memory usage in JWST (and other packages, see SCSB-57.Some questions:
pytest-memray
on by default? Unfortunately, it currently is not supported by Windows and will cause the unit tests to fail during collection if it is used there.pytest-memray
need documentation somewhere in the JWST docs?pytest-memray
docs? (Maybe this should be done in a series of follow-up PRs)In a future version of
pytest-memray
there should be support for catching memory leaks, see bloomberg/pytest-memray#52. This maybe very useful for catching future memory issues.Note that until bloomberg/pytest-memray#60 is resolved, we should not merge this PR.
Checklist for maintainers
CHANGES.rst
within the relevant release sectionHow to run regression tests on a PR