Skip to content

Commit 2ec2bba

Browse files
authored
Merge branch 'master' into guilabel-reformatting
2 parents 1749550 + a0b59fe commit 2ec2bba

Some content is hidden

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

67 files changed

+988
-983
lines changed

.pyup.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# configure updates globally
2+
# default: all
3+
# allowed: all, insecure, False
4+
update: all
5+
6+
# configure dependency pinning globally
7+
# default: True
8+
# allowed: True, False
9+
pin: True
10+
11+
# update schedule
12+
# default: empty
13+
# allowed: "every day", "every week", ..
14+
schedule: "every week"
15+
16+
# search for requirement files
17+
# default: True
18+
# allowed: True, False
19+
search: True
20+
21+
# configure the branch prefix the bot is using
22+
# default: pyup-
23+
branch_prefix: pyup/
24+
25+
# set a global prefix for PRs
26+
# default: empty
27+
pr_prefix: pyup:
28+
29+
# allow to close stale PRs
30+
# default: True
31+
close_prs: True

CHANGELOG.rst

+47
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,50 @@
1+
Version 3.2.1
2+
-------------
3+
4+
:Date: February 07, 2019
5+
6+
* `@ericholscher <http://github.com/ericholscher>`__: Remove excluding files on search. (`#5246 <https://github.com/rtfd/readthedocs.org/pull/5246>`__)
7+
* `@ericholscher <http://github.com/ericholscher>`__: Don't update search on HTMLFile save (`#5244 <https://github.com/rtfd/readthedocs.org/pull/5244>`__)
8+
* `@ericholscher <http://github.com/ericholscher>`__: Be more defensive in our 404 handler (`#5243 <https://github.com/rtfd/readthedocs.org/pull/5243>`__)
9+
* `@humitos <http://github.com/humitos>`__: Install sphinx-notfound-page for building 404.html custom page (`#5242 <https://github.com/rtfd/readthedocs.org/pull/5242>`__)
10+
* `@humitos <http://github.com/humitos>`__: Remove py2 compatibility (`#5241 <https://github.com/rtfd/readthedocs.org/pull/5241>`__)
11+
* `@ericholscher <http://github.com/ericholscher>`__: Release 3.2.0 (`#5240 <https://github.com/rtfd/readthedocs.org/pull/5240>`__)
12+
13+
Version 3.2.0
14+
-------------
15+
16+
:Date: February 06, 2019
17+
18+
* `@ericholscher <http://github.com/ericholscher>`__: Support passing an explicit `index_name` for search indexing (`#5239 <https://github.com/rtfd/readthedocs.org/pull/5239>`__)
19+
* `@davidfischer <http://github.com/davidfischer>`__: Tweak some ad styles (`#5237 <https://github.com/rtfd/readthedocs.org/pull/5237>`__)
20+
* `@stsewd <http://github.com/stsewd>`__: Fix conda issue link (`#5226 <https://github.com/rtfd/readthedocs.org/pull/5226>`__)
21+
* `@humitos <http://github.com/humitos>`__: Add Santos to the development team (`#5224 <https://github.com/rtfd/readthedocs.org/pull/5224>`__)
22+
* `@ericholscher <http://github.com/ericholscher>`__: Update our GSOC page for 2019 (`#5210 <https://github.com/rtfd/readthedocs.org/pull/5210>`__)
23+
* `@humitos <http://github.com/humitos>`__: Do not allow to merge 'Status: blocked' PRs (`#5205 <https://github.com/rtfd/readthedocs.org/pull/5205>`__)
24+
* `@stsewd <http://github.com/stsewd>`__: Inject user to middleware tests (`#5203 <https://github.com/rtfd/readthedocs.org/pull/5203>`__)
25+
* `@ericholscher <http://github.com/ericholscher>`__: Remove approvals requirement from mergable (`#5200 <https://github.com/rtfd/readthedocs.org/pull/5200>`__)
26+
* `@agjohnson <http://github.com/agjohnson>`__: Update project notification copy to past tense (`#5199 <https://github.com/rtfd/readthedocs.org/pull/5199>`__)
27+
* `@stsewd <http://github.com/stsewd>`__: Remove feature flag for v2 (`#5198 <https://github.com/rtfd/readthedocs.org/pull/5198>`__)
28+
* `@ericholscher <http://github.com/ericholscher>`__: Refactor search code (`#5197 <https://github.com/rtfd/readthedocs.org/pull/5197>`__)
29+
* `@stsewd <http://github.com/stsewd>`__: Update mergeable settings to v2 (`#5196 <https://github.com/rtfd/readthedocs.org/pull/5196>`__)
30+
* `@stsewd <http://github.com/stsewd>`__: Fix mergeable bot (`#5195 <https://github.com/rtfd/readthedocs.org/pull/5195>`__)
31+
* `@stsewd <http://github.com/stsewd>`__: Fix broken links for badges (`#5190 <https://github.com/rtfd/readthedocs.org/pull/5190>`__)
32+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Change badge style (`#5189 <https://github.com/rtfd/readthedocs.org/pull/5189>`__)
33+
* `@humitos <http://github.com/humitos>`__: Allow source_suffix to be a dictionary (`#5183 <https://github.com/rtfd/readthedocs.org/pull/5183>`__)
34+
* `@humitos <http://github.com/humitos>`__: Upgrade all packages removing py2 compatibility (`#5179 <https://github.com/rtfd/readthedocs.org/pull/5179>`__)
35+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Small docs fix (`#5176 <https://github.com/rtfd/readthedocs.org/pull/5176>`__)
36+
* `@stsewd <http://github.com/stsewd>`__: Sync all services even if one social accoun fails (`#5171 <https://github.com/rtfd/readthedocs.org/pull/5171>`__)
37+
* `@ericholscher <http://github.com/ericholscher>`__: Release 3.1.0 (`#5170 <https://github.com/rtfd/readthedocs.org/pull/5170>`__)
38+
* `@rvmzes <http://github.com/rvmzes>`__: SyntaxError caused by comma in python3 (`#5156 <https://github.com/rtfd/readthedocs.org/pull/5156>`__)
39+
* `@humitos <http://github.com/humitos>`__: Use latest docker images as default (`#5155 <https://github.com/rtfd/readthedocs.org/pull/5155>`__)
40+
* `@stsewd <http://github.com/stsewd>`__: Remove logic for guessing slug from an unregistered domain (`#5143 <https://github.com/rtfd/readthedocs.org/pull/5143>`__)
41+
* `@humitos <http://github.com/humitos>`__: Allow custom 404.html on projects (`#5130 <https://github.com/rtfd/readthedocs.org/pull/5130>`__)
42+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Docs for feature flag (`#5043 <https://github.com/rtfd/readthedocs.org/pull/5043>`__)
43+
* `@stsewd <http://github.com/stsewd>`__: Remove usage of project.documentation_type in tasks (`#4896 <https://github.com/rtfd/readthedocs.org/pull/4896>`__)
44+
* `@ericholscher <http://github.com/ericholscher>`__: Reapply the Elastic Search upgrade to `master` (`#4722 <https://github.com/rtfd/readthedocs.org/pull/4722>`__)
45+
* `@stsewd <http://github.com/stsewd>`__: Config file v2 docs (`#4451 <https://github.com/rtfd/readthedocs.org/pull/4451>`__)
46+
* `@stsewd <http://github.com/stsewd>`__: Set python3 as default interpreter (`#3581 <https://github.com/rtfd/readthedocs.org/pull/3581>`__)
47+
148
Version 3.1.0
249
-------------
350

