Skip to content

Commit 0d13309

Browse files
authored
Merge pull request #453 from RobertoRoos/release/v1.7
Adding branch release/v1.7 to suit version 1.7.9
2 parents 2768b0f + 51d3d8b commit 0d13309

File tree

2 files changed

+25
-46
lines changed

2 files changed

+25
-46
lines changed

.readthedocs.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Set the version of Python and other tools you might need
9+
build:
10+
os: ubuntu-20.04
11+
tools:
12+
python: "3.9"
13+
14+
# Build documentation in the docs/ directory with Sphinx
15+
sphinx:
16+
configuration: docs/manual/source/conf.py
17+
18+
# If using Sphinx, optionally build your docs in additional formats such as PDF
19+
# formats:
20+
# - pdf
21+
22+
# Optionally declare the Python requirements required to build your docs
23+
python:
24+
install:
25+
- requirements: requirements.txt

docs/manual/source/conf.py

-46
Original file line numberDiff line numberDiff line change
@@ -98,19 +98,6 @@
9898
'Zoltán Vörös', 'manual'),
9999
]
100100

101-
# sphinx-autoapi
102-
extensions.append('autoapi.extension')
103-
autoapi_type = 'python'
104-
autoapi_keep_files = True
105-
autoapi_dirs = ["ulab"]
106-
autoapi_add_toctree_entry = False
107-
autoapi_options = ['members', 'undoc-members', 'private-members', 'show-inheritance', 'special-members']
108-
autoapi_template_dir = '../autoapi/templates'
109-
autoapi_python_class_content = "both"
110-
autoapi_python_use_implicit_namespaces = True
111-
autoapi_root = "."
112-
113-
114101
# Read the docs theme
115102
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
116103
if not on_rtd:
@@ -123,36 +110,3 @@
123110
html_theme_path = ['.']
124111
else:
125112
html_theme_path = ['.']
126-
127-
128-
class UlabTransform(SphinxTransform):
129-
default_priority = 870
130-
131-
def _convert_first_paragraph_into_title(self):
132-
title = self.document.next_node(nodes.title)
133-
paragraph = self.document.next_node(nodes.paragraph)
134-
if not title or not paragraph:
135-
return
136-
if isinstance(paragraph[0], nodes.paragraph):
137-
paragraph = paragraph[0]
138-
if all(isinstance(child, nodes.Text) for child in paragraph.children):
139-
for child in paragraph.children:
140-
title.append(nodes.Text(" \u2013 "))
141-
title.append(child)
142-
paragraph.parent.remove(paragraph)
143-
144-
def _enable_linking_to_nonclass_targets(self):
145-
for desc in self.document.traverse(addnodes.desc):
146-
for xref in desc.traverse(addnodes.pending_xref):
147-
if xref.attributes.get("reftype") == "class":
148-
xref.attributes.pop("refspecific", None)
149-
150-
def apply(self, **kwargs):
151-
docname = self.env.docname
152-
if docname.startswith("ulab/"):
153-
self._convert_first_paragraph_into_title()
154-
self._enable_linking_to_nonclass_targets()
155-
156-
157-
def setup(app):
158-
app.add_transform(UlabTransform)

0 commit comments

Comments
 (0)