Skip to content

Run matplotlylib tests in CI - #5794

Merged
camdecoster merged 6 commits into
plotly:mainfrom
robertoffmoura:rm/add-matplotlylib-tests-to-CI
Oct 8, 2026
Merged

camdecoster merged 6 commits into
plotly:mainfrom
robertoffmoura:rm/add-matplotlylib-tests-to-CI

Conversation

@robertoffmoura

Copy link
Copy Markdown
Contributor

This is a follow up to #5697. It adds a dedicated test-matplotlylib job to run-pytest.yml that installs matplotlib and runs the tests across all supported Python versions (3.8–3.13)

Historically, the original matplotlylib tests (in tests/test_optional/test_matplotlylib/) were intentionally skipped in 2022 (b7ba00b) because they were failing. When the test_renderer suite (plotly/matplotlylib/tests/test_renderer.py) was added (#5312), it was unintentionally never wired into run-pytest.yml.

@camdecoster camdecoster left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for putting this together! Could you please make a few minor changes?

Comment thread CHANGELOG.md
Comment thread .github/workflows/run-pytest.yml
Comment thread .github/workflows/run-pytest.yml Outdated
robertoffmoura and others added 2 commits October 7, 2026 21:50
@robertoffmoura
robertoffmoura force-pushed the rm/add-matplotlylib-tests-to-CI branch from 4390863 to fe92ef4 Compare October 7, 2026 20:50
@robertoffmoura

Copy link
Copy Markdown
Contributor Author

Thanks! I applied the changes you suggested.

@camdecoster camdecoster added the no-changelog A changelog entry is not required for this PR label Oct 8, 2026
@camdecoster

Copy link
Copy Markdown
Contributor

Okay, so one of the new tests is broken on Python 3.8 because it gets version 3.7.5 of matplotlib and that changes the results. _draw_line_collection produces a different result because of how ax.contour works in that version. We'll need to address that in another PR before merging this one. It didn't show up before because I hadn't merged #5770 yet. Any interest in tackling that?

@robertoffmoura

Copy link
Copy Markdown
Contributor Author

I opened #5799 to address this. I think relaxing the test assertions on the older matplotlib version might be better than increasing the code complexity here, since the charts still look the same.

@camdecoster

Copy link
Copy Markdown
Contributor

Sounds good. Python 3.8 is EOL anyway, so I don't think we need to worry about it too much.

@camdecoster
camdecoster merged commit de5df9b into plotly:main Oct 8, 2026
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog A changelog entry is not required for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants