Skip to content

Commit 819071c

Browse files
authored
Merge branch 'master' into humitos/do-not-list-banned-projects
2 parents fbfbb44 + 44a4fe3 commit 819071c

File tree

370 files changed

+8474
-8569
lines changed

Some content is hidden

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

370 files changed

+8474
-8569
lines changed

.github/mergeable.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# ProBot Mergeable Bot
2+
# https://github.com/jusx/mergeable
3+
4+
mergeable:
5+
pull_requests:
6+
approvals:
7+
# Minimum of approvals needed.
8+
min: 1
9+
message: 'The PR must have a minimum of 1 approvals.'
10+
11+
description:
12+
no_empty:
13+
# Do not allow empty descriptions on PR.
14+
enabled: false
15+
message: 'Description can not be empty.'
16+
17+
must_exclude:
18+
# Do not allow 'DO NOT MERGE' phrase on PR's description.
19+
regex: 'DO NOT MERGE'
20+
message: 'Description says that the PR should not be merged yet.'
21+
22+
# Do not allow 'WIP' on PR's title.
23+
title: 'WIP'
24+
25+
label:
26+
# Do not allow PR with label 'PR: work in progress'
27+
must_exclude: 'PR: work in progress'
28+
message: 'This PR is work in progress.'

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
.DS_Store
88
.cache
99
.coverage
10+
.coverage.*
1011
.idea
1112
.vagrant
1213
.vscode
@@ -22,7 +23,7 @@ celerybeat-schedule.*
2223
deploy/.vagrant
2324
dist/*
2425
local_settings.py
25-
locks/*
26+
locks/**
2627
logs/*
2728
media/dash
2829
media/epub

.readthedocs.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ formats: all
33
sphinx:
44
configuration: docs/conf.py
55
python:
6-
requirements: requirements.txt
6+
requirements: requirements/local-docs-build.txt

.travis.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
language: python
22
python:
3-
- 2.7
43
- 3.6
5-
env:
6-
- ES_VERSION=1.3.9 ES_DOWNLOAD_URL=https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz
74
matrix:
85
include:
6+
- python: 3.6
7+
env: TOXENV=py36 ES_VERSION=1.3.9 ES_DOWNLOAD_URL=https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz
98
- python: 3.6
109
env: TOXENV=docs
1110
- python: 3.6
@@ -45,6 +44,6 @@ notifications:
4544

4645
branches:
4746
only:
48-
- master
47+
- master
4948
- rel # Community release branch
5049
- relcorp # Corporate release branch

CHANGELOG.rst

+53
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,56 @@
1+
Version 2.8.5
2+
-------------
3+
4+
:Date: January 15, 2019
5+
6+
* `@stsewd <http://github.com/stsewd>`__: Use the python path from virtualenv in Conda (`#5110 <https://github.com/rtfd/readthedocs.org/pull/5110>`__)
7+
* `@humitos <http://github.com/humitos>`__: Feature flag to use `readthedocs/build:testing` image (`#5109 <https://github.com/rtfd/readthedocs.org/pull/5109>`__)
8+
* `@stsewd <http://github.com/stsewd>`__: Use python from virtualenv's bin directory when executing commands (`#5107 <https://github.com/rtfd/readthedocs.org/pull/5107>`__)
9+
* `@humitos <http://github.com/humitos>`__: Do not build projects from banned users (`#5096 <https://github.com/rtfd/readthedocs.org/pull/5096>`__)
10+
* `@agjohnson <http://github.com/agjohnson>`__: Fix common pieces (`#5095 <https://github.com/rtfd/readthedocs.org/pull/5095>`__)
11+
* `@rainwoodman <http://github.com/rainwoodman>`__: Suppress progress bar of the conda command. (`#5094 <https://github.com/rtfd/readthedocs.org/pull/5094>`__)
12+
* `@humitos <http://github.com/humitos>`__: Remove unused suggestion block from 404 pages (`#5087 <https://github.com/rtfd/readthedocs.org/pull/5087>`__)
13+
* `@humitos <http://github.com/humitos>`__: Remove header nav (Login/Logout button) on 404 pages (`#5085 <https://github.com/rtfd/readthedocs.org/pull/5085>`__)
14+
* `@stsewd <http://github.com/stsewd>`__: Fix little typo (`#5084 <https://github.com/rtfd/readthedocs.org/pull/5084>`__)
15+
* `@agjohnson <http://github.com/agjohnson>`__: Split up deprecated view notification to GitHub and other webhook endpoints (`#5083 <https://github.com/rtfd/readthedocs.org/pull/5083>`__)
16+
* `@humitos <http://github.com/humitos>`__: Install ProBot (`#5082 <https://github.com/rtfd/readthedocs.org/pull/5082>`__)
17+
* `@stsewd <http://github.com/stsewd>`__: Update docs about contributing to docs (`#5077 <https://github.com/rtfd/readthedocs.org/pull/5077>`__)
18+
* `@humitos <http://github.com/humitos>`__: Declare and improve invoke tasks (`#5075 <https://github.com/rtfd/readthedocs.org/pull/5075>`__)
19+
* `@davidfischer <http://github.com/davidfischer>`__: Fire a signal for domain verification (eg. for SSL) (`#5071 <https://github.com/rtfd/readthedocs.org/pull/5071>`__)
20+
* `@agjohnson <http://github.com/agjohnson>`__: Update copy on notifications for github services deprecation (`#5067 <https://github.com/rtfd/readthedocs.org/pull/5067>`__)
21+
* `@humitos <http://github.com/humitos>`__: Upgrade all packages with pur (`#5059 <https://github.com/rtfd/readthedocs.org/pull/5059>`__)
22+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Reduce logging to sentry (`#5054 <https://github.com/rtfd/readthedocs.org/pull/5054>`__)
23+
* `@discdiver <http://github.com/discdiver>`__: fixed missing apostrophe for possessive "project's" (`#5052 <https://github.com/rtfd/readthedocs.org/pull/5052>`__)
24+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Template improvements in "gold/subscription_form.html" (`#5049 <https://github.com/rtfd/readthedocs.org/pull/5049>`__)
25+
* `@merwok <http://github.com/merwok>`__: Fix link in features page (`#5048 <https://github.com/rtfd/readthedocs.org/pull/5048>`__)
26+
* `@stsewd <http://github.com/stsewd>`__: Update webhook docs (`#5040 <https://github.com/rtfd/readthedocs.org/pull/5040>`__)
27+
* `@stsewd <http://github.com/stsewd>`__: Remove sphinx static and template dir (`#5039 <https://github.com/rtfd/readthedocs.org/pull/5039>`__)
28+
* `@stephenfin <http://github.com/stephenfin>`__: Add temporary method for disabling shallow cloning (#5031) (`#5036 <https://github.com/rtfd/readthedocs.org/pull/5036>`__)
29+
* `@stsewd <http://github.com/stsewd>`__: Raise exception in failed checkout (`#5035 <https://github.com/rtfd/readthedocs.org/pull/5035>`__)
30+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Change default_branch value from Version.slug to Version.identifier (`#5034 <https://github.com/rtfd/readthedocs.org/pull/5034>`__)
31+
* `@humitos <http://github.com/humitos>`__: Make wipe view not CSRF exempt (`#5025 <https://github.com/rtfd/readthedocs.org/pull/5025>`__)
32+
* `@humitos <http://github.com/humitos>`__: Convert an IRI path to URI before setting as NGINX header (`#5024 <https://github.com/rtfd/readthedocs.org/pull/5024>`__)
33+
* `@safwanrahman <http://github.com/safwanrahman>`__: index project asynchronously (`#5023 <https://github.com/rtfd/readthedocs.org/pull/5023>`__)
34+
* `@stsewd <http://github.com/stsewd>`__: Keep command output when it's killed (`#5015 <https://github.com/rtfd/readthedocs.org/pull/5015>`__)
35+
* `@stsewd <http://github.com/stsewd>`__: More hints for invalid submodules (`#5012 <https://github.com/rtfd/readthedocs.org/pull/5012>`__)
36+
* `@ericholscher <http://github.com/ericholscher>`__: Release 2.8.4 (`#5011 <https://github.com/rtfd/readthedocs.org/pull/5011>`__)
37+
* `@stsewd <http://github.com/stsewd>`__: Remove `auto` doctype (`#5010 <https://github.com/rtfd/readthedocs.org/pull/5010>`__)
38+
* `@davidfischer <http://github.com/davidfischer>`__: Tweak sidebar ad priority (`#5005 <https://github.com/rtfd/readthedocs.org/pull/5005>`__)
39+
* `@stsewd <http://github.com/stsewd>`__: Replace git status and git submodules status for gitpython (`#5002 <https://github.com/rtfd/readthedocs.org/pull/5002>`__)
40+
* `@davidfischer <http://github.com/davidfischer>`__: Backport jquery 2432 to Read the Docs (`#5001 <https://github.com/rtfd/readthedocs.org/pull/5001>`__)
41+
* `@stsewd <http://github.com/stsewd>`__: Refactor remove_dir (`#4994 <https://github.com/rtfd/readthedocs.org/pull/4994>`__)
42+
* `@humitos <http://github.com/humitos>`__: Skip builds when project is not active (`#4991 <https://github.com/rtfd/readthedocs.org/pull/4991>`__)
43+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Make $ unselectable in docs (`#4990 <https://github.com/rtfd/readthedocs.org/pull/4990>`__)
44+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Remove deprecated "models.permalink" (`#4975 <https://github.com/rtfd/readthedocs.org/pull/4975>`__)
45+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Add validation for tags of length greater than 100 characters (`#4967 <https://github.com/rtfd/readthedocs.org/pull/4967>`__)
46+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Add test case for send_notifications on VersionLockedError (`#4958 <https://github.com/rtfd/readthedocs.org/pull/4958>`__)
47+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Remove trailing slashes on svn checkout (`#4951 <https://github.com/rtfd/readthedocs.org/pull/4951>`__)
48+
* `@stsewd <http://github.com/stsewd>`__: Safe symlink on version deletion (`#4937 <https://github.com/rtfd/readthedocs.org/pull/4937>`__)
49+
* `@humitos <http://github.com/humitos>`__: CRUD for EnvironmentVariables from Project's admin (`#4899 <https://github.com/rtfd/readthedocs.org/pull/4899>`__)
50+
* `@humitos <http://github.com/humitos>`__: Notify users about the usage of deprecated webhooks (`#4898 <https://github.com/rtfd/readthedocs.org/pull/4898>`__)
51+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Disable django guardian warning (`#4892 <https://github.com/rtfd/readthedocs.org/pull/4892>`__)
52+
* `@humitos <http://github.com/humitos>`__: Handle 401, 403 and 404 status codes when hitting GitHub for webhook (`#4805 <https://github.com/rtfd/readthedocs.org/pull/4805>`__)
53+
154
Version 2.8.4
255
-------------
356

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2010-2017 Read the Docs, Inc & contributors
1+
Copyright (c) 2010-2019 Read the Docs, Inc & contributors
22

33
Permission is hereby granted, free of charge, to any person
44
obtaining a copy of this software and associated documentation

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,6 @@ when you push to GitHub.
7878
License
7979
-------
8080

81-
`MIT`_ © 2010-2017 Read the Docs, Inc & contributors
81+
`MIT`_ © 2010-2019 Read the Docs, Inc & contributors
8282

8383
.. _MIT: LICENSE

common

docs/builds.rst

+5
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,8 @@ The *Sphinx* and *Mkdocs* builders set the following RTD-specific environment va
225225
+-------------------------+--------------------------------------------------+----------------------+
226226
| ``READTHEDOCS_PROJECT`` | The RTD name of the project which is being built | ``myexampleproject`` |
227227
+-------------------------+--------------------------------------------------+----------------------+
228+
229+
.. tip::
230+
231+
In case extra environment variables are needed to the build process (like secrets, tokens, etc),
232+
you can add them going to **Admin > Environment Variables** in your project. See :doc:`guides/environment-variables`.

docs/conf.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import sys
77

88
import sphinx_rtd_theme
9-
from recommonmark.parser import CommonMarkParser
109

1110
sys.path.insert(0, os.path.abspath('..'))
1211
sys.path.append(os.path.dirname(__file__))
@@ -29,13 +28,11 @@
2928
'doc_extensions',
3029
'sphinx_tabs.tabs',
3130
'sphinx-prompt',
31+
'recommonmark',
3232
]
3333
templates_path = ['_templates']
3434

3535
source_suffix = ['.rst', '.md']
36-
source_parsers = {
37-
'.md': CommonMarkParser,
38-
}
3936

4037
master_doc = 'index'
4138
project = u'Read the Docs'

docs/faq.rst

+46
Original file line numberDiff line numberDiff line change
@@ -230,3 +230,49 @@ What commit of Read the Docs is in production?
230230
----------------------------------------------
231231

232232
We deploy readthedocs.org from the `rel` branch in our GitHub repository. You can see the latest commits that have been deployed by looking on GitHub: https://github.com/rtfd/readthedocs.org/commits/rel
233+
234+
235+
How can I avoid search results having a deprecated version of my docs?
236+
----------------------------------------------------------------------
237+
238+
If readers search something related to your docs in Google, it will probably return the most relevant version of your documentation.
239+
It may happen that this version is already deprecated and you want to stop Google indexing it as a result,
240+
and start suggesting the latest (or newer) one.
241+
242+
To accomplish this, you can add a ``robots.txt`` file to your documentation's root so it ends up served at the root URL of your project
243+
(for example, https://yourproject.readthedocs.io/robots.txt).
244+
245+
246+
Minimal example of ``robots.txt``
247+
+++++++++++++++++++++++++++++++++
248+
249+
::
250+
251+
User-agent: *
252+
Disallow: /en/deprecated-version/
253+
Disallow: /en/2.0/
254+
255+
.. note::
256+
257+
See `Google's docs`_ for its full syntax.
258+
259+
This file has to be served as is under ``/robots.txt``.
260+
Depending if you are using Sphinx or MkDocs, you will need a different configuration for this.
261+
262+
263+
Sphinx
264+
~~~~~~
265+
266+
Sphinx uses `html_extra`_ option to add static files to the output.
267+
You need to create a ``robots.txt`` file and put it under the path defined in ``html_extra``.
268+
269+
270+
MkDocs
271+
~~~~~~
272+
273+
MkDocs needs the ``robots.txt`` to be at the directory defined at `docs_dir`_ config.
274+
275+
276+
.. _Google's docs: https://support.google.com/webmasters/answer/6062608
277+
.. _html_extra: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_extra_path
278+
.. _docs_dir: https://www.mkdocs.org/user-guide/configuration/#docs_dir

docs/guides/environment-variables.rst

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
I Need Secrets (or Environment Variables) in my Build
2+
=====================================================
3+
4+
It may happen that your documentation depends on an authenticated service to be built properly.
5+
In this case, you will require some secrets to access these services.
6+
7+
Read the Docs provides a way to define environment variables for your project to be used in the build process.
8+
All these variables will be exposed to all the commands executed when building your documentation.
9+
10+
To define an environment variable, you need to
11+
12+
#. Go to your project **Admin > Environment Variables**
13+
#. Click on "Add Environment Variable" button
14+
#. Input a ``Name`` and ``Value`` (your secret needed here)
15+
#. Click "Save" button
16+
17+
.. note::
18+
19+
Values will never be exposed to users, even to owners of the project. Once you create an environment variable you won't be able to see its value anymore because of security purposes.
20+
21+
After adding an environment variable from your project's admin, you can access it from your build process using Python, for example:
22+
23+
.. code-block:: python
24+
25+
# conf.py
26+
import os
27+
import requests
28+
29+
# Access to our custom environment variables
30+
username = os.environ.get('USERNAME')
31+
password = os.environ.get('PASSWORD')
32+
33+
# Request a username/password protected URL
34+
response = requests.get(
35+
'https://httpbin.org/basic-auth/username/password',
36+
auth=(username, password),
37+
)

docs/guides/specifying-dependencies.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Using the project admin dashboard
3535
Once the requirements file has been created;
3636

3737
- Login to Read the Docs and go to the project admin dashboard.
38-
- Go to ``Admin > Advanced Settings > Requirements file``.
38+
- Go to **Admin > Advanced Settings > Requirements file**.
3939
- Specify the path of the requirements file you just created. The path should be relative to the root directory of the documentation project.
4040

4141
Using a conda environment file

docs/webhooks.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ that your VCS provider is not configured correctly. If there is payload
161161
information on your Read the Docs project, you might need to verify that your
162162
versions are configured to build correctly.
163163

164-
Either way, it may help to either resync your webhook intergration (see
164+
Either way, it may help to either resync your webhook integration (see
165165
`Resyncing webhooks`_ for information on this process), or set up an entirely
166-
new webhook intergration.
166+
new webhook integration.
167167

168168
.. _webhook-github-services:
169169

@@ -180,7 +180,7 @@ In order for your project to continue automatically building, you will need to
180180
configure your GitHub repository with a new webhook. You can use either a
181181
connected GitHub account and a :ref:`GitHub webhook integration <webhook-integration-github>`
182182
on your Read the Docs project, or you can use a
183-
:ref:`generic webhook integraiton <webhook-integration-generic>` without a connected
183+
:ref:`generic webhook integration <webhook-integration-generic>` without a connected
184184
account.
185185

186186
.. [1] https://developer.github.com/changes/2018-04-25-github-services-deprecation/

readthedocs/__init__.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
# -*- coding: utf-8 -*-
2+
23
"""Read the Docs."""
34

45
import os.path
56

6-
from future.moves.configparser import RawConfigParser
7+
from configparser import RawConfigParser
78

89

910
def get_version(setupcfg_path):

readthedocs/analytics/__init__.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
"""App init"""
1+
# -*- coding: utf-8 -*-
22

3-
default_app_config = 'readthedocs.analytics.apps.AnalyticsAppConfig' # noqa
3+
"""App init."""
4+
5+
default_app_config = 'readthedocs.analytics.apps.AnalyticsAppConfig' # noqa

readthedocs/analytics/apps.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
# -*- coding: utf-8 -*-
2+
13
"""Django app config for the analytics app."""
24

3-
from __future__ import absolute_import
45
from django.apps import AppConfig
56

67

78
class AnalyticsAppConfig(AppConfig):
89

9-
"""Analytics app init code"""
10+
"""Analytics app init code."""
1011

1112
name = 'readthedocs.analytics'
1213
verbose_name = 'Analytics'

0 commit comments

Comments
 (0)