Skip to content

Commit 0751fb5

Browse files
authored
MAINT: updates to testing and minor bug fix (JupyterBuilder handling) (#70)
* MAINT: software version and ci upgrades * error using JupyterBuilder on qe lectures
1 parent 2b52938 commit 0751fb5

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,17 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v4
16-
- name: Set up Python 3.11
16+
- name: Set up Python 3.12
1717
uses: actions/setup-python@v4
1818
with:
19-
python-version: "3.11"
19+
python-version: "3.12"
2020
- uses: pre-commit/[email protected]
2121

2222
tests:
2323
runs-on: ubuntu-latest
2424
strategy:
2525
matrix:
26-
python-version: ["3.9", "3.10", "3.11", "3.12"]
26+
python-version: ["3.11", "3.12"]
2727
steps:
2828
- uses: actions/checkout@v4
2929
- name: Set up Python ${{ matrix.python-version }}

sphinx_exercise/post_transforms.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,10 @@ def run(self):
190190
if isinstance(self.app.builder, LaTeXBuilder):
191191
docname = find_parent(self.app.builder.env, node, "section")
192192
else:
193-
docname = self.app.builder.current_docname
193+
try:
194+
docname = self.app.builder.current_docname
195+
except AttributeError:
196+
docname = self.env.docname # for builder such as JupyterBuilder that don't support current_docname
194197
docpath = self.env.doc2path(docname)
195198
path = docpath[: docpath.rfind(".")]
196199
msg = f"undefined label: {target_label}"

tox.ini

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@
88
# `tox -r`
99

1010
[tox]
11-
envlist = py{38,39}
11+
envlist = py{311,312}
1212
skip_missing_interpreters = true
1313

1414
[testenv]
1515
usedevelop=true
1616
recreate = false
1717

18-
[testenv:py{38,39}-pre-commit]
18+
[testenv:py{311,312}-pre-commit]
1919
extras = code_style
2020
commands = pre-commit run {posargs}
2121

22-
[testenv:py{38,39}-sphinx{4,5}]
22+
[testenv:py{311,312}-sphinx{5,6}]
2323
extras = testing
2424
deps =
25-
sphinx4: sphinx>=4,<5
2625
sphinx5: sphinx>=5,<6
26+
sphinx5: sphinx>=6,<7
2727
commands = pytest --verbose {posargs}
2828

2929
[testenv:docs-{update,clean}]

0 commit comments

Comments
 (0)