Skip to content

Commit 1c2b950

Browse files
authored
[7.x] Add nox, black, and license headers
1 parent 478a379 commit 1c2b950

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+6248
-3232
lines changed

.travis.yml

+8
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ env:
1717
matrix:
1818
- ES_VERSION=7.0.0
1919

20+
matrix:
21+
include:
22+
- python: 3.8
23+
install:
24+
- python -m pip install nox
25+
script:
26+
- nox -s lint
27+
2028
install:
2129
- mkdir /tmp/elasticsearch
2230
- wget -O - https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}-linux-x86_64.tar.gz | tar xz --directory=/tmp/elasticsearch --strip-components=1

docs/conf.py

+101-70
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
11
# -*- coding: utf-8 -*-
2+
# Licensed to Elasticsearch B.V. under one or more contributor
3+
# license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright
5+
# ownership. Elasticsearch B.V. licenses this file to you under
6+
# the Apache License, Version 2.0 (the "License"); you may
7+
# not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
219
#
320
# Elasticsearch documentation build configuration file, created by
421
# sphinx-quickstart on Mon May 6 15:38:41 2013.
@@ -13,226 +30,234 @@
1330

1431
import os
1532
import datetime
33+
import elasticsearch_dsl
1634

1735
# If extensions (or modules to document with autodoc) are in another directory,
1836
# add these directories to sys.path here. If the directory is relative to the
1937
# documentation root, use os.path.abspath to make it absolute, like shown here.
20-
#sys.path.insert(0, os.path.abspath('.'))
38+
# sys.path.insert(0, os.path.abspath('.'))
2139

2240
# -- General configuration -----------------------------------------------------
2341

2442
# If your documentation needs a minimal Sphinx version, state it here.
25-
#needs_sphinx = '1.0'
43+
# needs_sphinx = '1.0'
2644

2745
# Add any Sphinx extension module names here, as strings. They can be extensions
2846
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
29-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest']
47+
extensions = ["sphinx.ext.autodoc", "sphinx.ext.doctest"]
3048

3149
autoclass_content = "both"
3250

3351
# Add any paths that contain templates here, relative to this directory.
34-
templates_path = ['_templates']
52+
templates_path = ["_templates"]
3553

3654
# The suffix of source filenames.
37-
source_suffix = '.rst'
55+
source_suffix = ".rst"
3856

3957
# The encoding of source files.
40-
#source_encoding = 'utf-8-sig'
58+
# source_encoding = 'utf-8-sig'
4159

4260
# The master toctree document.
43-
master_doc = 'index'
61+
master_doc = "index"
4462

4563
# General information about the project.
46-
project = u'Elasticsearch DSL'
47-
copyright = u'%d, Elasticsearch B.V' % datetime.datetime.now().year
64+
project = u"Elasticsearch DSL"
65+
copyright = u"%d, Elasticsearch B.V" % datetime.datetime.now().year
4866

4967
# The version info for the project you're documenting, acts as replacement for
5068
# |version| and |release|, also used in various other places throughout the
5169
# built documents.
52-
#
5370

54-
import elasticsearch_dsl
5571
# The short X.Y version.
5672
version = elasticsearch_dsl.__versionstr__
5773
# The full version, including alpha/beta/rc tags.
5874
release = version
5975

6076
# The language for content autogenerated by Sphinx. Refer to documentation
6177
# for a list of supported languages.
62-
#language = None
78+
# language = None
6379

6480
# There are two options for replacing |today|: either, you set today to some
6581
# non-false value, then it is used:
66-
#today = ''
82+
# today = ''
6783
# Else, today_fmt is used as the format for a strftime call.
68-
#today_fmt = '%B %d, %Y'
84+
# today_fmt = '%B %d, %Y'
6985

7086
# List of patterns, relative to source directory, that match files and
7187
# directories to ignore when looking for source files.
72-
exclude_patterns = ['_build']
88+
exclude_patterns = ["_build"]
7389

7490
# The reST default role (used for this markup: `text`) to use for all documents.
75-
#default_role = None
91+
# default_role = None
7692

7793
# If true, '()' will be appended to :func: etc. cross-reference text.
78-
#add_function_parentheses = True
94+
# add_function_parentheses = True
7995

8096
# If true, the current module name will be prepended to all description
8197
# unit titles (such as .. function::).
82-
#add_module_names = True
98+
# add_module_names = True
8399

