Skip to content

Commit d0ee0f7

Browse files
committed
Merge remote-tracking branch 'origin/master' into add-docker-image-option
2 parents edfca36 + 8da5327 commit d0ee0f7

Some content is hidden

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

71 files changed

+3052
-1209
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[flake8]
2-
ignore = E125,D100,D101,D102,D105,D107,D200,D211,P101,FI15,FI16,FI12,FI11,FI17,FI50,FI53,FI54,T000,MQ101
2+
ignore = E125,D100,D101,D102,D103,D105,D106,D107,D200,D202,D211,P101,FI15,FI16,FI12,FI11,FI17,FI50,FI53,FI54,MQ101,T000
33
max-line-length = 80

.pre-commit-config.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ repos:
2626
'flake8-string-format',
2727
'flake8-tidy-imports',
2828
'flake8-todo']
29+
exclude: 'test_oauth.py'
2930
- id: trailing-whitespace
3031

3132
- repo: [email protected]:pre-commit/mirrors-yapf.git
@@ -34,6 +35,7 @@ repos:
3435
- id: yapf
3536
exclude: 'migrations|settings|scripts'
3637
additional_dependencies: ['futures']
38+
args: ['--style=.style.yapf', '--parallel']
3739

3840
- repo: [email protected]:FalconSocial/pre-commit-python-sorter.git
3941
sha: b57843b0b874df1d16eb0bef00b868792cb245c2
@@ -52,3 +54,11 @@ repos:
5254
hooks:
5355
- id: autoflake
5456
args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable']
57+
58+
- repo: git://github.com/guykisel/prospector-mirror
59+
sha: 'b27f281eb9398fc8504415d7fbdabf119ea8c5e1'
60+
hooks:
61+
- id: prospector
62+
# https://github.com/pre-commit/pre-commit/issues/178
63+
language: system
64+
args: ['--profile=prospector']

.style.yapf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ALLOW_MULTILINE_DICTIONARY_KEYS=False
2626
# # <------ this blank line
2727
# def method():
2828
# ...
29-
BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF=True
29+
BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF=False
3030

3131
# Insert a blank line before a class-level docstring.
3232
BLANK_LINE_BEFORE_CLASS_DOCSTRING=True
@@ -145,7 +145,7 @@ SPLIT_BEFORE_EXPRESSION_AFTER_OPENING_PAREN=True
145145

146146
# If an argument / parameter list is going to be split, then split
147147
# before the first argument.
148-
SPLIT_BEFORE_FIRST_ARGUMENT=False
148+
SPLIT_BEFORE_FIRST_ARGUMENT=True
149149

150150
# Set to True to prefer splitting before 'and' or 'or' rather than
151151
# after.

