Skip to content

Migrate tests/test_stomp.py to NumPy array comparisons - #1215

Merged
seanlaw merged 1 commit into
stumpy-dev:mainfrom
karthiksenv:codex/migrate-stomp-comparisons
Nov 13, 2026
Merged

seanlaw merged 1 commit into
stumpy-dev:mainfrom
karthiksenv:codex/migrate-stomp-comparisons

Conversation

@karthiksenv

@karthiksenv karthiksenv commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Related to #1175. This follows Sean's request on #1212 to submit one test file per PR.

tests/test_stomp.py now uses assert_allclose for its 6 comparisons, with atol=1.5e-07, no explicit rtol, computed values first and cmp_/ref_ names. The object-typed matrix profiles are converted to float64 for numeric comparison, following the existing motif tests. Fixture values and non-comparison test logic are unchanged.

All 24 tests passed on Windows and Ubuntu with Numba JIT enabled and disabled, using seed 1175 (four passing runs). Each run reported 21 existing warnings that STOMP is unsupported and provided for reference. Black and flake8 passed for the changed file.

Full Ubuntu validation of commit be5d264961bf6b052d90f85ae05d8fe165ecfb6f completed with 2,363 passes and 32 skips in the JIT phase, then 2,510 passes and 17 skips in the coverage phase. Development setup, dependency checks, repository-wide Black, isort, flake8, docstring and fastmath checks passed. After the existing two RNG tests ran without the fixed seed and appended coverage, the repository report passed at 100% across 15,105 statements. Ray and pyFFTW were unavailable; CUDA used the simulator, with no physical GPU testing.

The GitHub Tests workflow passed on this commit.

OpenAI Codex assisted with the migration, validation and PR text.

Pull Request Checklist

Below is a simple checklist but please do not hesitate to ask for assistance!

  • Read our Contributing Guide
  • Referenced a Github issue (or create one if one doesn't already exist)
  • Read and reviewed all of the comments in the Github issue that you've referenced (along with cross-referenced issues/pull requests) to ensure that the issue still requires a pull request
  • Checked that the issue has not already been assigned to anybody else or is already being addressed in another pull request
  • Left a meaningful comment on the original Github issue to discuss the detailed approach for your contribution and received confirmation from the maintainers before proceeding with this pull request
  • Forked, cloned, and checked out the newest version of the code
  • Created a new branch
  • Made necessary code changes
  • Installed black (i.e., python -m pip install black or conda install -c conda-forge black)
  • Installed flake8 (i.e., python -m pip install flake8 or conda install -c conda-forge flake8)
  • Installed pytest-cov (i.e., python -m pip install pytest-cov or conda install -c conda-forge pytest-cov)
  • Ran black --exclude=".*\.ipynb" --extend-exclude=".venv" --diff ./ in the root stumpy directory
  • Ran flake8 --extend-exclude=.venv ./ in the root stumpy directory
  • Ran ./setup.sh dev && ./test.sh in the root stumpy directory and ensured that all tests are passing locally
  • Check this box if AI code assistance was used to generate
    • less than 25% of the code in this pull request
    • 25-50% of the code in this pull request
    • more than 50% of the code in this pull request

Please 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!

@gitnotebooks

gitnotebooks Bot commented Nov 8, 2026

Copy link
Copy Markdown

Review these changes at https://app.gitnotebooks.com/stumpy-dev/stumpy/pull/1215

@seanlaw

seanlaw commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

@karthiksenv is this ready for review?

@karthiksenv

Copy link
Copy Markdown
Contributor Author

Not yet. The 24 focused tests passed on Windows and Ubuntu with JIT enabled and disabled. The full Ubuntu run was interrupted before it finished, while running test_aamp_stimp.py, so I can't call this ready for review yet. Codex helped with the change and testing.

@karthiksenv
karthiksenv marked this pull request as ready for review November 11, 2026 23:58
@karthiksenv
karthiksenv requested a review from seanlaw as a code owner November 11, 2026 23:58
@karthiksenv

Copy link
Copy Markdown
Contributor Author

This is ready now, Sean. The full Ubuntu run passed 2,363 tests with 32 skips in the JIT phase and 2,510 with 17 skips in the coverage phase. The existing RNG tests with the seed unset brought coverage to 100%, and the GitHub Tests workflow passed too. I've updated the checklist and marked the PR ready for review. Ray and pyFFTW were unavailable, and CUDA used the simulator. Codex helped with validation and this update.

@karthiksenv

Copy link
Copy Markdown
Contributor Author

Hi @seanlaw, #1214 and #1215 are ready for review, with all CI checks passing and the full local test results documented. When you have a chance, could you review them and merge if everything looks good? Thanks for your time and guidance!

@seanlaw
seanlaw merged commit fe3c621 into stumpy-dev:main Nov 13, 2026
33 checks passed
@seanlaw

seanlaw commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

@karthiksenv Looks good. Thanks for the PR!

@karthiksenv

Copy link
Copy Markdown
Contributor Author

Thanks for the opportunity to help with the STOMP tests, Sean. I appreciate your patience while validation wrapped up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants