Skip to content

Commit 130b2d4

Browse files
authored
Merge branch 'master' into patch-2
2 parents 9997271 + c64af2d commit 130b2d4

Some content is hidden

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

70 files changed

+1269
-649
lines changed

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
custom: https://readthedocs.org/sustainability/

CHANGELOG.rst

+74
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,77 @@
1+
Version 3.5.0
2+
-------------
3+
4+
:Date: May 30, 2019
5+
6+
* `@pyup-bot <http://github.com/pyup-bot>`__: pyup: Scheduled weekly dependency update for week 21 (`#5737 <https://github.com/rtfd/readthedocs.org/pull/5737>`__)
7+
* `@humitos <http://github.com/humitos>`__: Update feature flags exposed to user in docs (`#5734 <https://github.com/rtfd/readthedocs.org/pull/5734>`__)
8+
* `@davidfischer <http://github.com/davidfischer>`__: Fix the sidebar ad color (`#5731 <https://github.com/rtfd/readthedocs.org/pull/5731>`__)
9+
* `@davidfischer <http://github.com/davidfischer>`__: Create a funding file (`#5729 <https://github.com/rtfd/readthedocs.org/pull/5729>`__)
10+
* `@davidfischer <http://github.com/davidfischer>`__: Small commercial hosting page rework (`#5728 <https://github.com/rtfd/readthedocs.org/pull/5728>`__)
11+
* `@mattparrilla <http://github.com/mattparrilla>`__: Add note about lack of support for private repos (`#5726 <https://github.com/rtfd/readthedocs.org/pull/5726>`__)
12+
* `@humitos <http://github.com/humitos>`__: Canonical consistency example (`#5722 <https://github.com/rtfd/readthedocs.org/pull/5722>`__)
13+
* `@humitos <http://github.com/humitos>`__: Use nonstopmode for latexmk (`#5714 <https://github.com/rtfd/readthedocs.org/pull/5714>`__)
14+
* `@cclauss <http://github.com/cclauss>`__: Identity is not the same thing as equality in Python (`#5713 <https://github.com/rtfd/readthedocs.org/pull/5713>`__)
15+
* `@pyup-bot <http://github.com/pyup-bot>`__: pyup: Scheduled weekly dependency update for week 20 (`#5712 <https://github.com/rtfd/readthedocs.org/pull/5712>`__)
16+
* `@humitos <http://github.com/humitos>`__: Move version "Clean" button to details page (`#5706 <https://github.com/rtfd/readthedocs.org/pull/5706>`__)
17+
* `@ericholscher <http://github.com/ericholscher>`__: Explicitly mention a support email (`#5703 <https://github.com/rtfd/readthedocs.org/pull/5703>`__)
18+
* `@davidfischer <http://github.com/davidfischer>`__: Storage updates (`#5698 <https://github.com/rtfd/readthedocs.org/pull/5698>`__)
19+
* `@humitos <http://github.com/humitos>`__: Enable auth validate passwords (`#5696 <https://github.com/rtfd/readthedocs.org/pull/5696>`__)
20+
* `@stsewd <http://github.com/stsewd>`__: Simplify lock acquire (`#5695 <https://github.com/rtfd/readthedocs.org/pull/5695>`__)
21+
* `@stsewd <http://github.com/stsewd>`__: Simplify update docs task (`#5694 <https://github.com/rtfd/readthedocs.org/pull/5694>`__)
22+
* `@pyup-bot <http://github.com/pyup-bot>`__: pyup: Scheduled weekly dependency update for week 19 (`#5692 <https://github.com/rtfd/readthedocs.org/pull/5692>`__)
23+
* `@saadmk11 <http://github.com/saadmk11>`__: Warning about using sqlite 3.26.0 for development (`#5681 <https://github.com/rtfd/readthedocs.org/pull/5681>`__)
24+
* `@davidfischer <http://github.com/davidfischer>`__: Configure the security middleware (`#5679 <https://github.com/rtfd/readthedocs.org/pull/5679>`__)
25+
* `@stsewd <http://github.com/stsewd>`__: Fix bug in notifications (`#5678 <https://github.com/rtfd/readthedocs.org/pull/5678>`__)
26+
* `@pyup-bot <http://github.com/pyup-bot>`__: pyup: Scheduled weekly dependency update for week 18 (`#5667 <https://github.com/rtfd/readthedocs.org/pull/5667>`__)
27+
* `@saadmk11 <http://github.com/saadmk11>`__: pylint fix for notifications, restapi and config (`#5664 <https://github.com/rtfd/readthedocs.org/pull/5664>`__)
28+
* `@saadmk11 <http://github.com/saadmk11>`__: pylint fix for readthedocs.search (`#5663 <https://github.com/rtfd/readthedocs.org/pull/5663>`__)
29+
* `@saadmk11 <http://github.com/saadmk11>`__: pylint fix for readthedocs.projects (`#5662 <https://github.com/rtfd/readthedocs.org/pull/5662>`__)
30+
* `@saadmk11 <http://github.com/saadmk11>`__: pylint fix for readthedocs.doc_builder (`#5660 <https://github.com/rtfd/readthedocs.org/pull/5660>`__)
31+
* `@humitos <http://github.com/humitos>`__: Support Docker 5.0 image (`#5657 <https://github.com/rtfd/readthedocs.org/pull/5657>`__)
32+
* `@humitos <http://github.com/humitos>`__: Use latexmk if Sphinx > 1.6 (`#5656 <https://github.com/rtfd/readthedocs.org/pull/5656>`__)
33+
* `@humitos <http://github.com/humitos>`__: Upgrade docker python package to latest release (`#5654 <https://github.com/rtfd/readthedocs.org/pull/5654>`__)
34+
* `@saadmk11 <http://github.com/saadmk11>`__: pylint fix for readthedocs.core (`#5650 <https://github.com/rtfd/readthedocs.org/pull/5650>`__)
35+
* `@pyup-bot <http://github.com/pyup-bot>`__: pyup: Scheduled weekly dependency update for week 17 (`#5645 <https://github.com/rtfd/readthedocs.org/pull/5645>`__)
36+
* `@saadmk11 <http://github.com/saadmk11>`__: Serve custom 404 pages from Django (`#5644 <https://github.com/rtfd/readthedocs.org/pull/5644>`__)
37+
* `@yarons <http://github.com/yarons>`__: Typo fix (`#5642 <https://github.com/rtfd/readthedocs.org/pull/5642>`__)
38+
* `@saadmk11 <http://github.com/saadmk11>`__: Sitemap hreflang syntax invalid for regional language variants fix (`#5638 <https://github.com/rtfd/readthedocs.org/pull/5638>`__)
39+
* `@davidfischer <http://github.com/davidfischer>`__: Optimizations and UX improvements to the dashboard screen (`#5637 <https://github.com/rtfd/readthedocs.org/pull/5637>`__)
40+
* `@davidfischer <http://github.com/davidfischer>`__: Redirect project slugs with underscores (`#5634 <https://github.com/rtfd/readthedocs.org/pull/5634>`__)
41+
* `@saadmk11 <http://github.com/saadmk11>`__: Standardizing the use of settings directly (`#5632 <https://github.com/rtfd/readthedocs.org/pull/5632>`__)
42+
* `@saadmk11 <http://github.com/saadmk11>`__: Note for Docker image size in Docker instructions (`#5630 <https://github.com/rtfd/readthedocs.org/pull/5630>`__)
43+
* `@davidfischer <http://github.com/davidfischer>`__: UX improvements around SSL certificates (`#5629 <https://github.com/rtfd/readthedocs.org/pull/5629>`__)
44+
* `@davidfischer <http://github.com/davidfischer>`__: Gold project sponsorship changes (`#5628 <https://github.com/rtfd/readthedocs.org/pull/5628>`__)
45+
* `@davidfischer <http://github.com/davidfischer>`__: Make sure there's a contact when opting out of advertising (`#5626 <https://github.com/rtfd/readthedocs.org/pull/5626>`__)
46+
* `@stsewd <http://github.com/stsewd>`__: Remove unused volume from docker (`#5625 <https://github.com/rtfd/readthedocs.org/pull/5625>`__)
47+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: hotfix: correct way of getting environment variables (`#5622 <https://github.com/rtfd/readthedocs.org/pull/5622>`__)
48+
* `@pyup-bot <http://github.com/pyup-bot>`__: pyup: Scheduled weekly dependency update for week 16 (`#5619 <https://github.com/rtfd/readthedocs.org/pull/5619>`__)
49+
* `@ericholscher <http://github.com/ericholscher>`__: Release 3.4.2 (`#5613 <https://github.com/rtfd/readthedocs.org/pull/5613>`__)
50+
* `@ericholscher <http://github.com/ericholscher>`__: Add explicit egg versoin to unicode-slugify (`#5612 <https://github.com/rtfd/readthedocs.org/pull/5612>`__)
51+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Remove ProxyMiddleware (`#5607 <https://github.com/rtfd/readthedocs.org/pull/5607>`__)
52+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Remove 'Versions' tab from Admin Dashboard. (`#5600 <https://github.com/rtfd/readthedocs.org/pull/5600>`__)
53+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Notify the user when deleting a superproject (`#5596 <https://github.com/rtfd/readthedocs.org/pull/5596>`__)
54+
* `@saadmk11 <http://github.com/saadmk11>`__: Handle 401, 403 and 404 when setting up webhooks (`#5589 <https://github.com/rtfd/readthedocs.org/pull/5589>`__)
55+
* `@saadmk11 <http://github.com/saadmk11>`__: Unify usage of settings and remove the usage of getattr for settings (`#5588 <https://github.com/rtfd/readthedocs.org/pull/5588>`__)
56+
* `@saadmk11 <http://github.com/saadmk11>`__: Note about admin page in the docs (`#5585 <https://github.com/rtfd/readthedocs.org/pull/5585>`__)
57+
* `@humitos <http://github.com/humitos>`__: Remove USE_SETUPTOOLS_LATEST feature flag (`#5578 <https://github.com/rtfd/readthedocs.org/pull/5578>`__)
58+
* `@saadmk11 <http://github.com/saadmk11>`__: Validate docs dir before writing custom js (`#5569 <https://github.com/rtfd/readthedocs.org/pull/5569>`__)
59+
* `@rshrc <http://github.com/rshrc>`__: Added note in YAML docs (`#5565 <https://github.com/rtfd/readthedocs.org/pull/5565>`__)
60+
* `@shivanshu1234 <http://github.com/shivanshu1234>`__: Specify python3 in installation instructions. (`#5552 <https://github.com/rtfd/readthedocs.org/pull/5552>`__)
61+
* `@davidfischer <http://github.com/davidfischer>`__: Write build artifacts to (cloud) storage from build servers (`#5549 <https://github.com/rtfd/readthedocs.org/pull/5549>`__)
62+
* `@saadmk11 <http://github.com/saadmk11>`__: "Default branch: latest" does not exist Fix. (`#5547 <https://github.com/rtfd/readthedocs.org/pull/5547>`__)
63+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Update ``readthedocs-environment.json`` file when env vars are added/deleted (`#5540 <https://github.com/rtfd/readthedocs.org/pull/5540>`__)
64+
* `@humitos <http://github.com/humitos>`__: Update common to its latest version (`#5517 <https://github.com/rtfd/readthedocs.org/pull/5517>`__)
65+
* `@saadmk11 <http://github.com/saadmk11>`__: Profile page performance issue Fix (`#5472 <https://github.com/rtfd/readthedocs.org/pull/5472>`__)
66+
* `@stsewd <http://github.com/stsewd>`__: Remove unused form (`#5443 <https://github.com/rtfd/readthedocs.org/pull/5443>`__)
67+
* `@stsewd <http://github.com/stsewd>`__: Use relative paths in config module (`#5377 <https://github.com/rtfd/readthedocs.org/pull/5377>`__)
68+
* `@humitos <http://github.com/humitos>`__: Initial structure for APIv3 (`#5356 <https://github.com/rtfd/readthedocs.org/pull/5356>`__)
69+
* `@stsewd <http://github.com/stsewd>`__: Add models for automation rules (`#5323 <https://github.com/rtfd/readthedocs.org/pull/5323>`__)
70+
* `@stsewd <http://github.com/stsewd>`__: Downgrade pytest-django (`#5294 <https://github.com/rtfd/readthedocs.org/pull/5294>`__)
71+
* `@ericholscher <http://github.com/ericholscher>`__: Add search for DomainData objects (`#5290 <https://github.com/rtfd/readthedocs.org/pull/5290>`__)
72+
* `@gorshunovr <http://github.com/gorshunovr>`__: Change version references to :latest tag (`#5245 <https://github.com/rtfd/readthedocs.org/pull/5245>`__)
73+
* `@dojutsu-user <http://github.com/dojutsu-user>`__: Fix buttons problems in 'Change Email' section. (`#5219 <https://github.com/rtfd/readthedocs.org/pull/5219>`__)
74+
175
Version 3.4.2
276
-------------
377

