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

Support for sphinx 7 and onwards #131

Closed
wants to merge 4 commits into from
Closed
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
78 changes: 41 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,68 +14,71 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: pip
- uses: pre-commit/action@v2.0.0

tests:

strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
sphinx: ["~=4.0","~=5.0","~=6.0","~=7.0"]
include:
- os: windows-latest
python-version: 3.8
python-version: 3.11
sphinx: "~=7.0"
- os: macos-latest
python-version: 3.11
sphinx: "~=7.0"

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

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

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

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
cache: pip
- name: Install sphinx-design
run: |
pip install --upgrade pip
pip install -e .[testing]
- name: Run pytest
run: |
pytest --cov=sphinx_design --cov-report=xml --cov-report=term-missing
- name: Upload to Codecov
if: matrix.python-version == '3.8' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v3
with:
name: pytests
flags: pytests
file: ./coverage.xml
fail_ci_if_error: true

tests-sphinx4:

strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.7", "3.10"]

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

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[testing] sphinx~=4.5
- name: Run pytest
run: pytest

docs-build-format:

Expand All @@ -85,11 +88,12 @@ jobs:
format: [html, latex, man]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -105,9 +109,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: install flit
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,18 @@ classifiers = [
"Topic :: Text Processing :: Markup :: reStructuredText",
]
keywords = ["sphinx", "extension", "material design", "web components"]
requires-python = ">=3.7"
dependencies = ["sphinx>=4,<7"]
requires-python = ">=3.8"
dependencies = ["sphinx>=4"]

[project.urls]
Homepage = "https://github.com/executablebooks/sphinx-design"
Documentation = "https://sphinx-design.readthedocs.io"

[project.optional-dependencies]
code_style = ["pre-commit~=2.12"]
rtd = ["myst-parser>=0.18.0,<2"]
rtd = ["myst-parser>=0.18.0"]
testing = [
"myst-parser>=0.18.0,<2",
"myst-parser>=0.18.0",
"pytest~=7.1",
"pytest-cov",
"pytest-regressions",
Expand Down