docs/builds.rst

+3-53
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if you provide a good reason your documentation needs more resources.
1818
You can see the current Docker build images that we use in our `docker repository <https://github.com/rtfd/readthedocs-docker-images>`_.
1919
`Docker Hub <https://hub.docker.com/r/readthedocs/build/>`_ also shows the latest set of images that have been built.
2020

21-
Currently in production we're using the ``readthedocs/build:2.0`` docker image as our default image.
21+
Currently in production we're using the ``readthedocs/build:latest`` docker image as our default image.
2222

2323
How we build documentation
2424
--------------------------
@@ -118,7 +118,7 @@ The build environment
118118
---------------------
119119

120120
The build process is executed inside Docker containers,
121-
by default the image used is ``readthedocs/build:2.0``,
121+
by default the image used is ``readthedocs/build:latest``,
122122
but you can change that using a :doc:`config-file/index`.
123123

124124
.. note::
@@ -133,57 +133,7 @@ but you can change that using a :doc:`config-file/index`.
133133
If you want to know the specific version of a package that is installed in the image
134134
you can check the `Ubuntu package search page <https://packages.ubuntu.com/>`__.
135135

136-
2.0 (stable)
137-
~~~~~~~~~~~~
138-
139-
:O.S: Ubuntu 16.04
140-
:Conda: Miniconda 4.3.31
141-
:Python:
142-
* ``m2crypto``
143-
* ``matplolib``
144-
* ``numpy``
145-
* ``pandas``
146-
* ``pip``
147-
* ``scipy``
148-
:Other packages:
149-
* ``doxygen``
150-
* ``graphviz``
151-
* ``libevent``
152-
* ``libjpeg``
153-
* ``libxml2-dev``
154-
* ``libxslt1.1``
155-
* ``pandoc``
156-
* ``textlive-full``
157-
158-
`More details <https://github.com/rtfd/readthedocs-docker-images/blob/releases/2.x/Dockerfile>`__
159-
160-
3.0 (latest)
161-
~~~~~~~~~~~~
162-
163-
:O.S: Ubuntu 16.04
164-
:Conda: Miniconda 4.4.10
165-
:Python:
166-
* ``matplolib``
167-
* ``numpy``,
168-
* ``pandas``
169-
* ``pip``
170-
* ``scipy``
171-
:JavaScript:
172-
* ``jsdoc``
173-
* ``nodejs``
174-
* ``npm``
175-
:Other packages:
176-
* ``doxygen``
177-
* ``libevent-dev``
178-
* ``libgraphviz-dev``
179-
* ``libjpeg``
180-
* ``libxml2-dev``
181-
* ``libxslt1-dev``
182-
* ``pandoc``
183-
* ``plantuml``
184-
* ``textlive-full``
185-
186-
`More details <https://github.com/rtfd/readthedocs-docker-images/blob/releases/3.x/Dockerfile>`__
136+
More details on software installed in images could be found by browsing specific branch in `rtfd/readthedocs-docker-images <https://github.com/rtfd/readthedocs-docker-images>`__ repository.
187137

