Skip to content

tests environment - update to latest Python packages #12753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 26, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/test-ff-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
- name: Install uv for Python
uses: astral-sh/setup-uv@v3
with:
version: "0.4.30"
version: "0.7.4"
enable-cache: true
cache-dependency-glob: "tests/uv.lock"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-smokes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ jobs:
- name: Install uv for Python
uses: astral-sh/setup-uv@v3
with:
version: "0.5.9"
version: "0.7.4"
enable-cache: true
cache-dependency-glob: "tests/uv.lock"

Expand Down
6 changes: 6 additions & 0 deletions news/changelog-1.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ All changes included in 1.8:

- ([#12733](https://github.com/quarto-dev/quarto-cli/issues/12733)): Add installed extensions to `quarto inspect` project report.

## Engines

### `jupyter`

- ([#12753](https://github.com/quarto-dev/quarto-cli/issues/12753)): Support change in IPython 9+ and import `set_matplotlib_formats` from `matplotlib_inline.backend_inline` in the internal `setup.py` script used to initialize rendering with Jupyter engine.

## Other fixes and improvements

- ([#11321](https://github.com/quarto-dev/quarto-cli/issues/11321)): Follow [recommendation from LaTeX project](https://latex-project.org/news/latex2e-news/ltnews40.pdf) and use `lualatex` instead of `xelatex` as the default PDF engine.
Expand Down
9 changes: 8 additions & 1 deletion src/resources/jupyter/lang/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@
plt.rcParams['figure.figsize'] = (fig_width, fig_height)
plt.rcParams['figure.dpi'] = fig_dpi
plt.rcParams['savefig.dpi'] = "figure"
from IPython.display import set_matplotlib_formats

# IPython 7.14 deprecated set_matplotlib_formats from IPython
try:
from matplotlib_inline.backend_inline import set_matplotlib_formats
except ImportError:
# Fall back to deprecated location for older IPython versions
from IPython.display import set_matplotlib_formats

set_matplotlib_formats(fig_format)
except Exception:
pass
Expand Down
2 changes: 1 addition & 1 deletion tests/.python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.13.1
3.13.2
28 changes: 28 additions & 0 deletions tests/docs/smoke-all/jupyter/fig-format/matplotlib-svg.qmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: Get SVG from matplotlib
format:
html:
fig-format: svg
_quarto:
tests:
html:
ensureHtmlElements:
- ['figure.figure img[src$=".svg"]']
- ['figure.figure img[src$=".png"]']
---

```{python}
import matplotlib.pyplot as plt
import numpy as np

fig, ax = plt.subplots()

x = np.linspace(0, 4 * np.pi, 100)
y1 = np.sin(x)
y2 = np.cos(x)

ax.set_title("Sine and Cosine")
ax.plot(x, y1)
ax.plot(x, y2)
ax.legend(["Sine", "Cosine"])
```
2 changes: 1 addition & 1 deletion tests/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "tests"
version = "0.1.0"
description = "Quarto Tests"
requires-python = ">=3.12"
requires-python = ">=3.13"
dependencies = [
"bokeh-sampledata>=2024.2",
"bokeh>=3.6.0",
Expand Down
1,441 changes: 517 additions & 924 deletions tests/uv.lock

Large diffs are not rendered by default.