Skip to content

Commit ca900d0

Browse files
committed
Merge remote-tracking branch 'origin/master' into fix-domain-editing
2 parents 1c1798c + b7434c0 commit ca900d0

Some content is hidden

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

82 files changed

+822
-542
lines changed

CHANGELOG.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
Version 2.1.2
2+
-------------
3+
4+
* `@agjohnson <http://github.com/agjohnson>`_: Update changelog more consistently (`#3405 <https://github.com/rtfd/readthedocs.org/pull/3405>`_)
5+
* `@agjohnson <http://github.com/agjohnson>`_: Update prerelease invoke command to call with explicit path (`#3404 <https://github.com/rtfd/readthedocs.org/pull/3404>`_)
6+
* `@agjohnson <http://github.com/agjohnson>`_: Fix lint error (`#3402 <https://github.com/rtfd/readthedocs.org/pull/3402>`_)
7+
* `@stsewd <http://github.com/stsewd>`_: Remove copyright application (`#3400 <https://github.com/rtfd/readthedocs.org/pull/3400>`_)
8+
* `@humitos <http://github.com/humitos>`_: Show connect buttons for installed apps only (`#3394 <https://github.com/rtfd/readthedocs.org/pull/3394>`_)
9+
* `@agjohnson <http://github.com/agjohnson>`_: Don't display the build suggestions div if there are no suggestions (`#3389 <https://github.com/rtfd/readthedocs.org/pull/3389>`_)
10+
* `@jonrkarr <http://github.com/jonrkarr>`_: Error in YAML configuration docs: default value for `python.setup_py_install` should be `true` (`#3334 <https://github.com/rtfd/readthedocs.org/issues/3334>`_)
11+
* `@humitos <http://github.com/humitos>`_: Simple task to finish inactive builds (`#3312 <https://github.com/rtfd/readthedocs.org/pull/3312>`_)
12+
* `@agjohnson <http://github.com/agjohnson>`_: Cleanup misreported failed builds (`#3230 <https://github.com/rtfd/readthedocs.org/issues/3230>`_)
13+
* `@agjohnson <http://github.com/agjohnson>`_: Remove copyright application (`#3199 <https://github.com/rtfd/readthedocs.org/issues/3199>`_)
14+
15+
Version 2.1.1
16+
-------------
17+
18+
Release information missing
19+
120
Version 2.1.0
221
-------------
322

docs/abandoned-projects.rst

Lines changed: 30 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,100 +3,91 @@ Policy for Abandoned Projects
33

44
This policy describes the process by which a Read the Docs project name may be changed.
55

6-
76
Rationale
87
---------
98

109
Conflict between the current use of the name and a different suggested use of
1110
the same name occasionally arise. This document aims to provide general
1211
guidelines for solving the most typical cases of such conflicts.
1312

14-
1513
Specification
1614
-------------
1715

1816
The main idea behind this policy is that Read the Docs serves the community. Every
1917
user is invited to upload content under the Terms of Use, understanding that it
2018
is at the sole risk of the user.
2119

22-
While Read the Docs is not a backup service, the maintainers do their best to keep that
23-
content accessible indefinitely in its published form. However, in certain
20+
While Read the Docs is not a backup service, the core team of Read the Docs does their best to keep that
21+
content accessible indefinitely in its published form. However, in certain
2422
edge cases the greater community's needs might outweigh the individual's
2523
expectation of ownership of a project name.
2624

2725
The use cases covered by this policy are:
2826

29-
* Abandoned projects:
30-
31-
* renaming a project so that the original project name can be used by a
32-
different project.
33-
34-
* Active projects:
35-
36-
* resolving disputes over a name.
27+
Abandoned projects
28+
Renaming a project so that the original project name can be used by a
29+
different project
3730

31+
Active projects
32+
Resolving disputes over a name
3833

3934
Implementation
4035
--------------
4136

4237
Reachability
4338
~~~~~~~~~~~~
4439

45-
The user of Read the Docs is solely responsible for being reachable by the maintainers
46-
for matters concerning projects that the user owns. In every case where
47-
contacting the user is necessary, the maintainers will try to do so at least
40+
The user of Read the Docs is solely responsible for being reachable by the core team
41+
for matters concerning projects that the user owns. In every case where
42+
contacting the user is necessary, the core team will try to do so at least
4843
three times, using the following means of contact:
4944