188138
Writing your own builder
189139
------------------------

docs/conf.py

+23-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import os
66
import sys
7+
from configparser import RawConfigParser
78

89
import sphinx_rtd_theme
910

@@ -18,6 +19,13 @@
1819
django.setup()
1920

2021

22+
def get_version():
23+
"""Return package version from setup.cfg."""
24+
config = RawConfigParser()
25+
config.read(os.path.join('..', 'setup.cfg'))
26+
return config.get('metadata', 'version')
27+
28+
2129
sys.path.append(os.path.abspath('_ext'))
2230
extensions = [
2331
'sphinx.ext.autosectionlabel',
@@ -29,6 +37,7 @@
2937
'sphinx_tabs.tabs',
3038
'sphinx-prompt',
3139
'recommonmark',
40+
'notfound.extension',
3241
]
3342
templates_path = ['_templates']
3443

@@ -39,7 +48,7 @@
3948
copyright = '2010-{}, Read the Docs, Inc & contributors'.format(
4049
timezone.now().year
4150
)
42-
version = '2.7'
51+
version = get_version()
4352
release = version
4453
exclude_patterns = ['_build']
4554
default_role = 'obj'
@@ -81,6 +90,19 @@
8190
# Activate autosectionlabel plugin
8291
autosectionlabel_prefix_document = True
8392

