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

Fix sphinx extension for newer versions of sphinx #98

Merged
merged 9 commits into from
Jul 26, 2024
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
39 changes: 39 additions & 0 deletions .github/workflows/test-sphinx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Test

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ${{ matrix.os }}
env:
python-version: '3.10'
strategy:
matrix:
os: [ 'ubuntu-latest' ]
python-version: [ '3.10' ]
sphinx: [ 'sphinx==5.3.0', 'sphinx==6.2.1', 'sphinx==7.*' ]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Set up ${{ matrix.sphinx }}
run: |
python -V
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r docs/requirements.txt
pip install "${{ matrix.sphinx }}"

- name: Tests
run: |
python -m sphinx docs/ build/html -b html -D html_theme=alabaster
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ jobs:
include:
- os: ubuntu-latest
python-version: '3.9'
tasks: tests
- os: ubuntu-latest
python-version: '3.11'
tasks: tests

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion audbcards/sphinx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def builder_inited(app: sphinx.application.Sphinx):
)
datacard.save(rst_file)
datasets.append(dataset)
out_file = rst_file.replace(app.srcdir, os.path.basename(app.srcdir))
out_file = rst_file.replace(str(app.srcdir), os.path.basename(app.srcdir))
print(f"wrote {out_file}")

# Create datasets overview page
Expand Down