Skip to content

Commit

Permalink
MAINT: updates to testing and minor bug fix (JupyterBuilder handling) (
Browse files Browse the repository at this point in the history
…#70)

* MAINT: software version and ci upgrades

* error using JupyterBuilder on qe lectures
  • Loading branch information
mmcky authored Oct 25, 2024
1 parent 2b52938 commit 0751fb5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: "3.11"
python-version: "3.12"
- uses: pre-commit/[email protected]

tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
python-version: ["3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down
5 changes: 4 additions & 1 deletion sphinx_exercise/post_transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,10 @@ def run(self):
if isinstance(self.app.builder, LaTeXBuilder):
docname = find_parent(self.app.builder.env, node, "section")
else:
docname = self.app.builder.current_docname
try:
docname = self.app.builder.current_docname
except AttributeError:
docname = self.env.docname # for builder such as JupyterBuilder that don't support current_docname
docpath = self.env.doc2path(docname)
path = docpath[: docpath.rfind(".")]
msg = f"undefined label: {target_label}"
Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@
# `tox -r`

[tox]
envlist = py{38,39}
envlist = py{311,312}
skip_missing_interpreters = true

[testenv]
usedevelop=true
recreate = false

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

[testenv:py{38,39}-sphinx{4,5}]
[testenv:py{311,312}-sphinx{5,6}]
extras = testing
deps =
sphinx4: sphinx>=4,<5
sphinx5: sphinx>=5,<6
sphinx5: sphinx>=6,<7
commands = pytest --verbose {posargs}

[testenv:docs-{update,clean}]
Expand Down

0 comments on commit 0751fb5

Please sign in to comment.