Skip to content

Commit 019dc2d

Browse files
authored
Merge pull request #111 from dihm/update_RTD
Fix deprecated config for RTD builds.
2 parents e1f3d32 + 86c8566 commit 019dc2d

File tree

3 files changed

+13
-25
lines changed

3 files changed

+13
-25
lines changed

docs/source/conf.py

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
#
1313
import os
1414
from pathlib import Path
15-
from m2r import MdInclude
16-
from recommonmark.transform import AutoStructify
1715
from jinja2 import FileSystemLoader, Environment
1816

1917
# -- Project information (unique to each project) -------------------------------------
@@ -46,7 +44,7 @@
4644
"sphinx.ext.todo",
4745
"sphinx.ext.viewcode",
4846
"sphinx_rtd_theme",
49-
"recommonmark",
47+
"myst_parser",
5048
]
5149

5250
autodoc_typehints = 'description'
@@ -55,6 +53,7 @@
5553

5654
# Prefix each autosectionlabel with the name of the document it is in and a colon
5755
autosectionlabel_prefix_document = True
56+
myst_heading_anchors = 2
5857

5958
# Add any paths that contain templates here, relative to this directory.
6059
templates_path = ['_templates']
@@ -203,20 +202,7 @@
203202
# Use m2r only for mdinclude and recommonmark for everything else
204203
# https://github.com/readthedocs/recommonmark/issues/191#issuecomment-622369992
205204
def setup(app):
206-
config = {
207-
# 'url_resolver': lambda url: github_doc_root + url,
208-
'auto_toc_tree_section': 'Contents',
209-
'enable_eval_rst': True,
210-
}
211-
app.add_config_value('recommonmark_config', config, True)
212-
app.add_transform(AutoStructify)
213-
214-
# from m2r to make `mdinclude` work
215-
app.add_config_value('no_underscore_emphasis', False, 'env')
216-
app.add_config_value('m2r_parse_relative_links', False, 'env')
217-
app.add_config_value('m2r_anonymous_references', False, 'env')
218-
app.add_config_value('m2r_disable_inline_math', False, 'env')
219-
app.add_directive('mdinclude', MdInclude)
205+
220206
app.add_css_file('custom.css')
221207

222208
# 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
@@ -47,8 +47,6 @@ install_requires =
4747
[options.extras_require]
4848
docs =
4949
PyQt5
50-
Sphinx==4.4.0
51-
sphinx-rtd-theme==0.5.2
52-
recommonmark==0.6.0
53-
m2r==0.2.1
54-
mistune<2.0.0
50+
Sphinx==7.2.6
51+
sphinx-rtd-theme==2.0.0
52+
myst_parser==2.0.0

0 commit comments

Comments
 (0)