Skip to content

Commit 5ffc37a

Browse files
authored
[7.17] Fix docs build (#2362)
1 parent eb9eb05 commit 5ffc37a

File tree

4 files changed

+20
-35
lines changed

4 files changed

+20
-35
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,6 @@ jobs:
1919
- name: Lint the code
2020
run: nox -s lint
2121

22-
docs:
23-
runs-on: ubuntu-latest
24-
steps:
25-
- name: Checkout Repository
26-
uses: actions/checkout@v2
27-
- name: Set up Python 3.7
28-
uses: actions/setup-python@v2
29-
with:
30-
python-version: 3.7
31-
- name: Install dependencies
32-
run: |
33-
python3.7 -m pip install nox
34-
- name: Build the docs
35-
run: nox -s docs
36-
3722
test-linux:
3823
strategy:
3924
fail-fast: false

.readthedocs.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
version: 2
2-
sphinx:
3-
configuration: docs/sphinx/conf.py
2+
3+
build:
4+
os: ubuntu-22.04
5+
tools:
6+
# To work around https://github.com/aio-libs/aiohttp/issues/7675, we need
7+
# to set AIOHTTP_NO_EXTENSIONS to 1 but it has to be done in
8+
# https://readthedocs.org/dashboard/elasticsearch-py/environmentvariables/
9+
# because of https://github.com/readthedocs/readthedocs.org/issues/6311
10+
python: "3"
411

512
python:
6-
version: 3.7
713
install:
8-
- method: pip
9-
path: .
1014
- requirements: dev-requirements.txt
15+
- path: .

dev-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ pytest-cov
44
coverage
55
mock
66
sphinx
7+
sphinx-rtd-theme
78
jinja2
89
python-dateutil
910

docs/sphinx/conf.py

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
44
# See the LICENSE file in the project root for more information
55

6-
import os
76
import datetime
7+
88
import elasticsearch
99

1010
# If extensions (or modules to document with autodoc) are in another directory,
@@ -36,8 +36,8 @@
3636
master_doc = "index"
3737

3838
# General information about the project.
39-
project = u"Elasticsearch"
40-
copyright = u"%d, Elasticsearch B.V" % datetime.date.today().year
39+
project = "Elasticsearch"
40+
copyright = "%d, Elasticsearch B.V" % datetime.date.today().year
4141

4242
# The version info for the project you're documenting, acts as replacement for
4343
# |version| and |release|, also used in various other places throughout the
@@ -91,13 +91,7 @@
9191
# The theme to use for HTML and HTML Help pages. See the documentation for
9292
# a list of builtin themes.
9393

94-
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
95-
96-
if not on_rtd: # only import and set the theme if we're building docs locally
97-
import sphinx_rtd_theme
98-
99-
html_theme = "sphinx_rtd_theme"
100-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
94+
html_theme = "sphinx_rtd_theme"
10195

10296
# Theme options are theme-specific and customize the look and feel of a theme
10397
# further. For a list of options available for each theme, see the
@@ -194,8 +188,8 @@
194188
(
195189
"index",
196190
"Elasticsearch.tex",
197-
u"Elasticsearch Documentation",
198-
u"Honza Král",
191+
"Elasticsearch Documentation",
192+
"Honza Král",
199193
"manual",
200194
)
201195
]
@@ -226,7 +220,7 @@
226220
# One entry per manual page. List of tuples
227221
# (source start file, name, description, authors, manual section).
228222
man_pages = [
229-
("index", "elasticsearch-py", u"Elasticsearch Documentation", [u"Honza Král"], 1)
223+
("index", "elasticsearch-py", "Elasticsearch Documentation", ["Honza Král"], 1)
230224
]
231225

232226
# If true, show URL addresses after external links.
@@ -242,8 +236,8 @@
242236
(
243237
"index",
244238
"Elasticsearch",
245-
u"Elasticsearch Documentation",
246-
u"Honza Král",
239+
"Elasticsearch Documentation",
240+
"Honza Král",
247241
"Elasticsearch",
248242
"One line description of project.",
249243
"Miscellaneous",

0 commit comments

Comments
 (0)