84100
# If true, sectionauthor and moduleauthor directives will be shown in the
85101
# output. They are ignored by default.
86-
#show_authors = False
102+
# show_authors = False
87103

88104
# The name of the Pygments (syntax highlighting) style to use.
89-
pygments_style = 'sphinx'
105+
pygments_style = "sphinx"
90106

91107
# A list of ignored prefixes for module index sorting.
92-
#modindex_common_prefix = []
108+
# modindex_common_prefix = []
93109

94110
# If true, keep warnings as "system message" paragraphs in the built documents.
95-
#keep_warnings = False
111+
# keep_warnings = False
96112

97113

98114
# -- Options for HTML output ---------------------------------------------------
99115

100116
# The theme to use for HTML and HTML Help pages. See the documentation for
101117
# a list of builtin themes.
102118

103-
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
119+
on_rtd = os.environ.get("READTHEDOCS", None) == "True"
104120

105121
if not on_rtd: # only import and set the theme if we're building docs locally
106122
import sphinx_rtd_theme
107-
html_theme = 'sphinx_rtd_theme'
123+
124+
html_theme = "sphinx_rtd_theme"
108125
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
109126

110127
# Theme options are theme-specific and customize the look and feel of a theme
111128
# further. For a list of options available for each theme, see the
112129
# documentation.
113-
#html_theme_options = {}
130+
# html_theme_options = {}
114131

115132
# Add any paths that contain custom themes here, relative to this directory.
116-
#html_theme_path = []
133+
# html_theme_path = []
117134

118135
# The name for this set of Sphinx documents. If None, it defaults to
119136
# "<project> v<release> documentation".
120-
#html_title = None
137+
# html_title = None
121138

122139
# A shorter title for the navigation bar. Default is the same as html_title.
123-
#html_short_title = None
140+
# html_short_title = None
124141

125142
# The name of an image file (relative to this directory) to place at the top
126143
# of the sidebar.
127-
#html_logo = None
144+
# html_logo = None
128145

129146
# The name of an image file (within the static path) to use as favicon of the
130147
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
131148
# pixels large.
132-
#html_favicon = None
149+
# html_favicon = None
133150

134151
# Add any paths that contain custom static files (such as style sheets) here,
135152
# relative to this directory. They are copied after the builtin static files,
136153
# so a file named "default.css" will overwrite the builtin "default.css".
137-
#html_static_path = ['_static']
154+
# html_static_path = ['_static']
138155

139156
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
140157
# using the given strftime format.
141-
#html_last_updated_fmt = '%b %d, %Y'
158+
# html_last_updated_fmt = '%b %d, %Y'
142159

143160
# If true, SmartyPants will be used to convert quotes and dashes to
144161
# typographically correct entities.
145-
#html_use_smartypants = True
162+
# html_use_smartypants = True
146163

147164
# Custom sidebar templates, maps document names to template names.
148-
#html_sidebars = {}
165+
# html_sidebars = {}
149166

150167
# Additional templates that should be rendered to pages, maps page names to
151168
# template names.
152-
#html_additional_pages = {}
169+
# html_additional_pages = {}
153170

154171
# If false, no module index is generated.
155-
#html_domain_indices = True
172+
# html_domain_indices = True
156173

157174
# If false, no index is generated.
158-
#html_use_index = True
175+
# html_use_index = True
159176

160177
# If true, the index is split into individual pages for each letter.
161-
#html_split_index = False
178+
# html_split_index = False
162179

163180
# If true, links to the reST sources are added to the pages.
164-
#html_show_sourcelink = True
181+
# html_show_sourcelink = True
165182

166183
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
167-
#html_show_sphinx = True
184+
# html_show_sphinx = True
168185

169186
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
170-
#html_show_copyright = True
187+
# html_show_copyright = True
171188

172189
# If true, an OpenSearch description file will be output, and all pages will
173190
# contain a <link> tag referring to it. The value of this option must be the
174191
# base URL from which the finished HTML is served.
175-
#html_use_opensearch = ''
192+
# html_use_opensearch = ''
176193

177194
# This is the file name suffix for HTML files (e.g. ".xhtml").
178-
#html_file_suffix = None
195+
# html_file_suffix = None
179196

