Skip to content

[7.17] Fix docs build #2362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,6 @@ jobs:
- name: Lint the code
run: nox -s lint

docs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python3.7 -m pip install nox
- name: Build the docs
run: nox -s docs

test-linux:
strategy:
fail-fast: false
Expand Down
15 changes: 10 additions & 5 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
version: 2
sphinx:
configuration: docs/sphinx/conf.py

build:
os: ubuntu-22.04
tools:
# To work around https://github.com/aio-libs/aiohttp/issues/7675, we need
# to set AIOHTTP_NO_EXTENSIONS to 1 but it has to be done in
# https://readthedocs.org/dashboard/elasticsearch-py/environmentvariables/
# because of https://github.com/readthedocs/readthedocs.org/issues/6311
python: "3"

python:
version: 3.7
install:
- method: pip
path: .
- requirements: dev-requirements.txt
- path: .
1 change: 1 addition & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pytest-cov
coverage
mock
sphinx
sphinx-rtd-theme
jinja2
python-dateutil

Expand Down
24 changes: 9 additions & 15 deletions docs/sphinx/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information

import os
import datetime

import elasticsearch

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

# General information about the project.
project = u"Elasticsearch"
copyright = u"%d, Elasticsearch B.V" % datetime.date.today().year
project = "Elasticsearch"
copyright = "%d, Elasticsearch B.V" % datetime.date.today().year

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

on_rtd = os.environ.get("READTHEDOCS", None) == "True"

if not on_rtd: # only import and set the theme if we're building docs locally
import sphinx_rtd_theme

html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_theme = "sphinx_rtd_theme"

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down Expand Up @@ -194,8 +188,8 @@
(
"index",
"Elasticsearch.tex",
u"Elasticsearch Documentation",
u"Honza Král",
"Elasticsearch Documentation",
"Honza Král",
"manual",
)
]
Expand Down Expand Up @@ -226,7 +220,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
("index", "elasticsearch-py", u"Elasticsearch Documentation", [u"Honza Král"], 1)
("index", "elasticsearch-py", "Elasticsearch Documentation", ["Honza Král"], 1)
]

# If true, show URL addresses after external links.
Expand All @@ -242,8 +236,8 @@
(
"index",
"Elasticsearch",
u"Elasticsearch Documentation",
u"Honza Král",
"Elasticsearch Documentation",
"Honza Král",
"Elasticsearch",
"One line description of project.",
"Miscellaneous",
Expand Down