Skip to content

CI: Test the wheel without matplotlib - #961

Merged
bashtage merged 1 commit into
mainfrom
a90-ci-no-matplotlib
Oct 18, 2026
Merged

bashtage merged 1 commit into
mainfrom
a90-ci-no-matplotlib

Conversation

@bashtage

@bashtage bashtage commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Branch a90-ci-no-matplotlib, one commit; #960, which it was built on, is merged, so the diff is only CI files (ci/azure/azure_template_posix.yml, ci/azure/install-posix.sh).

The arch-wheels builds test the installed wheel without matplotlib. arch's own CI
always installs it, so three new test modules that imported matplotlib at module
level passed every check here and failed in every arch-wheels job (#960). This
job catches that in CI:

  • New Azure Linux leg python_313_no_matplotlib_wheel: Python 3.13 with
    NO_MATPLOTLIB: 'true' and test.wheel: true. It builds the wheel, installs it
    in site-packages and runs arch.test() from a directory outside the source
    tree, as the arch-wheels builds do. arch.test() exits with pytest's status, so
    a collection error fails the job.
  • install-posix.sh: with NO_MATPLOTLIB, it leaves out matplotlib and
    seaborn, which needs it. After the install, it fails if matplotlib can be
    imported anyway, for example because another package pulled it in, so the job
    cannot silently test with matplotlib.

The comparison is case-insensitive, because Azure can pass a YAML true as
"True". The other legs are unchanged. Checked locally: the script's syntax
(bash -n), the YAML (11 Linux legs), and the absence check with and without
matplotlib.

🤖 Generated with Claude Code

Add a Linux job, python_313_no_matplotlib_wheel, that installs neither matplotlib nor
seaborn and tests the installed wheel from outside of the source tree, as the tests of
the arch-wheels builds do. The install step fails if another package installs
matplotlib anyway. A test module that imports matplotlib unconditionally, as three did
before #960, then fails to collect in CI instead of in the wheel builds.
@bashtage
bashtage force-pushed the a90-ci-no-matplotlib branch from 2f498a8 to b2c5c1a Compare October 18, 2026 14:27
@codecov

codecov Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.95%. Comparing base (d2c90b4) to head (b2c5c1a).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #961   +/-   ##
=======================================
  Coverage   98.95%   98.95%           
=======================================
  Files         136      136           
  Lines       30043    30043           
  Branches     2331     2331           
=======================================
  Hits        29729    29729           
  Misses        256      256           
  Partials       58       58           
Flag Coverage Δ
adder 98.89% <ø> (ø)
subtractor 98.89% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bashtage
bashtage merged commit 60f7fd3 into main Oct 18, 2026
26 checks passed
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.

1 participant