Skip to content

Clean up test coverage: omit generators, drop dead dtypes copy, test tutorial offline - #11703

Merged
headtr1ck merged 3 commits into
pydata:mainfrom
headtr1ck:omit-generators-from-coverage
Oct 9, 2026
Merged

headtr1ck merged 3 commits into
pydata:mainfrom
headtr1ck:omit-generators-from-coverage

Conversation

@headtr1ck

Copy link
Copy Markdown
Collaborator

Description

Fixes some misleading entries in the Codecov report.

  • Omit xarray/util/generate_*.py from the coverage. They are run by hand and never imported by the tests (mypy already excludes them).
  • Remove xarray/namedarray/dtypes.py. It was copied from xarray/core/dtypes.py in copy the dtypes module to the namedarray package. #8250 towards a standalone namedarray, but nothing ever imported it (namedarray uses xarray.core.dtypes), and the copy has fallen behind (no extension or string dtype support).
  • Test xarray.tutorial without network access by faking pooch.retrieve, raising its coverage from ~29% to 99%. The existing download tests stay behind @network.

Checklist

  • Tests added
  • User visible changes (including notable bug fixes) are documented in whats-new.rst

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.
      Tools: Claude Code

[This is Claude Code on behalf of Michael Niklas]

🤖 Generated with Claude Code

headtr1ck and others added 2 commits October 9, 2026 20:46
…tutorial offline

- Omit the code generators in xarray/util from the coverage, they are run
  by hand and never imported by the tests
- Remove xarray/namedarray/dtypes.py, which was copied from
  xarray/core/dtypes.py in pydata#8250 for a standalone namedarray but never
  used, and has diverged since
- Test xarray.tutorial without network access by faking pooch.retrieve

Co-authored-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the topic-NamedArray Lightweight version of Variable label Oct 9, 2026
@headtr1ck headtr1ck added topic-testing plan to merge Final call for comments and removed topic-NamedArray Lightweight version of Variable labels Oct 9, 2026
On Windows an open file cannot be removed, so open_dataset and
open_datatree with cache=False failed. The test now also catches an
unclosed file on other platforms.

Co-authored-by: Claude <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the topic-NamedArray Lightweight version of Variable label Oct 9, 2026
@headtr1ck
headtr1ck merged commit 3683232 into pydata:main Oct 9, 2026
46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plan to merge Final call for comments topic-NamedArray Lightweight version of Variable topic-testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants