Skip to content

Migrate MSTUMPED test comparisons to assert_allclose - #1228

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

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

Conversation

@karthiksenv

Copy link
Copy Markdown
Contributor

Related to #1175. Sean confirmed the scope.

Migrate the 22 comparisons in tests/test_mstumped.py to assert_allclose. Compare the distributed result first and the naive result second. Use atol=1.5e-07 for 21 comparisons and preserve the configured tolerance for the identical-subsequence case.

All 54 tests in the affected file passed on Ubuntu with JIT enabled and disabled, both before and after the change. Windows execution stopped during Dask cluster startup, before reaching the test assertions.

On Ubuntu, ./setup.sh dev && ./test.sh completed on 28c4401. The JIT phase passed 2,363 tests with 32 skips, and the coverage phase passed 2,510 with 17 skips. Coverage reached 100% across 15,109 statements using the default RNG initialization. The repository-wide formatting, lint, docstring and fastmath checks passed. All 216 source files and their executable bits matched the archived commit after validation. Ray and pyFFTW were unavailable, and the run used CUDA simulation.

OpenAI Codex assisted with the migration and validation.

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 16, 2026

Copy link
Copy Markdown

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

@karthiksenv karthiksenv mentioned this pull request Nov 17, 2026
8 tasks
@seanlaw

seanlaw commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@karthiksenv Is this one ready for review?

@karthiksenv
karthiksenv marked this pull request as ready for review November 17, 2026 01:10
@karthiksenv
karthiksenv requested a review from seanlaw as a code owner November 17, 2026 01:10
@karthiksenv

Copy link
Copy Markdown
Contributor Author

Yes, thanks Sean! I marked it ready for review. The MSTUMPED tests passed locally on Ubuntu with JIT on and off, the full suite reached 100% coverage, and all 31 CI jobs that ran passed.

@seanlaw
seanlaw merged commit 861e88b into stumpy-dev:main Nov 17, 2026
32 checks passed
@seanlaw

seanlaw commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@karthiksenv Thanks for the PR!

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