Repository navigation
Related to #1175: Migrate tests/test_snippets.py to npt.assert_allclose - #1221
Conversation
|
Review these changes at https://app.gitnotebooks.com/stumpy-dev/stumpy/pull/1221 |
|
Related to #1175. This PR migrates only tests/test_snippets.py; the full migration remains open. |
|
The Tests workflow for current head This is a request to run CI, not a request for code review or merge before the checklist is complete. The PR explicitly records the focused/adjacent checks and that the full repository suite was not yet run. I am now running the documented |
|
The documented
The PR description now includes the completed project checklist and the limits: Ray/pyFFTW were unavailable, CUDA was simulated, and Linux/Windows/physical GPU execution was not performed locally. The change remains limited to this one test file; it does not close umbrella #1175. With that local checklist complete, could you review the migration when convenient and consider merging it if the approach and upstream CI are satisfactory? Thank you. |
|
@austinchennn Thank you for the PR! Would you mind doing another migration? |
|
Thank you for merging this! I'd be happy to help with another migration. I'll check the current #1175 claims and confirm the next file and approach there before starting, so I don't overlap another contributor. |
Related to #1175
Description
Migrate all 28
npt.assert_almost_equalcalls intests/test_snippets.pytonpt.assert_allclose. This file compares STUMPY's MPdist profiles and snippet outputs with naive reference implementations. Each call now passes the STUMPYcmp_value asactualand the naiveref_value asdesired. No test cases or snippet behavior were changed.Tolerances and limits
decimal=config.STUMPY_TEST_PRECISIONnow useatol=1.5 * 10**-config.STUMPY_TEST_PRECISION(Black formatting). The current setting is 5.decimal=7now useatol=1.5e-07.rtolargument was added, as requested in Migrate tonpt.assert_allclose#1175. In the installed NumPy 2.4.6,assert_allclosedefaults tortol=1e-07, so this is not mathematically identical to an absolute-only comparison for every possible input. The tested cases pass. I did not changeconfig.pyor the test data.Testing
Validated on macOS with Python 3.11.15, NumPy 2.4.6 and Numba 0.68.1, using the OpenMP runtime setup from the repository's macOS CI and the default RNG configuration (
STUMPY_SEEDunset)../setup.sh dev && ./test.sh— completed with exit status 0. Repository Black, isort, Flake8, docstring and applicable fastmath checks passed.tests/test_snippets.pypassed all 147 cases in the full runs. After installingpytest-covas requested by the checklist, a final focused run also passed 147 cases.git diff --check— passed; the PR commit remains unchanged.Pull Request Checklist
Below is a simple checklist but please do not hesitate to ask for assistance!
black(i.e.,python -m pip install blackorconda install -c conda-forge black)flake8(i.e.,python -m pip install flake8orconda install -c conda-forge flake8)pytest-cov(i.e.,python -m pip install pytest-covorconda install -c conda-forge pytest-cov)black --exclude=".*\.ipynb" --extend-exclude=".venv" --diff ./in the root stumpy directoryflake8 --extend-exclude=.venv ./in the root stumpy directory./setup.sh dev && ./test.shin the root stumpy directory and ensured that all tests are passing locallyPlease do not commit any code to avoid/circumvent a failing test and, instead, engage in a discussion (below) to determine the best course of action.
Only request a review after the checklist above is fully completed!