50-
* e-mail address on file in the user's profile;
51-
* e-mail addresses found in the given project's documentation; and
52-
* e-mail address on the project's home page.
45+
* E-mail address on file in the user's profile
46+
* E-mail addresses found in the given project's documentation
47+
* E-mail address on the project's home page
5348

54-
The maintainers will stop trying to reach the user after six weeks and the user
49+
The core team will stop trying to reach the user after six weeks and the user
5550
will be considered *unreachable*.
5651

57-
5852
Abandoned projects
5953
~~~~~~~~~~~~~~~~~~
6054

6155
A project is considered *abandoned* when ALL of the following are met:
6256

63-
* owner is unreachable (see Reachability above);
64-
* The project has no proper documentation being served (no successful builds); or
65-
* no releases within the past twelve months; and
66-
* no activity from the owner on the project's home page (or no home page
57+
* Owner is unreachable (see `Reachability`_)
58+
* The project has no proper documentation being served (no successful builds) or
59+
does not have any releases within the past twelve months
60+
* No activity from the owner on the project's home page (or no home page
6761
found).
6862

6963
All other projects are considered *active*.
7064

71-
7265
Renaming of an abandoned project
7366
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7467

7568
Projects are never renamed solely on the basis of abandonment.
7669

77-
An *abandoned* project can be renamed (by appending "-abandoned" and a
70+
An *abandoned* project can be renamed (by appending ``-abandoned`` and a
7871
uniquifying integer if needed) for purposes of reusing the name when ALL of the
7972
following are met:
8073

81-
* the project has been determined *abandoned* by the rules described above;
82-
* the candidate is able to demonstrate their own failed attempts to contact the
83-
existing owner;
84-
* the candidate is able to demonstrate that the project suggested to reuse the
85-
name already exists and meets notability requirements;
86-
* the candidate is able to demonstrate why a fork under a different name is not
87-
an acceptable workaround;
88-
* the project has fewer than 100 monthly pageviews; and
89-
* the maintainers do not have any additional reservations.
90-
74+
* The project has been determined *abandoned* by the rules described above
75+
* The candidate is able to demonstrate their own failed attempts to contact the
76+
existing owner
77+
* The candidate is able to demonstrate that the project suggested to reuse the
78+
name already exists and meets notability requirements
79+
* The candidate is able to demonstrate why a fork under a different name is not
80+
an acceptable workaround
81+
* The project has fewer than 100 monthly pageviews
82+
* The core team does not have any additional reservations.
9183

9284
Name conflict resolution for active projects
9385
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9486

95-
The maintainers of Read the Docs are not arbiters in disputes around *active* projects.
96-
The maintainers recommend users to get in touch with each other and solve the
87+
The core team of Read the Docs are not arbiters in disputes around *active* projects.
88+
The core team recommends users to get in touch with each other and solve the
9789
issue by respectful communication.
9890

99-
10091
Prior art
10192
---------
10293

docs/talks.rst

Lines changed: 0 additions & 10 deletions
This file was deleted.

media/css/core.css

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -690,19 +690,16 @@ div.project-import-remote button.remote-sync:before {
690690
content: "\f021";
691691
}
692692

693-
div.project-import-remote form.import-connect-github button:before,
694693
a.socialaccount-provider.github:before {
695694
font-family: FontAwesome;
696695
content: "\f09b";
697696
}
698697

699-
div.project-import-remote form.import-connect-gitlab button:before,
700698
a.socialaccount-provider.gitlab:before {
701699
font-family: FontAwesome;
702-
content: "\f1d3";
700+
content: "\f296";
703701
}
704702

705-
div.project-import-remote form.import-connect-bitbucket button:before,
706703
a.socialaccount-provider.bitbucket:before,
707704
a.socialaccount-provider.bitbucket_oauth2:before {
708705
font-family: FontAwesome;

prospector.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ pep257:
3535
- D105
3636
- D211
3737
- D104
38+
- D212 # Multi-line docstring summary should start at the first line
39+
- D107 # Missing docstring in __init__
40+
- D106 # Missing docstring in public nested class
41+
42+
# pydocstyle
43+
- D406 # Section name should end with a newline ('Examples', not 'Examples::')
44+
- D407 # Missing dashed underline after section ('Examples')
45+
- D412 # No blank lines allowed between a section header and its content ('Examples')
46+
- D413 # Missing blank line after last section ('Examples')
3847

3948
pyflakes:
4049
disable:

readthedocs/builds/managers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616

1717
class VersionManagerBase(models.Manager):
1818

19-
"""Version manager for manager only queries
19+
"""
20+
Version manager for manager only queries.
2021
2122
For queries not suitable for the :py:cls:`VersionQuerySet`, such as create
2223
queries.

readthedocs/builds/syncers.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
"""Classes to copy files between build and web servers
1+
"""
2+
Classes to copy files between build and web servers.
23
3-
"Syncers" copy files from the local machine, while "Pullers" copy files to
4-
the local machine.
4+
"Syncers" copy files from the local machine, while "Pullers" copy files to the
5+
local machine.
56
"""
67

78
from __future__ import absolute_import

readthedocs/builds/version_slug.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
"""Contains logic for handling version slugs.
1+
"""
2+
Contains logic for handling version slugs.
23
34
Handling slugs for versions is not too straightforward. We need to allow some
45
characters which are uncommon in usual slugs. They are dots and underscores.
@@ -32,8 +33,8 @@ def get_fields_with_model(cls):
3233
"""
3334
Replace deprecated function of the same name in Model._meta.
3435
35-
This replaces deprecated function (as of Django 1.10) in
36-
Model._meta as prescrived in the Django docs.
36+
This replaces deprecated function (as of Django 1.10) in Model._meta as
37+
prescrived in the Django docs.
3738
https://docs.djangoproject.com/en/1.11/ref/models/meta/#migrating-from-the-old-api
3839
"""
3940
return [

readthedocs/core/admin.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Django admin interface for core models"""
1+
"""Django admin interface for core models."""
22

33
from __future__ import absolute_import
44
from datetime import datetime, timedelta
@@ -22,7 +22,7 @@ class UserProjectInline(admin.TabularInline):
2222

2323
class UserProjectFilter(admin.SimpleListFilter):
2424

25-
"""Filter users based on project properties"""
25+
"""Filter users based on project properties."""
2626

2727
parameter_name = 'project_state'
2828
title = _('user projects')
@@ -39,7 +39,8 @@ def lookups(self, request, model_admin):
3939
)
4040

4141
def queryset(self, request, queryset):
42-
"""Add filters to queryset filter
42+
"""
43+
Add filters to queryset filter.
4344
4445
``PROJECT_ACTIVE`` and ``PROJECT_BUILT`` look for versions on projects,
4546
``PROJECT_RECENT`` looks for projects with builds in the last year

readthedocs/core/middleware.py

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@
3131

3232
class SubdomainMiddleware(object):
3333

34-
"""Middleware to display docs for non-dashboard domains"""
34+
"""Middleware to display docs for non-dashboard domains."""
3535

3636
def process_request(self, request):
37-
"""Process requests for unhandled domains
37+
"""
38+
Process requests for unhandled domains.
3839
3940
If the request is not for our ``PUBLIC_DOMAIN``, or if ``PUBLIC_DOMAIN``
4041
is not set and the request is for a subdomain on ``PRODUCTION_DOMAIN``,
@@ -132,22 +133,22 @@ def process_request(self, request):
132133

133134
class SingleVersionMiddleware(object):
134135

135-
"""Reset urlconf for requests for 'single_version' docs.
136-
137-
In settings.MIDDLEWARE_CLASSES, SingleVersionMiddleware must follow
138-
after SubdomainMiddleware.
136+
"""
137+
Reset urlconf for requests for 'single_version' docs.
139138
139+
In settings.MIDDLEWARE_CLASSES, SingleVersionMiddleware must follow after
140+
SubdomainMiddleware.
140141
"""
141142

142143
def _get_slug(self, request):
143-
"""Get slug from URLs requesting docs.
144+
"""
145+
Get slug from URLs requesting docs.
144146
145147
If URL is like '/docs/<project_name>/', we split path
146148
and pull out slug.
147149
148150
If URL is subdomain or CNAME, we simply read request.slug, which is
149151
set by SubdomainMiddleware.
150-
151152
"""
152153
slug = None
153154
if hasattr(request, 'slug'):
@@ -187,16 +188,16 @@ def process_request(self, request):
187188
class ProxyMiddleware(object):
188189

189190
"""
190-
Middleware that sets REMOTE_ADDR based on HTTP_X_FORWARDED_FOR, if the
191+
Middleware that sets REMOTE_ADDR based on HTTP_X_FORWARDED_FOR, if the.
191192
192193
latter is set. This is useful if you're sitting behind a reverse proxy that
193-
causes each request's REMOTE_ADDR to be set to 127.0.0.1.
194-
Note that this does NOT validate HTTP_X_FORWARDED_FOR. If you're not behind
195-
a reverse proxy that sets HTTP_X_FORWARDED_FOR automatically, do not use
196-
this middleware. Anybody can spoof the value of HTTP_X_FORWARDED_FOR, and
197-
because this sets REMOTE_ADDR based on HTTP_X_FORWARDED_FOR, that means
198-
anybody can "fake" their IP address. Only use this when you can absolutely
199-
trust the value of HTTP_X_FORWARDED_FOR.
194+
causes each request's REMOTE_ADDR to be set to 127.0.0.1. Note that this
195+
does NOT validate HTTP_X_FORWARDED_FOR. If you're not behind a reverse proxy
196+
that sets HTTP_X_FORWARDED_FOR automatically, do not use this middleware.
197+
Anybody can spoof the value of HTTP_X_FORWARDED_FOR, and because this sets
198+
REMOTE_ADDR based on HTTP_X_FORWARDED_FOR, that means anybody can "fake"
199+
their IP address. Only use this when you can absolutely trust the value of
200+
HTTP_X_FORWARDED_FOR.
200201
"""
201202

202203
def process_request(self, request):

readthedocs/core/resolver.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""URL resolver for documentation"""
1+
"""URL resolver for documentation."""
22

33
from __future__ import absolute_import
44
from builtins import object
@@ -54,7 +54,7 @@ class ResolverBase(object):
5454
def base_resolve_path(self, project_slug, filename, version_slug=None,
5555
language=None, private=False, single_version=None,
5656
subproject_slug=None, subdomain=None, cname=None):
57-
"""Resolve a with nothing smart, just filling in the blanks"""
57+
"""Resolve a with nothing smart, just filling in the blanks."""
5858
# Only support `/docs/project' URLs outside our normal environment. Normally
5959
# the path should always have a subdomain or CNAME domain
6060
# pylint: disable=unused-argument
@@ -80,7 +80,7 @@ def base_resolve_path(self, project_slug, filename, version_slug=None,
8080
def resolve_path(self, project, filename='', version_slug=None,
8181
language=None, single_version=None, subdomain=None,
8282
cname=None, private=None):
83-
"""Resolve a URL with a subset of fields defined"""
83+
"""Resolve a URL with a subset of fields defined."""
8484
relation = project.superprojects.first()
8585
cname = cname or project.domains.filter(canonical=True).first()
8686
main_language_project = project.main_language_project
@@ -145,7 +145,8 @@ def resolve(self, project, protocol='http', filename='', private=None,
145145
)
146146

147147
def _get_canonical_project(self, project):
148-
"""Get canonical project in the case of subproject or translations
148+
"""
149+
Get canonical project in the case of subproject or translations.
149150
150151
:type project: Project
151152
:rtype: Project
@@ -159,7 +160,7 @@ def _get_canonical_project(self, project):
159160
return project
160161

161162
def _get_project_subdomain(self, project):
162-
"""Determine canonical project domain as subdomain"""
163+
"""Determine canonical project domain as subdomain."""
163164
public_domain = getattr(settings, 'PUBLIC_DOMAIN', None)
164165
if self._use_subdomain():
165166
project = self._get_canonical_project(project)
@@ -177,9 +178,10 @@ def _get_private(self, project, version_slug):
177178

178179
def _fix_filename(self, project, filename):
179180
"""
180-
Force filenames that might be HTML file paths into proper URL's
181+
Force filenames that might be HTML file paths into proper URL's.
181182
182-
This basically means stripping / and .html endings and then re-adding them properly.
183+
This basically means stripping / and .html endings and then re-adding
184+
them properly.
183185
"""
184186
# Bail out on non-html files
185187
if '.' in filename and '.html' not in filename:
@@ -203,7 +205,7 @@ def _fix_filename(self, project, filename):
203205
return path
204206

205207
def _use_subdomain(self):
206-
"""Make decision about whether to use a subdomain to serve docs"""
208+
"""Make decision about whether to use a subdomain to serve docs."""
207209
use_subdomain = getattr(settings, 'USE_SUBDOMAIN', False)
208210
public_domain = getattr(settings, 'PUBLIC_DOMAIN', None)
209211
return use_subdomain and public_domain is not None

0 commit comments

Comments
 (0)