Skip to content

Commit 51dfdab

Browse files
authored
UPGRADE: Support sphinx 7 (#524)
1 parent 3dc6b52 commit 51dfdab

File tree

2 files changed

+28
-11
lines changed

2 files changed

+28
-11
lines changed

.github/workflows/tests.yml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ jobs:
2626
fail-fast: false
2727
matrix:
2828
os: [ubuntu-latest]
29-
python-version: ["3.8", "3.9", "3.10"]
30-
sphinx: [">=5,<6"]
29+
python-version: ["3.8", "3.9", "3.10", "3.11"]
30+
sphinx: ["~=5.0","~=6.0","~=7.0"]
3131
include:
3232
- os: windows-latest
3333
python-version: 3.9
34-
sphinx: ">=5,<6"
34+
sphinx: "~=5.0"
3535
- os: macos-latest
3636
python-version: 3.9
37-
sphinx: ">=5,<6"
37+
sphinx: "~=5.0"
3838

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

@@ -44,10 +44,29 @@ jobs:
4444
uses: actions/setup-python@v4
4545
with:
4646
python-version: ${{ matrix.python-version }}
47+
cache: pip
48+
- name: Install myst-nb with Sphinx ${{ matrix.sphinx }}
49+
run: |
50+
pip install --upgrade pip
51+
pip install --upgrade "Sphinx${{ matrix.sphinx }}" -e .[testing]
52+
53+
- name: Run pytest
54+
run: pytest --durations=10
55+
56+
coverage:
57+
needs: [tests]
58+
runs-on: ubuntu-latest
59+
60+
steps:
61+
- uses: actions/checkout@v3
62+
- name: Set up Python ${{ matrix.python-version }}
63+
uses: actions/setup-python@v4
64+
with:
65+
python-version: 3.11
66+
cache: pip
4767
- name: Install dependencies
4868
run: |
49-
python -m pip install --upgrade pip
50-
pip install "sphinx${{ matrix.sphinx }}"
69+
pip install --upgrade pip
5170
pip install -e .[testing]
5271
5372
- name: Run pytest
@@ -59,13 +78,11 @@ jobs:
5978
# this is why we run `coverage xml` afterwards (required by codecov)
6079

6180
- name: Upload to Codecov
62-
if: github.repository == 'executablebooks/MyST-NB' && matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest'
6381
uses: codecov/codecov-action@v3
6482
with:
6583
name: myst-nb-pytests
6684
flags: pytests
6785
files: ./coverage.xml
68-
fail_ci_if_error: true
6986

7087
publish:
7188

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ dependencies = [
3838
"ipython",
3939
"jupyter-cache>=0.5,<0.7",
4040
"nbclient", # nbclient version pinned by jupyter-client
41-
"myst-parser~=1.0.0",
41+
"myst-parser>=0.18.0",
4242
"nbformat~=5.0",
4343
"pyyaml",
44-
"sphinx>=4,<6",
44+
"sphinx>=4",
4545
"typing-extensions",
4646
# ipykernel is not a requirement of the library,
4747
# but is a common requirement for users (registers the python3 kernel)
@@ -79,7 +79,7 @@ rtd = [
7979
"numpy",
8080
"pandas",
8181
"plotly",
82-
"sphinx-book-theme~=1.0.0",
82+
"sphinx-book-theme>=0.3",
8383
"sphinx-copybutton",
8484
"sphinx-design~=0.4.0",
8585
"sphinxcontrib-bibtex",

0 commit comments

Comments
 (0)