Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

## Unreleased
* docs: point the plotting tutorial and `defaults.cfg` at `'plotly_offline'`; `'plotly'` / `'plotly_online'` still construct figures but `show()` no longer uses Chart Studio (#1255, #1249)
* packaging: do not ship dead Python 2 source (`old_tests`, `kern/src/todo`, `mpi_test__.py`) in the wheel; GPy already requires Python >=3.11 (#1251, #1213)
* plotting: make the plotly backends work with Plotly 7: marker sizes are numbers instead of strings (`plotly_offline` latent, inducing and error-bar plots raised `ValueError`), and showing a figure with the `'plotly'` / `'plotly_online'` library now raises a clear error pointing at `'plotly_offline'` or `'matplotlib'` instead of failing on the removed `plotly.plotly` Chart Studio API (#1243)
* packaging: require Python >=3.11 (matches CI; 3.9/3.10 are EOL) so the lockfile can drop unpatched 3.9-only pins (Discussion #1207)
Expand Down
7 changes: 4 additions & 3 deletions GPy/defaults.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ working = True
working = True

[plotting]
# Currently supported libraries are: matplotlib, plotly, none.
# for plotly make sure you have setup plotly to load your account.
# Currently supported libraries: matplotlib, plotly_offline, none.
# 'plotly' / 'plotly_online' still construct figures, but show() no longer
# uploads to Chart Studio; use plotly_offline instead (#1243, #1249).
# none means no plotting will be loaded.
library = matplotlib
library = matplotlib
6 changes: 4 additions & 2 deletions GPy/plotting/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@

:py:class:`GPy.plotting` effectively extends models based on
:py:class:`GPy.core.gp.GP` (and other classes) by adding methods to
plot useful charts. 'matplotlib', 'plotly' (online) and 'plotly'
(offline) are supported. The methods in :py:class:`GPy.plotting` (and
plot useful charts. ``matplotlib`` and ``plotly_offline`` are the working
backends. ``plotly`` / ``plotly_online`` still construct figures, but
:py:func:`show` no longer uploads to Chart Studio (see #1243).
The methods in :py:class:`GPy.plotting` (and
child classes :py:class:`GPy.plotting.gpy_plot` and
:py:class:`GPy.plotting.matplot_dep`) are not intended to be called
directly, but rather are 'injected' into other classes (notably
Expand Down
21 changes: 17 additions & 4 deletions cip/cip0009.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
author: Neil Lawrence
created: '2026-10-17'
id: '0009'
last_updated: '2026-10-17'
last_updated: '2026-11-01'
status: Proposed
compressed: false
related_requirements: []
Expand Down Expand Up @@ -98,18 +98,27 @@ explicitly omit dead paths with rationale).
- **CIP-0007 / #1210** — deprecation/plotting modernization exposed the gap.
- **CIP-0008** — release pipeline should keep the coverage upload job; dry-run
wheels are separate from unit coverage.
- **#1243 / #1249** — Plotly 7 backend fix with `TestPlotly7` (`importorskip`);
this is Slice A plotly_dep coverage landing before Accept, not a full Slice A.
- **#1255 / #1256** (`docs/plotly-offline-tutorial`) — tutorial and
`defaults.cfg` now name `'plotly_offline'` so `show()` examples do not hit
the Chart Studio `RuntimeError` from #1249.

## Implementation Plan

1. **Baseline:** export current Codecov / `coverage xml` hotspot list into this
CIP or a short backlog task under `backlog/infrastructure/`.
2. **Slice A (plotting):** tests for plotly_dep paths touched in #1229 + PCA /
state_space plot smokes; aim to clear the #1229-style patch hole on a
follow-up PR.
follow-up PR. **Partial (2026-11-01):** [#1249](https://github.com/SheffieldML/GPy/pull/1249)
covers numeric marker sizes and the online `show_canvas` error; fill /
bar / annotation / PCA smokes remain.
3. **Slice B (hotspots):** pick next 2–3 lowest-coverage pure-Python modules
with clear APIs; add focused tests.
4. **Docs:** README or testing note — how to run `--cov` locally; what “good”
means for a plotting PR.
means for a plotting PR. Plotly *user* docs (tutorial / `defaults.cfg` /
module docstring) are [#1256](https://github.com/SheffieldML/GPy/pull/1256)
on `docs/plotly-offline-tutorial` (#1255), not the coverage README.
5. **Optional:** tighten `codecov.yml` patch target once Slice A is green on
`devel`.

Expand All @@ -132,7 +141,9 @@ None yet (requirements extraction still outstanding).

- [x] Diagnose #1229 Codecov patch failure
- [ ] Accept CIP after review
- [ ] Slice A: plotting / plotly coverage PR
- [x] Slice A (partial): [#1249](https://github.com/SheffieldML/GPy/pull/1249) `TestPlotly7` + Plotly 7 backend (#1243)
- [ ] Slice A remainder: fill / bar / annotation / PCA / state_space plot smokes
- [x] Plotly tutorial / `defaults.cfg` / plotting docstring → `'plotly_offline'` ([#1256](https://github.com/SheffieldML/GPy/pull/1256), branch `docs/plotly-offline-tutorial`, issue #1255)
- [ ] Slice B: next hotspots
- [ ] Optional codecov.yml patch policy
- [ ] Close CIP
Expand All @@ -144,3 +155,5 @@ None yet (requirements extraction still outstanding).
- `codecov.yml` — informational project/patch statuses
- `.github/workflows/test-and-deploy.yml` — `coverage` job
- Related: #1210, CIP-0005, CIP-0007
- [#1243](https://github.com/SheffieldML/GPy/issues/1243) / [#1249](https://github.com/SheffieldML/GPy/pull/1249) — Plotly 7 marker sizes and Chart Studio `show()` error
- [#1255](https://github.com/SheffieldML/GPy/issues/1255) / [#1256](https://github.com/SheffieldML/GPy/pull/1256) — docs follow-up on `docs/plotly-offline-tutorial`
4 changes: 2 additions & 2 deletions doc/source/tuto_plotting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ works smoothly. Thus, in :py:mod:`GPy.plotting.__init__` we add the line::
from ..kern import Kern
Kern.plot_covariance = gpy_plot.kernel_plots.plot_covariance

And that's it. The plot can be shown in plotly by calling::
And that's it. The plot can be shown with Plotly's offline backend by calling::

GPy.plotting.change_plotting_library('plotly')
GPy.plotting.change_plotting_library('plotly_offline')

k = GPy.kern.RBF(1) + GPy.kern.Matern32(1)
k.randomize()
Expand Down
Loading