180197
# Output file base name for HTML help builder.
181-
htmlhelp_basename = 'Elasticsearchdoc'
198+
htmlhelp_basename = "Elasticsearchdoc"
182199

183200

184201
# -- Options for LaTeX output --------------------------------------------------
185202

186203
latex_elements = {
187-
# The paper size ('letterpaper' or 'a4paper').
188-
#'papersize': 'letterpaper',
189-
190-
# The font size ('10pt', '11pt' or '12pt').
191-
#'pointsize': '10pt',
192-
193-
# Additional stuff for the LaTeX preamble.
194-
#'preamble': '',
204+
# The paper size ('letterpaper' or 'a4paper').
205+
# 'papersize': 'letterpaper',
206+
# The font size ('10pt', '11pt' or '12pt').
207+
# 'pointsize': '10pt',
208+
# Additional stuff for the LaTeX preamble.
209+
# 'preamble': '',
195210
}
196211

197212
# Grouping the document tree into LaTeX files. List of tuples
198213
# (source start file, target name, title, author, documentclass [howto/manual]).
199214
latex_documents = [
200-
('index', 'Elasticsearch-dsl.tex', u'Elasticsearch DSL Documentation',
201-
u'Honza Král', 'manual'),
215+
(
216+
"index",
217+
"Elasticsearch-dsl.tex",
218+
u"Elasticsearch DSL Documentation",
219+
u"Elasticsearch B.V",
220+
"manual",
221+
),
202222
]
203223

204224
# The name of an image file (relative to this directory) to place at the top of
205225
# the title page.
206-
#latex_logo = None
226+
# latex_logo = None
207227

208228
# For "manual" documents, if this is true, then toplevel headings are parts,
209229
# not chapters.
210-
#latex_use_parts = False
230+
# latex_use_parts = False
211231

212232
# If true, show page references after internal links.
213-
#latex_show_pagerefs = False
233+
# latex_show_pagerefs = False
214234

215235
# If true, show URL addresses after external links.
216-
#latex_show_urls = False
236+
# latex_show_urls = False
217237

218238
# Documents to append as an appendix to all manuals.
219-
#latex_appendices = []
239+
# latex_appendices = []
220240

221241
# If false, no module index is generated.
222-
#latex_domain_indices = True
242+
# latex_domain_indices = True
223243

224244

225245
# -- Options for manual page output --------------------------------------------
226246

227247
# One entry per manual page. List of tuples
228248
# (source start file, name, description, authors, manual section).
229249
man_pages = [
230-
('index', 'elasticsearch-dsl', u'Elasticsearch DSL Documentation',
231-
[u'Honza Král'], 1)
250+
(
251+
"index",
252+
"elasticsearch-dsl",
253+
u"Elasticsearch DSL Documentation",
254+
[u"Elasticsearch B.V"],
255+
1,
256+
)
232257
]
233258

234259
# If true, show URL addresses after external links.
235-
#man_show_urls = False
260+
# man_show_urls = False
236261

237262

238263
# -- Options for Texinfo output ------------------------------------------------
@@ -241,19 +266,25 @@
241266
# (source start file, target name, title, author,
242267
# dir menu entry, description, category)
243268
texinfo_documents = [
244-
('index', 'Elasticsearch', u'Elasticsearch Documentation',
245-
u'Honza Král', 'Elasticsearch', 'One line description of project.',
246-
'Miscellaneous'),
269+
(
270+
"index",
271+
"Elasticsearch",
272+
u"Elasticsearch Documentation",
273+
u"Elasticsearch B.V",
274+
"Elasticsearch",
275+
"One line description of project.",
276+
"Miscellaneous",
277+
),
247278
]
248279

249280
# Documents to append as an appendix to all manuals.
250-
#texinfo_appendices = []
281+
# texinfo_appendices = []
251282

252283
# If false, no module index is generated.
253-
#texinfo_domain_indices = True
284+
# texinfo_domain_indices = True
254285

255286
# How to display URL addresses: 'footnote', 'no', or 'inline'.
256-
#texinfo_show_urls = 'footnote'
287+
# texinfo_show_urls = 'footnote'
257288

258289
# If true, do not generate a @detailmenu in the "Top" node's menu.
259-
#texinfo_no_detailmenu = False
290+
# texinfo_no_detailmenu = False

0 commit comments

Comments
 (0)