docs/canonical.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ you should see a bit of HTML like this:
3636

3737
.. code-block:: html
3838

39-
<link rel="canonical" href="http://pip.readthedocs.io/en/latest/installing.html">
39+
<link rel="canonical" href="http://docs.fabfile.org/en/2.4/" />
4040

4141
Links
4242
-----

docs/commercial/index.rst

+22-6
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,35 @@
11
Read the Docs Commercial Features
22
---------------------------------
33

4-
.. note:: These features are for our new commercial offering, `readthedocs.com`_.
4+
Read the Docs has a community solution for open source projects on `readthedocs.org`_
5+
and we offer commercial documentation building and hosting on `readthedocs.com`_.
6+
Features in this section are specific to our commercial offering.
57

8+
Private repositories and private documentation
9+
The largest difference between the community solution and our commercial offering
10+
is the ability to connect to private repositories,
11+
to restrict documentation access to certain users,
12+
or to share private documentation via private hyperlinks.
613

7-
All of the other features outlined in these docs work on both sites.
8-
Things inside this section are specific to our commercial offering.
14+
Additional build resources
15+
Do you have a complicated build process that uses large amounts
16+
of CPU, memory, disk, or networking resources?
17+
Our commercial offering has much higher default resources
18+
that result in faster documentation build times
19+
and we can increase it further for very demanding projects.
920