93+
# sphinx-notfound-page
94+
# https://github.com/rtfd/sphinx-notfound-page
95+
notfound_context = {
96+
'title': 'Page Not Found',
97+
'body': '''
98+
<h1>Page Not Found</h1>
99+
100+
<p>Sorry, we couldn't find that page.</p>
101+
102+
<p>Try using the search box or go to the homepage.</p>
103+
''',
104+
}
105+
84106

85107
def setup(app):
86108
app.add_stylesheet('css/sphinx_prompt_css.css')

docs/config-file/v1.rst

+7-8
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ The ``build`` block configures specific aspects of the documentation build.
112112
build.image
113113
```````````
114114

115-
* Default: :djangosetting:`DOCKER_IMAGE`
116-
* Options: ``1.0``, ``2.0``, ``latest``
115+
* Default: :djangosetting:`DOCKER_DEFAULT_VERSION`
116+
* Options: ``stable``, ``latest``
117117

118118
The build image to use for specific builds.
119119
This lets users specify a more experimental build image,
@@ -122,9 +122,8 @@ if they want to be on the cutting edge.
122122
Certain Python versions require a certain build image,
123123
as defined here:
124124

125-
* ``1.0``: 2, 2.7, 3, 3.4
126-
* ``2.0``: 2, 2.7, 3, 3.5
127-
* ``latest``: 2, 2.7, 3, 3.3, 3.4, 3.5, 3.6
125+
* ``stable``: :buildpyversions:`stable`
126+
* ``latest``: :buildpyversions:`latest`
128127

129128
.. code-block:: yaml
130129
@@ -147,8 +146,8 @@ used for building documentation.
147146
python.version
148147
``````````````
149148

150-
* Default: ``2.7``
151-
* Options: ``2.7``, ``2``, ``3.5``, ``3``
149+
* Default: ``3.7``
150+
* Options: :buildpyversions:`latest`
152151

153152
This is the version of Python to use when building your documentation.
154153
If you specify only the major version of Python,
@@ -158,7 +157,7 @@ the highest supported minor version will be selected.
158157

159158
The supported Python versions depends on the version of the build image your
160159
project is using. The default build image that is used to build
161-
documentation contains support for Python ``2.7`` and ``3.5``. See the
160+
documentation contains support for Python ``2.7`` and ``3.7``. See the
162161
:ref:`yaml__build__image` for more information on supported Python versions.
163162

164163
.. code-block:: yaml

docs/development/search.rst

+8-9
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,14 @@ By default, Auto Indexing is turned off in development mode. To turn it on, chan
3737
After that, whenever a documentation successfully builds, or project gets added,
3838
the search index will update automatically.
3939

40-
4140
Architecture
4241
------------
4342
The search architecture is devided into 2 parts.
44-
One part is responsible for **indexing** the documents and projects and
45-
the other part is responsible for querying the Index to show the proper results to users.
46-
We use the `django-elasticsearch-dsl`_ package mostly to the keep the search working.
43+
44+
* One part is responsible for **indexing** the documents and projects (``documents.py``)
45+
* The other part is responsible for **querying** the Index to show the proper results to users (``faceted_search.py``)
46+
47+
We use the `django-elasticsearch-dsl`_ package for our Document abstraction.
4748
`django-elasticsearch-dsl`_ is a wrapper around `elasticsearch-dsl`_ for easy configuration
4849
with Django.
4950

@@ -72,11 +73,11 @@ and index/delete the documentation content from the `HTMLFile` instances.
7273

7374
How we index projects
7475
~~~~~~~~~~~~~~~~~~~~~
76+
7577
We also index project information in our search index so that the user can search for projects
76-
from the main site. `django-elasticsearch-dsl`_ listen `post_create` and `post_delete` signals of
78+
from the main site. We listen to the `post_create` and `post_delete` signals of
7779
`Project` model and index/delete into Elasticsearch accordingly.
7880

79-
8081
Elasticsearch Document
8182
~~~~~~~~~~~~~~~~~~~~~~
8283

@@ -88,9 +89,7 @@ As per requirements of `django-elasticsearch-dsl`_, it is stored in the
8889
`django-elasticsearch-dsl`_ listens to the `post_save` signal of `Project` model and
8990
then index/delete into Elasticsearch.
9091

91-
**PageDocument**: It is used for indexing documentation of projects. By default, the auto
92-
indexing is turned off by `ignore_signals = settings.ES_PAGE_IGNORE_SIGNALS`.
93-
`settings.ES_PAGE_IGNORE_SIGNALS` is `False` both in development and production.
92+
**PageDocument**: It is used for indexing documentation of projects.
9493
As mentioned above, our `Search` app listens to the `bulk_post_create` and `bulk_post_delete`
9594
signals and indexes/deleted documentation into Elasticsearch. The signal listeners are in
9695
the `readthedocs/search/signals.py` file. Both of the signals are dispatched

docs/security.rst

+11
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,17 @@ __ https://pgp.mit.edu/pks/lookup?op=vindex&search=0xFEEF9FC2DD21D271
8484
Security issue archive
8585
----------------------
8686

87+
Version 3.2.0
88+
~~~~~~~~~~~~~
89+
90+
:ref:`version-3.2.0` resolved an issue where a specially crafted request
91+
could result in a DNS query to an arbitrary domain.
92+
93+
This issue was found by `Cyber Smart Defence <https://www.cybersmartdefence.com/>`_
94+
who reported it as part of a security audit to a firm running a local installation
95+
of Read the Docs.
96+
97+
8798
Release 2.3.0
8899
~~~~~~~~~~~~~
89100

