Skip to content

Commit 432c04f

Browse files
authored
Merge pull request #12753 from quarto-dev/update-uv-pkgs
tests environment - update to latest Python packages
2 parents 80aa8dd + e6372e4 commit 432c04f

File tree

8 files changed

+563
-929
lines changed

8 files changed

+563
-929
lines changed

.github/workflows/test-ff-matrix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
- name: Install uv for Python
118118
uses: astral-sh/setup-uv@v3
119119
with:
120-
version: "0.4.30"
120+
version: "0.7.4"
121121
enable-cache: true
122122
cache-dependency-glob: "tests/uv.lock"
123123

.github/workflows/test-smokes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ jobs:
145145
- name: Install uv for Python
146146
uses: astral-sh/setup-uv@v3
147147
with:
148-
version: "0.5.9"
148+
version: "0.7.4"
149149
enable-cache: true
150150
cache-dependency-glob: "tests/uv.lock"
151151

news/changelog-1.8.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ All changes included in 1.8:
6262

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

65+
## Engines
66+
67+
### `jupyter`
68+
69+
- ([#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.
70+
6571
## Other fixes and improvements
6672

6773
- ([#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.

src/resources/jupyter/lang/python/setup.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@
2222
plt.rcParams['figure.figsize'] = (fig_width, fig_height)
2323
plt.rcParams['figure.dpi'] = fig_dpi
2424
plt.rcParams['savefig.dpi'] = "figure"
25-
from IPython.display import set_matplotlib_formats
25+
26+
# IPython 7.14 deprecated set_matplotlib_formats from IPython
27+
try:
28+
from matplotlib_inline.backend_inline import set_matplotlib_formats
29+
except ImportError:
30+
# Fall back to deprecated location for older IPython versions
31+
from IPython.display import set_matplotlib_formats
32+
2633
set_matplotlib_formats(fig_format)
2734
except Exception:
2835
pass

tests/.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.13.1
1+
3.13.2
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: Get SVG from matplotlib
3+
format:
4+
html:
5+
fig-format: svg
6+
_quarto:
7+
tests:
8+
html:
9+
ensureHtmlElements:
10+
- ['figure.figure img[src$=".svg"]']
11+
- ['figure.figure img[src$=".png"]']
12+
---
13+
14+
```{python}
15+
import matplotlib.pyplot as plt
16+
import numpy as np
17+
18+
fig, ax = plt.subplots()
19+
20+
x = np.linspace(0, 4 * np.pi, 100)
21+
y1 = np.sin(x)
22+
y2 = np.cos(x)
23+
24+
ax.set_title("Sine and Cosine")
25+
ax.plot(x, y1)
26+
ax.plot(x, y2)
27+
ax.legend(["Sine", "Cosine"])
28+
```

tests/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "tests"
33
version = "0.1.0"
44
description = "Quarto Tests"
5-
requires-python = ">=3.12"
5+
requires-python = ">=3.13"
66
dependencies = [
77
"bokeh-sampledata>=2024.2",
88
"bokeh>=3.6.0",

tests/uv.lock

Lines changed: 517 additions & 924 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)