Skip to content

Commit 972ba17

Browse files
committed
Fix gh-pages creation
1. drop sphinxcontrib-prettyspecialmethods, as it isn't compatible with modern sphinx anymore. It raises `NoneType` exceptions due to missing attributes. 2. Ditch uv for running sphinx due to stupid and unnecessary restrictions, related with `requires-python` key in pyproject.toml sphinx 4.0.2 is not compatible with current python versions (3.12+) used by CI runners. sphinx 7.1.2 would be the latest version, supported, when running via uv, while current python versions (3.12+) support sphinx 9+ uv is not a benefit here.
1 parent 9fe80d2 commit 972ba17

3 files changed

Lines changed: 10 additions & 12 deletions

File tree

.github/workflows/gh-pages.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,23 @@ on:
55
branches:
66
- master
77

8+
permissions:
9+
pages: write
10+
811
jobs:
912
deploy:
1013
runs-on: ubuntu-latest
1114
steps:
1215
- uses: actions/checkout@v6
1316

14-
- name: Setup uv
15-
uses: astral-sh/setup-uv@v7
17+
- name: Setup Python
18+
uses: actions/setup-python@v6
1619

17-
- name: Install dev dependencies
18-
run: uv sync --group docs
20+
- name: Install Dependencies
21+
run: python -m pip --disable-pip-version-check --no-color install -U sphinx
1922

2023
- name: Build Docs
21-
run: uv run sphinx-build -M html "docs/source/" "docs/"
24+
run: sphinx-build -M html "docs/source/" "docs/"
2225

2326
- name: Deploy Docs
2427
uses: peaceiris/actions-gh-pages@v3

docs/source/conf.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#
1515
import os
1616
import sys
17-
sys.path.insert(0, os.path.abspath('../../sublime_lib'))
17+
sys.path.insert(0, os.path.abspath('../../'))
1818
sys.path.insert(0, os.path.abspath('extensions'))
1919
sys.path.insert(0, os.path.abspath('mocks'))
2020

@@ -42,7 +42,6 @@
4242
extensions = [
4343
'sphinx.ext.autodoc',
4444
'sphinx.ext.intersphinx',
45-
'sphinxcontrib.prettyspecialmethods',
4645
]
4746

4847
autodoc_member_order = 'bysource'
@@ -70,7 +69,7 @@
7069
#
7170
# This is also used if you do content translation via gettext catalogs.
7271
# Usually you set "language" from the command line for these cases.
73-
language = None
72+
language = 'en'
7473

7574
# List of patterns, relative to source directory, that match files and
7675
# directories to ignore when looking for source files.

pyproject.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ requires = ["hatchling>=1.20", "hatch-vcs>=0.4"]
1818
build-backend = "hatchling.build"
1919

2020
[dependency-groups]
21-
docs = [
22-
"sphinx==4.0.2",
23-
"sphinxcontrib-prettyspecialmethods>=0.1.0",
24-
]
2521
lint = [
2622
"flake8>=3.9.2",
2723
"mypy>=0.720",

0 commit comments

Comments
 (0)