Skip to content

Commit 2cf7fb6

Browse files
authored
Merge pull request #99 from dihm/rtd_update
Modernize RTD build
2 parents 9e9df6d + be1c791 commit 2cf7fb6

File tree

3 files changed

+13
-27
lines changed

3 files changed

+13
-27
lines changed

docs/source/conf.py

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
import copy
1414
import os
1515
from pathlib import Path
16-
from m2r import MdInclude
17-
from recommonmark.transform import AutoStructify
1816
from jinja2 import FileSystemLoader, Environment
1917

2018
# -- Project information (unique to each project) -------------------------------------
@@ -47,7 +45,7 @@
4745
"sphinx.ext.todo",
4846
"sphinx.ext.viewcode",
4947
"sphinx_rtd_theme",
50-
"recommonmark",
48+
"myst_parser",
5149
]
5250

5351
autodoc_typehints = 'description'
@@ -73,6 +71,7 @@
7371

7472
# Prefix each autosectionlabel with the name of the document it is in and a colon
7573
autosectionlabel_prefix_document = True
74+
myst_heading_anchors = 2
7675

7776
# Add any paths that contain templates here, relative to this directory.
7877
templates_path = ['_templates']
@@ -211,23 +210,8 @@
211210
# Customize the html_theme
212211
html_theme_options = {'navigation_depth': 3}
213212

214-
# Use m2r only for mdinclude and recommonmark for everything else
215-
# https://github.com/readthedocs/recommonmark/issues/191#issuecomment-622369992
216213
def setup(app):
217-
config = {
218-
# 'url_resolver': lambda url: github_doc_root + url,
219-
'auto_toc_tree_section': 'Contents',
220-
'enable_eval_rst': True,
221-
}
222-
app.add_config_value('recommonmark_config', config, True)
223-
app.add_transform(AutoStructify)
224-
225-
# from m2r to make `mdinclude` work
226-
app.add_config_value('no_underscore_emphasis', False, 'env')
227-
app.add_config_value('m2r_parse_relative_links', False, 'env')
228-
app.add_config_value('m2r_anonymous_references', False, 'env')
229-
app.add_config_value('m2r_disable_inline_math', False, 'env')
230-
app.add_directive('mdinclude', MdInclude)
214+
231215
app.add_css_file('custom.css')
232216

233217
# generate the components.rst file dynamically so it points to stable/latest

readthedocs.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
# Required
55
version: 2
66

7+
# Set build environment options
8+
build:
9+
os: ubuntu-22.04
10+
tools:
11+
python: "3.11"
12+
713
# Build documentation in the docs/ directory with Sphinx
814
sphinx:
915
builder: dirhtml
@@ -15,13 +21,11 @@ formats:
1521
- pdf
1622
- epub
1723

18-
# Optionally set the version of Python and requirements required to build your docs
24+
# Optionally set the requirements required to build your docs
1925
python:
20-
version: 3.7
2126
install:
2227
- method: pip
2328
path: .
2429
extra_requirements:
2530
- docs
26-
system_packages: true
2731

setup.cfg

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,9 @@ install_requires =
4141
[options.extras_require]
4242
docs =
4343
PyQt5
44-
Sphinx==4.4.0
45-
sphinx-rtd-theme==0.5.2
46-
recommonmark==0.6.0
47-
m2r==0.2.1
48-
mistune<2.0.0
44+
Sphinx==7.2.6
45+
sphinx-rtd-theme==2.0.0
46+
myst_parser==2.0.0
4947

5048
[options.package_data]
5149
labscript_profile = ../labscript-suite.pth

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy