Skip to content

Commit b2939b4

Browse files
committed
Merge branch 'master' into implement-extend-install-option
2 parents 823a9dc + b0ba3ff commit b2939b4

28 files changed

+449
-352
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.'

.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

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

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/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/config/config.py

-79
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
import copy
99
import os
10-
import re
1110
from contextlib import contextmanager
1211

1312
import six
@@ -33,7 +32,6 @@
3332
validate_bool,
3433
validate_choice,
3534
validate_dict,
36-
validate_directory,
3735
validate_file,
3836
validate_list,
3937
validate_string,
@@ -58,12 +56,8 @@
5856

5957
CONFIG_NOT_SUPPORTED = 'config-not-supported'
6058
VERSION_INVALID = 'version-invalid'
61-
BASE_INVALID = 'base-invalid'
62-
BASE_NOT_A_DIR = 'base-not-a-directory'
6359
CONFIG_SYNTAX_INVALID = 'config-syntax-invalid'
6460
CONFIG_REQUIRED = 'config-required'
65-
NAME_REQUIRED = 'name-required'
66-
NAME_INVALID = 'name-invalid'
6761
CONF_FILE_REQUIRED = 'conf-file-required'
6862
PYTHON_INVALID = 'python-invalid'
6963
SUBMODULES_INVALID = 'submodules-invalid'
@@ -275,12 +269,6 @@ class BuildConfigV1(BuildConfigBase):
275269

276270
"""Version 1 of the configuration file."""
277271

278-
BASE_INVALID_MESSAGE = 'Invalid value for base: {base}'
279-
BASE_NOT_A_DIR_MESSAGE = '"base" is not a directory: {base}'
280-
NAME_REQUIRED_MESSAGE = 'Missing key "name"'
281-
NAME_INVALID_MESSAGE = (
282-
'Invalid name "{name}". Valid values must match {name_re}'
283-
)
284272
CONF_FILE_REQUIRED_MESSAGE = 'Missing key "conf_file"'
285273
PYTHON_INVALID_MESSAGE = '"python" section must be a mapping.'
286274
PYTHON_EXTRA_REQUIREMENTS_INVALID_MESSAGE = (
@@ -318,63 +306,17 @@ def validate(self):
318306
``readthedocs.yml`` config file if not set
319307
"""
320308
# Validate env_config.
321-
# TODO: this isn't used
322-
self._config['output_base'] = self.validate_output_base()
323-
324309
# Validate the build environment first
325310
# Must happen before `validate_python`!
326311
self._config['build'] = self.validate_build()
327312

328313
# Validate raw_config. Order matters.
329-
# TODO: this isn't used
330-
self._config['name'] = self.validate_name()
331-
# TODO: this isn't used
332-
self._config['base'] = self.validate_base()
333314
self._config['python'] = self.validate_python()
334315
self._config['formats'] = self.validate_formats()
335316

336317
self._config['conda'] = self.validate_conda()
337318
self._config['requirements_file'] = self.validate_requirements_file()
338319

339-
def validate_output_base(self):
340-
"""Validates that ``output_base`` exists and set its absolute path."""
341-
assert 'output_base' in self.env_config, (
342-
'"output_base" required in "env_config"')
343-
output_base = os.path.abspath(
344-
os.path.join(
345-
self.env_config.get('output_base', self.base_path),
346-
)
347-
)
348-
return output_base
349-
350-
def validate_name(self):
351-
"""Validates that name exists."""
352-
name = self.raw_config.get('name', None)
353-
if not name:
354-
name = self.env_config.get('name', None)
355-
if not name:
356-
self.error('name', self.NAME_REQUIRED_MESSAGE, code=NAME_REQUIRED)
357-
name_re = r'^[-_.0-9a-zA-Z]+$'
358-
if not re.match(name_re, name):
359-
self.error(
360-
'name',
361-
self.NAME_INVALID_MESSAGE.format(
362-
name=name,
363-
name_re=name_re),
364-
code=NAME_INVALID)
365-
366-
return name
367-
368-
def validate_base(self):
369-
"""Validates that path is a valid directory."""
370-
if 'base' in self.raw_config:
371-
base = self.raw_config['base']
372-
else:
373-
base = self.base_path
374-
with self.catch_validation_error('base'):
375-
base = validate_directory(base, self.base_path)
376-
return base
377-
378320
def validate_build(self):
379321
"""
380322
Validate the build config settings.
@@ -417,12 +359,6 @@ def validate_build(self):
417359
self.env_config.update(
418360
DOCKER_IMAGE_SETTINGS[build['image']]
419361
)
420-
# Update docker settings from user config
421-
if 'DOCKER_IMAGE_SETTINGS' in self.env_config and \
422-
build['image'] in self.env_config['DOCKER_IMAGE_SETTINGS']:
423-
self.env_config.update(
424-
self.env_config['DOCKER_IMAGE_SETTINGS'][build['image']]
425-
)
426362

427363
# Allow to override specific project
428364
config_image = self.defaults.get('build_image')
@@ -556,21 +492,6 @@ def validate_formats(self):
556492

557493
return formats
558494

559-
@property
560-
def name(self):
561-
"""The project name."""
562-
return self._config['name']
563-
564-
@property
565-
def base(self):
566-
"""The base directory."""
567-
return self._config['base']
568-
569-
@property
570-
def output_base(self):
571-
"""The output base."""
572-
return self._config['output_base']
573-
574495
@property
575496
def formats(self):
576497
"""The documentation formats to be built."""

0 commit comments

Comments
 (0)