Skip to content

Move tests out of installable distribution#829

Merged
maxrjones merged 2 commits intozarr-developers:mainfrom
maxrjones:move-tests
Mar 18, 2026
Merged

Move tests out of installable distribution#829
maxrjones merged 2 commits intozarr-developers:mainfrom
maxrjones:move-tests

Conversation

@maxrjones
Copy link
Member

This PR moves the tests outside the source code directory, so that they are not included with the distributions. This was originally included as part of #826, but is really a distinct change which belongs as its own PR.

Closes #509
TODO:

  • Unit tests and/or doctests in docstrings
  • Tests pass locally
  • Docstrings and API docs for any new/modified user-facing classes and functions
  • Changes documented in docs/release.rst
  • Docs build locally
  • GitHub Actions CI passes
  • Test coverage to 100% (Codecov passes)

@d-v-b
Copy link
Contributor

d-v-b commented Mar 18, 2026

this is great, thank you!

@QuLogic
Copy link
Contributor

QuLogic commented Mar 18, 2026

One note as a downstream packager: since they aren't in the package directory, it's totally fine if the tests are gone from the wheels now, but please if possible ensure that they stay in the sdist.

@d-v-b
Copy link
Contributor

d-v-b commented Mar 18, 2026

but please if possible ensure that they stay in the sdist.

how are the tests consumed downstream?

@maxrjones
Copy link
Member Author

One note as a downstream packager: since they aren't in the package directory, it's totally fine if the tests are gone from the wheels now, but please if possible ensure that they stay in the sdist.

thanks for keeping a watch on things! I manually verified that the sdist still includes the tests via uv run --with build python -m build --sdist. My understanding is that setuptools-scm automatically includes all git-tracked files.

@maxrjones
Copy link
Member Author

FYI the failures are the same as on main, so I will merge despite not having 100% checks

@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.33%. Comparing base (eab1742) to head (76f6a2b).
⚠️ Report is 1 commits behind head on main.

❌ Your project status has failed because the head coverage (99.33%) is below the target coverage (100.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #829   +/-   ##
=======================================
  Coverage   99.33%   99.33%           
=======================================
  Files          26       26           
  Lines         898      898           
=======================================
  Hits          892      892           
  Misses          6        6           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@QuLogic
Copy link
Contributor

QuLogic commented Mar 18, 2026

but please if possible ensure that they stay in the sdist.

how are the tests consumed downstream?

We run all tests that are possible; that's how I find arch-specific or release candidate bugs.

thanks for keeping a watch on things! I manually verified that the sdist still includes the tests via uv run --with build python -m build --sdist. My understanding is that setuptools-scm automatically includes all git-tracked files.

Thanks for checking! Sorry I didn't have time to do so before.

@maxrjones maxrjones merged commit c5f1af7 into zarr-developers:main Mar 18, 2026
34 of 40 checks passed
@maxrjones maxrjones deleted the move-tests branch March 18, 2026 20:26
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.

0.12.1: numcodecs/tests is part of the installable resources

3 participants