10-
The largest feature that is different is that documentation on `readthedocs.com`_ is **private**.
11-
If you have private code that you want documentation for,
12-
this is our solution.
21+
Priority support
22+
We have a dedicated support team that responds to support requests during business hours.
23+
If you need a quick turnaround, please signup for readthedocs.com.
1324

25+
Advertising-free
26+
All commercially hosted documentation is always ad-free.
27+
28+
.. _readthedocs.org: https://readthedocs.org
1429
.. _readthedocs.com: https://readthedocs.com
1530

1631
.. toctree::
32+
:caption: Additional commercial features
1733

1834
custom_domains
1935
organizations

docs/guides/feature-flags.rst

+2-10
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,14 @@ or disable one or more of these featured flags for a particular project.
1212
Available Flags
1313
---------------
1414

15-
``USE_PDF_LATEXMK``: :featureflags:`USE_PDF_LATEXMK`
16-
17-
``USE_SPHINX_LATEST``: :featureflags:`USE_SPHINX_LATEST`
18-
19-
``ALLOW_DEPRECATED_WEBHOOKS``: :featureflags:`ALLOW_DEPRECATED_WEBHOOKS`
20-
2115
``PIP_ALWAYS_UPGRADE``: :featureflags:`PIP_ALWAYS_UPGRADE`
2216

