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
23 changes: 14 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,33 @@ jobs:
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
sphinx: [">=5,<8"] # Newest Sphinx (any)
sphinx: [">=5,<9"] # Newest Sphinx (any)
myst-parser: [">=1,<3"] # Newest MyST Parser (any)
include:
# Just check the other platforms once
- os: windows-latest
python-version: "3.10"
sphinx: "~=7.0"
myst-parser: "~=2.0"
python-version: "3.12"
sphinx: "~=8.0"
myst-parser: "~=4.0"
- os: macos-latest
python-version: "3.10"
sphinx: "~=7.0"
myst-parser: "~=2.0"
python-version: "3.12"
sphinx: "~=8.0"
myst-parser: "~=4.0"
# Oldest known-compatible dependencies
- os: ubuntu-latest
python-version: "3.9"
sphinx: "==5.0.0"
myst-parser: "==1.0.0"
# Newest known-compatible dependencies
# Mid-range dependencies
- os: ubuntu-latest
python-version: "3.12"
python-version: "3.11"
sphinx: "==7.0.0"
myst-parser: "==2.0.0"
# Newest known-compatible dependencies
- os: ubuntu-latest
python-version: "3.12"
sphinx: "==8.0.2"
myst-parser: "==4.0.0"

runs-on: ${{ matrix.os }}

Expand Down
2 changes: 1 addition & 1 deletion myst_nb/core/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def create_nb_reader(
# we check suffixes ordered by longest first, to ensure we get the "closest" match
iterator = sorted(readers.items(), key=lambda x: len(x[0]), reverse=True)
for suffix, (reader, reader_kwargs, commonmark_only) in iterator:
if path.endswith(suffix):
if Path(path).suffix == suffix:
Comment thread
bsipocz marked this conversation as resolved.
if isinstance(reader, str):
# attempt to load the reader as an object path
reader = import_object(reader)
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ envlist = py311-sphinx7
[testenv]
usedevelop = true

[testenv:py{39,310,311,312}-sphinx{5,6,7}]
[testenv:py{39,310,311,312}-sphinx{5,6,7,8}]
extras = testing
deps =
sphinx5: sphinx>=5,<6
sphinx6: sphinx>=6,<7
sphinx7: sphinx>=7,<8
sphinx8: sphinx>=8,<9
commands = pytest {posargs}

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