Skip to content

Move tests out of installable distribution - #829

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

maxrjones merged 2 commits into
zarr-developers:mainfrom
maxrjones:move-tests

Conversation

@maxrjones

Copy link
Copy Markdown
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

d-v-b commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

this is great, thank you!

@QuLogic

QuLogic commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

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

d-v-b commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

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

how are the tests consumed downstream?

@maxrjones

Copy link
Copy Markdown
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
Copy Markdown
Member Author

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

@codecov

codecov Bot commented Mar 18, 2026 •

Copy link
Copy Markdown

Codecov Report

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

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

QuLogic commented Mar 18, 2026

Copy link
Copy Markdown
Contributor

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
d-v-b added a commit to d-v-b/numcodecs that referenced this pull request Sep 17, 2026
Restructure the Unreleased section into a 0.17.0 release section with
Breaking changes / Deprecations / Maintenance headings.

- Add missing entries for the Python 3.12 / NumPy 2.0 minimums (zarr-developers#834) and
  the pcodec 1.x update (zarr-developers#817), neither of which was documented.
- Move the tests relocation (zarr-developers#829) and the removal of DISABLE_NUMCODECS_CEXT
  (zarr-developers#826) from Maintenance to Breaking changes, and note that tests are still
  shipped in the sdist.
- Document the delta_spec="none" -> "no_op" deprecation (zarr-developers#817).
- Fix leftover RST roles (:user:/:issue:) from the Markdown conversion, which
  do not render under MyST, and convert RST literal blocks to fenced code.
- Add entries for the remaining maintenance PRs since v0.16.5.

Assisted-by: ClaudeCode:claude-opus-5

Co-Authored-By: Claude Opus 5 <[email protected]>
d-v-b added a commit that referenced this pull request Sep 17, 2026
Restructure the Unreleased section into a 0.17.0 release section with
Breaking changes / Deprecations / Maintenance headings.

- Add missing entries for the Python 3.12 / NumPy 2.0 minimums (#834) and
  the pcodec 1.x update (#817), neither of which was documented.
- Move the tests relocation (#829) and the removal of DISABLE_NUMCODECS_CEXT
  (#826) from Maintenance to Breaking changes, and note that tests are still
  shipped in the sdist.
- Document the delta_spec="none" -> "no_op" deprecation (#817).
- Fix leftover RST roles (:user:/:issue:) from the Markdown conversion, which
  do not render under MyST, and convert RST literal blocks to fenced code.
- Add entries for the remaining maintenance PRs since v0.16.5.

Assisted-by: ClaudeCode:claude-opus-5

Co-authored-by: Claude Opus 5 <[email protected]>
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