23-
``SKIP_SUBMODULES``: :featureflags:`SKIP_SUBMODULES`
24-
2517
``DONT_OVERWRITE_SPHINX_CONTEXT``: :featureflags:`DONT_OVERWRITE_SPHINX_CONTEXT`
2618

27-
``MKDOCS_THEME_RTD``: :featureflags:`MKDOCS_THEME_RTD`
28-
2919
``DONT_SHALLOW_CLONE``: :featureflags:`DONT_SHALLOW_CLONE`
3020

3121
The ``DONT_SHALLOW_CLONE`` flag is useful if your code accesses old commits during docs build,
3222
e.g. python-reno release notes manager is known to do that
3323
(error message line would probably include one of old Git commit id's).
24+
25+
``USE_TESTING_BUILD_IMAGE``: :featureflags:`USE_TESTING_BUILD_IMAGE`

docs/guides/pdf-non-ascii-languages.rst

-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
Build PDF format for non-ASCII languages
22
========================================
33

4-
5-
.. warning::
6-
7-
To be able to follow this guide and build PDF with this method,
8-
you need to ask the Read the Docs core team to enable ``USE_PDF_LATEXMK`` :doc:`feature flag </guides/feature-flags>` in your project.
9-
Please, `open an issue`_ in our repository asking for this, and wait for one of the core team to enable it.
10-
114
.. _open an issue: https://github.com/rtfd/readthedocs.org/issues/new
125

136
Sphinx offers different `LaTeX engines`_ that support Unicode characters and non-ASCII languages,

docs/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ to help you create fantastic documentation for your project.
122122
architecture
123123
tests
124124
docs
125+
design/index
125126
development/standards
126127
development/buildenvironments
127128
symlinks

docs/install.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Clone the repository somewhere on your disk and enter to the repository::
9797

9898
Create a virtual environment and activate it::
9999

100-
virtualenv venv
100+
virtualenv --python=python3 venv
101101
source venv/bin/activate
102102

103103
Next, install the dependencies using ``pip``

docs/intro/import-guide.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ Importing Your Documentation
55
:description lang=en: Import your existing technical documentation from version control into Read the Docs.
66

77

8-
To import a documentation repository, visit your `Read the Docs dashboard`_ and click Import_.
8+
To import a public documentation repository, visit your `Read the Docs dashboard`_ and click Import_. For private
9+
repositories, use the Read the Docs :doc:`commercial solution <../commercial/index>`.
10+
911

1012
If you have :doc:`connected your Read the Docs account <../connected-accounts>` to GitHub, Bitbucket, or GitLab,
1113
you will see a list of your repositories that we are able to import.

docs/support.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ This includes:
5050
Commercial Support
5151
------------------
5252

53-
We offer commercial support for Read the Docs, commercial hosting,
53+
We offer commercial support for Read the Docs, :doc:`commercial hosting </commercial/index>`,
5454
as well as consulting around all documentation systems.
5555
You can contact us at [email protected] to learn more,
5656
or read more at https://readthedocs.com/services/#open-source-support.

docs/team.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Members
3737
* `Manuel Kaufmann <https://github.com/humitos>`__ (Central Time)
3838
* Your Name Here
3939

40-
Feel free to ask any of us if you have questions or want to join!
40+
**Please don't email us personally for support on Read the Docs.** You can email [email protected] for any issues you may have.
4141

4242
Joining
4343
~~~~~~~

media/css/readthedocs-doc-embed.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ div.ethical-footer {
250250

251251
/* Dark theme */
252252
.ethical-dark-theme .ethical-sidebar {
253-
background-color: rgba(255, 255, 255, 0.1);
253+
background-color: #4e4b4b;
254254
border: 1px solid #a0a0a0;
255255
color: #c2c2c2 !important;
256256
}

readthedocs/api/__init__.py

Whitespace-only changes.

readthedocs/api/v2/utils.py

+18
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Utility functions that are used by both views and celery tasks."""
22

3+
import itertools
34
import logging
45

56
from rest_framework.pagination import PageNumberPagination
@@ -158,6 +159,23 @@ def delete_versions(project, version_data):
158159
return set()
159160

160161

162+
def run_automation_rules(project, versions_slug):
163+
"""
164+
Runs the automation rules on each version.
165+
166+
The rules are sorted by priority.
167+
168+
.. note::
169+
170+
Currently the versions aren't sorted in any way,
171+
the same order is keeped.
172+
"""
173+
versions = project.versions.filter(slug__in=versions_slug)
174+
rules = project.automation_rules.all()
175+
for version, rule in itertools.product(versions, rules):
176+
rule.run(version)
177+
178+
161179
class RemoteOrganizationPagination(PageNumberPagination):
162180
page_size = 25
163181

readthedocs/api/v2/views/model_views.py

+14
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,20 @@ def sync_versions(self, request, **kwargs): # noqa: D205
213213
status=status.HTTP_400_BAD_REQUEST,
214214
)
215215

216+
try:
217+
# The order of added_versions isn't deterministic.
218+
# We don't track the commit time or any other metadata.
219+
# We usually have one version added per webhook.
220+
api_utils.run_automation_rules(project, added_versions)
221+
except Exception:
222+
# Don't interrupt the request if something goes wrong
223+
# in the automation rules.
224+
log.exception(
225+
'Failed to execute automation rules for [%s]: %s',
226+
project.slug, added_versions
227+
)
228+
229+
# TODO: move this to an automation rule
216230
promoted_version = project.update_stable_version()
217231
new_stable = project.get_stable_version()
218232
if promoted_version and new_stable and new_stable.active:

readthedocs/api/v3/tests/test_projects.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from django.core.cache import cache
88
from django.test import TestCase
99
from django.urls import reverse
10+
from django.utils.timezone import make_aware
1011
from rest_framework.authtoken.models import Token
1112
from rest_framework.test import APIClient
1213

@@ -19,8 +20,8 @@ class APIEndpointTests(TestCase):
1920
fixtures = []
2021

2122
def setUp(self):
22-
created = datetime.datetime(2019, 4, 29, 10, 0, 0)
23-
modified = datetime.datetime(2019, 4, 29, 12, 0, 0)
23+
created = make_aware(datetime.datetime(2019, 4, 29, 10, 0, 0))
24+
modified = make_aware(datetime.datetime(2019, 4, 29, 12, 0, 0))
2425

2526
self.me = fixture.get(
2627
User,

0 commit comments

Comments
 (0)