docs/webhooks.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,13 @@ GitHub
4646
* Go to the :guilabel:`Settings` page for your project
4747
* Click :guilabel:`Webhooks` > :guilabel:`Add webhook`
4848
* For **Payload URL**, use the URL of the integration on Read the Docs,
49-
found on the project's :guilabel:`Admin` > :guilabel:`Integrations` page
49+
found on the project's :guilabel:`Admin` > :guilabel:`Integrations` page.
50+
You may need to prepend *https://* to the URL.
5051
* For **Content type**, both *application/json* and
5152
*application/x-www-form-urlencoded* work
5253
* Select **Let me select individual events**,
5354
and mark **Pushes**, **Branch or tag creation**, and **Branch or tag deletion** events
55+
* Leave the **Secrets** field black
5456
* Finish by clicking **Add webhook**
5557

5658
You can verify if the webhook is working at the bottom of the GitHub page under **Recent Deliveries**.

media/css/readthedocs-doc-embed.css

+26-2
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ div.ethical-footer {
5555
}
5656
.ethical-sidebar,
5757
.ethical-footer {
58-
padding: 1em;
58+
padding: 0.5em;
5959
margin: 1em 0;
6060
}
6161
.ethical-sidebar img,
@@ -93,6 +93,30 @@ div.ethical-footer {
9393
line-height: 20px;
9494
}
9595

96+
/* Techstack badging */
97+
.ethical-sidebar ul {
98+
margin: 0 !important;
99+
padding-left: 0;
100+
list-style: none;
101+
}
102+
.ethical-sidebar ul li {
103+
display: inline-block;
104+
background-color: lightskyblue;
105+
color: black;
106+
padding: 0.25em 0.4em;
107+
font-size: 75%;
108+
font-weight: 700;
109+
margin: 0.25em;
110+
border-radius: 0.25rem;
111+
text-align: center;
112+
vertical-align: baseline;
113+
white-space: nowrap;
114+
line-height: 1.41;
115+
}
116+
.ethical-sidebar ul li:not(:last-child) {
117+
margin-right: .25rem;
118+
}
119+
96120
.ethical-sidebar a,
97121
.ethical-sidebar a:visited,
98122
.ethical-sidebar a:hover,
@@ -102,7 +126,7 @@ div.ethical-footer {
102126
.ethical-footer a:hover,
103127
.ethical-footer a:active {
104128
color: #0a0a0a;
105-
text-decoration: underline !important;
129+
text-decoration: none !important;
106130
border-bottom: 0 !important;
107131
}
108132

0 commit comments

Comments
 (0)