Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UPGRADE: Support Sphinx 7 #524

Merged
merged 3 commits into from
Jun 30, 2023
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
33 changes: 25 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.9", "3.10"]
sphinx: [">=5,<6"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
sphinx: ["~=5.0","~=6.0","~=7.0"]
include:
- os: windows-latest
python-version: 3.9
sphinx: ">=5,<6"
sphinx: "~=5.0"
- os: macos-latest
python-version: 3.9
sphinx: ">=5,<6"
sphinx: "~=5.0"

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

Expand All @@ -44,10 +44,29 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install myst-nb with Sphinx ${{ matrix.sphinx }}
run: |
pip install --upgrade pip
pip install --upgrade "Sphinx${{ matrix.sphinx }}" -e .[testing]

- name: Run pytest
run: pytest --durations=10

coverage:
needs: [tests]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.11
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install "sphinx${{ matrix.sphinx }}"
pip install --upgrade pip
pip install -e .[testing]

- name: Run pytest
Expand All @@ -59,13 +78,11 @@ jobs:
# this is why we run `coverage xml` afterwards (required by codecov)

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

publish:

Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ dependencies = [
"ipython",
"jupyter-cache>=0.5,<0.7",
"nbclient", # nbclient version pinned by jupyter-client
"myst-parser~=1.0.0",
"myst-parser>=0.18.0",
"nbformat~=5.0",
"pyyaml",
"sphinx>=4,<6",
"sphinx>=4",
"typing-extensions",
# ipykernel is not a requirement of the library,
# but is a common requirement for users (registers the python3 kernel)
Expand Down Expand Up @@ -79,7 +79,7 @@ rtd = [
"numpy",
"pandas",
"plotly",
"sphinx-book-theme~=1.0.0",
"sphinx-book-theme>=0.3",
"sphinx-copybutton",
"sphinx-design~=0.4.0",
"sphinxcontrib-bibtex",
Expand Down