CHANGELOG.rst

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
Version 2.1.0
2+
-------------
3+
4+
* `@ericholscher <http://github.com/ericholscher>`_: Revert "Merge pull request #3336 from rtfd/use-active-for-stable" (`#3368 <https://github.com/rtfd/readthedocs.org/pull/3368>`_)
5+
* `@agjohnson <http://github.com/agjohnson>`_: Revert "Do not split before first argument (#3333)" (`#3366 <https://github.com/rtfd/readthedocs.org/pull/3366>`_)
6+
* `@ericholscher <http://github.com/ericholscher>`_: Remove pitch from ethical ads page, point folks to actual pitch page. (`#3365 <https://github.com/rtfd/readthedocs.org/pull/3365>`_)
7+
* `@agjohnson <http://github.com/agjohnson>`_: Add changelog and changelog automation (`#3364 <https://github.com/rtfd/readthedocs.org/pull/3364>`_)
8+
* `@ericholscher <http://github.com/ericholscher>`_: Fix mkdocs search. (`#3361 <https://github.com/rtfd/readthedocs.org/pull/3361>`_)
9+
* `@ericholscher <http://github.com/ericholscher>`_: Email sending: Allow kwargs for other options (`#3355 <https://github.com/rtfd/readthedocs.org/pull/3355>`_)
10+
* `@ericholscher <http://github.com/ericholscher>`_: Try and get folks to put more tags. (`#3350 <https://github.com/rtfd/readthedocs.org/pull/3350>`_)
11+
* `@ericholscher <http://github.com/ericholscher>`_: Suggest wiping your environment to folks with bad build outcomes. (`#3347 <https://github.com/rtfd/readthedocs.org/pull/3347>`_)
12+
* `@humitos <http://github.com/humitos>`_: GitLab Integration (`#3327 <https://github.com/rtfd/readthedocs.org/pull/3327>`_)
13+
* `@jimfulton <http://github.com/jimfulton>`_: Draft policy for claiming existing project names. (`#3314 <https://github.com/rtfd/readthedocs.org/pull/3314>`_)
14+
* `@agjohnson <http://github.com/agjohnson>`_: More logic changes to error reporting, cleanup (`#3310 <https://github.com/rtfd/readthedocs.org/pull/3310>`_)
15+
* `@safwanrahman <http://github.com/safwanrahman>`_: [Fix #3182] Better user deletion (`#3214 <https://github.com/rtfd/readthedocs.org/pull/3214>`_)
16+
* `@ericholscher <http://github.com/ericholscher>`_: Better User deletion (`#3182 <https://github.com/rtfd/readthedocs.org/issues/3182>`_)
17+
* `@RichardLitt <http://github.com/RichardLitt>`_: Add `Needed: replication` label (`#3138 <https://github.com/rtfd/readthedocs.org/pull/3138>`_)
18+
* `@josejrobles <http://github.com/josejrobles>`_: Replaced usage of deprecated function get_fields_with_model with new … (`#3052 <https://github.com/rtfd/readthedocs.org/pull/3052>`_)
19+
* `@ericholscher <http://github.com/ericholscher>`_: Don't delete the subprojects directory on sync of superproject (`#3042 <https://github.com/rtfd/readthedocs.org/pull/3042>`_)
20+
* `@andrew <http://github.com/andrew>`_: Pass query string when redirecting, fixes #2595 (`#3001 <https://github.com/rtfd/readthedocs.org/pull/3001>`_)
21+
* `@saily <http://github.com/saily>`_: Add GitLab repo sync and webhook support (`#1870 <https://github.com/rtfd/readthedocs.org/pull/1870>`_)
22+
* `@destroyerofbuilds <http://github.com/destroyerofbuilds>`_: Setup GitLab Web Hook on Project Import (`#1443 <https://github.com/rtfd/readthedocs.org/issues/1443>`_)
23+
* `@takotuesday <http://github.com/takotuesday>`_: Add GitLab Provider from django-allauth (`#1441 <https://github.com/rtfd/readthedocs.org/issues/1441>`_)
24+
25+
Version 2.0
26+
-----------
27+
28+
* `@ericholscher <http://github.com/ericholscher>`_: Email sending: Allow kwargs for other options (`#3355 <https://github.com/rtfd/readthedocs.org/pull/3355>`_)
29+
* `@ericholscher <http://github.com/ericholscher>`_: Try and get folks to put more tags. (`#3350 <https://github.com/rtfd/readthedocs.org/pull/3350>`_)
30+
* `@ericholscher <http://github.com/ericholscher>`_: Small changes to email sending to enable from email (`#3349 <https://github.com/rtfd/readthedocs.org/pull/3349>`_)
31+
* `@dplanella <http://github.com/dplanella>`_: Duplicate TOC entries (`#3345 <https://github.com/rtfd/readthedocs.org/issues/3345>`_)
32+
* `@ericholscher <http://github.com/ericholscher>`_: Small tweaks to ethical ads page (`#3344 <https://github.com/rtfd/readthedocs.org/pull/3344>`_)
33+
* `@agjohnson <http://github.com/agjohnson>`_: Fix python usage around oauth pagination (`#3342 <https://github.com/rtfd/readthedocs.org/pull/3342>`_)
34+
* `@tony <http://github.com/tony>`_: Fix isort link (`#3340 <https://github.com/rtfd/readthedocs.org/pull/3340>`_)
35+
* `@ericholscher <http://github.com/ericholscher>`_: Change stable version switching to respect `active` (`#3336 <https://github.com/rtfd/readthedocs.org/pull/3336>`_)
36+
* `@ericholscher <http://github.com/ericholscher>`_: Allow superusers to pass admin & member tests for projects (`#3335 <https://github.com/rtfd/readthedocs.org/pull/3335>`_)
37+
* `@humitos <http://github.com/humitos>`_: Do not split before first argument (`#3333 <https://github.com/rtfd/readthedocs.org/pull/3333>`_)
38+
* `@humitos <http://github.com/humitos>`_: Update docs for pre-commit (auto linting) (`#3332 <https://github.com/rtfd/readthedocs.org/pull/3332>`_)
39+
* `@humitos <http://github.com/humitos>`_: Take preferece of tags over branches when selecting the stable version (`#3331 <https://github.com/rtfd/readthedocs.org/pull/3331>`_)
40+
* `@humitos <http://github.com/humitos>`_: Add prospector as a pre-commit hook (`#3328 <https://github.com/rtfd/readthedocs.org/pull/3328>`_)
41+
* `@andrewgodwin <http://github.com/andrewgodwin>`_: "stable" appearing to track future release branches (`#3268 <https://github.com/rtfd/readthedocs.org/issues/3268>`_)
42+
* `@humitos <http://github.com/humitos>`_: Config files for auto linting (`#3264 <https://github.com/rtfd/readthedocs.org/pull/3264>`_)
43+
* `@mekrip <http://github.com/mekrip>`_: Build is not working (`#3223 <https://github.com/rtfd/readthedocs.org/issues/3223>`_)
44+
* `@skddc <http://github.com/skddc>`_: Add JSDoc to docs build environment (`#3069 <https://github.com/rtfd/readthedocs.org/issues/3069>`_)
45+
* `@jakirkham <http://github.com/jakirkham>`_: Specifying conda version used (`#2076 <https://github.com/rtfd/readthedocs.org/issues/2076>`_)
46+
* `@agjohnson <http://github.com/agjohnson>`_: Document code style guidelines (`#1475 <https://github.com/rtfd/readthedocs.org/issues/1475>`_)

contrib/changelog.hbs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{{header}}
2+
{{toHeader header "-"}}
3+
4+
{{#issues}} * `@{{user.login}} <http://github.com/{{user.login}}>`_: {{title}} (`#{{number}} <{{html_url}}>`_)
5+
{{/issues}}

docs/abandoned-projects.rst

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
Policy for Abandoned Projects
2+
=============================
3+
4+
This policy describes the process by which a Read the Docs project name may be changed.
5+
6+
7+
Rationale
8+
---------
9+
10+
Conflict between the current use of the name and a different suggested use of
11+
the same name occasionally arise. This document aims to provide general
12+
guidelines for solving the most typical cases of such conflicts.
13+
14+
15+
Specification
16+
-------------
17+
18+
The main idea behind this policy is that Read the Docs serves the community. Every
19+
user is invited to upload content under the Terms of Use, understanding that it
20+
is at the sole risk of the user.
21+
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
24+
edge cases the greater community's needs might outweigh the individual's
25+
expectation of ownership of a project name.
26+
27+
The use cases covered by this policy are:
28+
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.
37+
38+
39+
Implementation
40+
--------------
41+
42+
Reachability
43+
~~~~~~~~~~~~
44+
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
48+
three times, using the following means of contact:
49+
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.
53+
54+
The maintainers will stop trying to reach the user after six weeks and the user
55+
will be considered *unreachable*.
56+
57+
58+
Abandoned projects
59+
~~~~~~~~~~~~~~~~~~
60+
61+
A project is considered *abandoned* when ALL of the following are met:
62+
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
67+
found).
68+
69+
All other projects are considered *active*.
70+
71+
72+
Renaming of an abandoned project
73+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
74+
75+
Projects are never renamed solely on the basis of abandonment.
76+
77+
An *abandoned* project can be renamed (by appending "-abandoned" and a
78+
uniquifying integer if needed) for purposes of reusing the name when ALL of the
79+
following are met:
80+
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+
91+
92+
Name conflict resolution for active projects
93+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94+
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
97+
issue by respectful communication.
98+
99+
100+
Prior art
101+
---------
102+
103+
The Python Package Index (PyPI) policy for claiming abandoned packages
104+
(`PEP-0541 <https://www.python.org/dev/peps/pep-0541>`_) heavily
105+
influenced this policy.
Lines changed: 30 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
1-
# Changelog
1+
Changelog
2+
=========
23

3-
This document will track major changes in the project.
4+
.. include:: ../CHANGELOG.rst
45

5-
Also note, this document is a Markdown file. This is mainly to keep parity with GitHub, and also because we can.
6+
Previous releases
7+
-----------------
68

7-
## July 23, 2015
9+
Starting with version ``2.0``, we will be incrementing the Read the Docs version
10+
based on semantic versioning principles, and will be automating the update of
11+
our changelog.
812

13+
Below are some historical changes from when we have tried to add information
14+
here in the past
915

10-
* Django 1.8 Support Merged
16+
July 23, 2015
17+
~~~~~~~~~~~~~
1118

12-
### Code Notes
19+
* Django 1.8 Support Merged
1320

21+
Code Notes
22+
``````````
1423

1524
- Updated Django from `1.6.11` to `1.8.3`.
1625
- Removed South and ported the South migrations to Django's migration framework.
@@ -25,36 +34,32 @@ Also note, this document is a Markdown file. This is mainly to keep parity with
2534
- Added `django.setup()` to `conf.py` to load django properly for doc builds.
2635
- Added migrations for all apps with models in the `readthedocs/` directory
2736

28-
### Deployment Notes
37+
Deployment Notes
38+
````````````````
2939

30-
After you have updated the code and installed the new dependencies, you need to run these commands on the server:
40+
After you have updated the code and installed the new dependencies, you need to run these commands on the server::
3141

32-
```bash
33-
python manage.py migrate contenttypes
34-
python manage.py migrate projects 0002 --fake
35-
python manage.py migrate --fake-initial
36-
```
42+
python manage.py migrate contenttypes
43+
python manage.py migrate projects 0002 --fake
44+
python manage.py migrate --fake-initial
3745

3846
Locally I had trouble in a test environment that pip did not update to the specified commit of tastypie. It might be required to use `pip install -U -r requirements/deploy.txt` during deployment.
3947

4048

41-
### Development Update Notes
49+
Development Update Notes
50+
````````````````````````
4251

4352
The readthedocs developers need to execute these commands when switching to this branch (or when this got merged into master):
4453

45-
- **Before updating** please make sure that all migrations are applied:
54+
- **Before updating** please make sure that all migrations are applied::
4655

47-
```bash
48-
python manage.py syncdb
49-
python manage.py migrate
50-
```
56+
python manage.py syncdb
57+
python manage.py migrate
5158

5259
- Update the codebase: `git pull`
5360
- You need to update the requirements with `pip install -r requirements.txt`
54-
- Now you need to fake the initial migrations:
61+
- Now you need to fake the initial migrations::
5562

56-
```bash
57-
python manage.py migrate contenttypes
58-
python manage.py migrate projects 0002 --fake
59-
python manage.py migrate --fake-initial
60-
```
63+
python manage.py migrate contenttypes
64+
python manage.py migrate projects 0002 --fake
65+
python manage.py migrate --fake-initial

docs/contribute.rst

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,26 +34,49 @@ label. Those tickets are meant to be standalone and can be worked on ad-hoc.
3434
When contributing code, then please follow the standard Contribution
3535
Guidelines set forth at `contribution-guide.org`_.
3636

37-
We have a strict code style that it's easy to follow since you just
38-
have to run a couple of commands and they will do everything for
39-
you. These commands are a mix between `autoflake`_, `autopep8`_,
40-
`docformatter`_, `isort`_, `unify`_ and `yapf`_::
41-
42-
$ autoflake --remove-all-unused-imports --remove-unused-variables --keep-useless-pass
43-
$ autopep8
44-
$ docformatter --wrap-summaries=80 --wrap-descriptions=80 --pre-summary-newline --no-blank
45-
$ isort
46-
$ unify --quote="'"
47-
$ yapf --exclude=*migrations* --exclude=*settings* --exclude=*scripts* --parallel
37+
We have a strict code style that is easy to follow since you just have to
38+
install `pre-commit`_ and it will automatically run different linting tools
39+
(`autoflake`_, `autopep8`_, `docformatter`_, `isort`_, `prospector`_, `unify`_
40+
and `yapf`_) to check your changes before you commit them. `pre-commit` will let
41+
you know if there were any problems that is wasn't able to fix automatically.
42+
43+
To run the `pre-commit` command and check your changes::
44+
45+
$ pip install -U pre-commit
46+
$ git add <your-modified-files>
47+
$ pre-commit run
48+
49+
or to run against a specific file::
50+
51+
$ pre-commit run --files <file.py>
52+
53+
`pre-commit` can also be run as a git pre-commit hook. You can set this up
54+
with::
55+
56+
$ pre-commit install
57+
58+
After this installation, the next time you run `git commit` the `pre-commit run`
59+
command will be run immediately and will inform you of the changes and errors.
60+
61+
.. note::
62+
63+
Our code base is still maturing and the core team doesn't yet recommend
64+
running this as a pre-commit hook due to the number of changes this will
65+
cause while constructing a pull request. Independent pull requests with
66+
linting changes would be a great help to making this possible.
67+
4868

4969
.. _Feature Overview: https://github.com/rtfd/readthedocs.org/issues?direction=desc&labels=Feature+Overview&page=1&sort=updated&state=open
5070
.. _Good First Issue: https://github.com/rtfd/readthedocs.org/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22
5171
.. _Sprintable: https://github.com/rtfd/readthedocs.org/issues?q=is%3Aopen+is%3Aissue+label%3ASprintable
5272
.. _contribution-guide.org: http://www.contribution-guide.org/#submitting-bugs
5373

74+
.. _pre-commit: https://github.com/pre-commit/pre-commit
5475
.. _autoflake: https://github.com/myint/autoflake
5576
.. _autopep8: https://github.com/hhatto/autopep8
5677
.. _docformatter: https://github.com/myint/docformatter
78+
.. _isort: https://github.com/timothycrosley/isort
79+
.. _prospector: https://prospector.landscape.io/en/master
5780
.. _unify: https://github.com/myint/unify
5881
.. _yapf: https://github.com/google/yapf
5982

0 commit comments

Comments
 (0)