Skip to content

Commit 298fce1

Browse files
committed
Merge branch 'master' into support-mkdocs-html-pages
2 parents d23995b + 4fded8c commit 298fce1

36 files changed

+444
-228
lines changed

CHANGELOG.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
Version 4.1.3
2+
-------------
3+
4+
:Date: April 07, 2020
5+
6+
* `@stsewd <https://github.com/stsewd>`__: Don't do unnecessary queries when listing subprojects (`#6869 <https://github.com/readthedocs/readthedocs.org/pull/6869>`__)
7+
* `@stsewd <https://github.com/stsewd>`__: Don't do extra query if the project is a translation (`#6865 <https://github.com/readthedocs/readthedocs.org/pull/6865>`__)
8+
* `@stsewd <https://github.com/stsewd>`__: Remove private argument from resolver (`#6864 <https://github.com/readthedocs/readthedocs.org/pull/6864>`__)
9+
* `@ericholscher <https://github.com/ericholscher>`__: Make development docs a bit easier to find (`#6861 <https://github.com/readthedocs/readthedocs.org/pull/6861>`__)
10+
* `@davidfischer <https://github.com/davidfischer>`__: Add an advertising API timeout (`#6856 <https://github.com/readthedocs/readthedocs.org/pull/6856>`__)
11+
* `@humitos <https://github.com/humitos>`__: Add more exceptions as WARNING log level (`#6851 <https://github.com/readthedocs/readthedocs.org/pull/6851>`__)
12+
* `@humitos <https://github.com/humitos>`__: Limit concurrent builds (`#6847 <https://github.com/readthedocs/readthedocs.org/pull/6847>`__)
13+
* `@humitos <https://github.com/humitos>`__: Release 4.1.2 (`#6840 <https://github.com/readthedocs/readthedocs.org/pull/6840>`__)
14+
* `@humitos <https://github.com/humitos>`__: Report build status in a smarter way (`#6839 <https://github.com/readthedocs/readthedocs.org/pull/6839>`__)
15+
* `@stsewd <https://github.com/stsewd>`__: Update messages-extends to latest version (`#6838 <https://github.com/readthedocs/readthedocs.org/pull/6838>`__)
16+
* `@humitos <https://github.com/humitos>`__: Do not save pip cache when using CACHED_ENVIRONMENT (`#6820 <https://github.com/readthedocs/readthedocs.org/pull/6820>`__)
17+
* `@stsewd <https://github.com/stsewd>`__: Force to reinstall package (`#6817 <https://github.com/readthedocs/readthedocs.org/pull/6817>`__)
18+
* `@ericholscher <https://github.com/ericholscher>`__: Denormalize from_url_without_rest onto the redirects model (`#6780 <https://github.com/readthedocs/readthedocs.org/pull/6780>`__)
19+
* `@davidfischer <https://github.com/davidfischer>`__: Developer docs emphasize the Docker setup (`#6682 <https://github.com/readthedocs/readthedocs.org/pull/6682>`__)
20+
* `@davidfischer <https://github.com/davidfischer>`__: Document setting up connected accounts in dev (`#6681 <https://github.com/readthedocs/readthedocs.org/pull/6681>`__)
21+
* `@humitos <https://github.com/humitos>`__: Return full path URL (including `.html`) on `/api/v2/docurl/` endpoint (`#6082 <https://github.com/readthedocs/readthedocs.org/pull/6082>`__)
22+
123
Version 4.1.2
224
-------------
325

Loading

docs/contribute.rst

Lines changed: 2 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Contributing to development
2525

2626
If you want to deep dive and help out with development on Read the Docs, then
2727
first get the project installed locally according to the
28-
:doc:`Installation Guide <development/install>`. After that is done we
28+
:doc:`Installation Guide </development/install>`. After that is done we
2929
suggest you have a look at tickets in our issue tracker that are labelled `Good
3030
First Issue`_. These are meant to be a great way to get a smooth start and
3131
won't put you in front of the most complex parts of the system.
@@ -40,46 +40,7 @@ They are simply things that are explained.
4040
If you still didn't find something to work on, search for the `Sprintable`_ label.
4141
Those tickets are meant to be standalone and can be worked on ad-hoc.
4242

43-
When contributing code, then please follow the standard Contribution
44-
Guidelines set forth at `contribution-guide.org`_.
45-
46-
We have a strict code style that is easy to follow since you just have to
47-
install `pre-commit`_ and it will automatically run different linting tools
48-
(`autoflake`_, `autopep8`_, `docformatter`_, `isort`_, `prospector`_, `unify`_
49-
and `yapf`_) to check your changes before you commit them. `pre-commit` will let
50-
you know if there were any problems that it wasn't able to fix automatically.
51-
52-
To run the `pre-commit` command and check your changes:
53-
54-
.. prompt:: bash $
55-
56-
pip install -U pre-commit
57-
git add <your-modified-files>
58-
pre-commit run
59-
60-
or to run against a specific file:
61-
62-
.. prompt:: bash $
63-
64-
pre-commit run --files <file.py>
65-
66-
`pre-commit` can also be run as a git pre-commit hook. You can set this up
67-
with:
68-
69-
.. prompt:: bash $
70-
71-
pre-commit install
72-
73-
After this installation, the next time you run `git commit` the `pre-commit run`
74-
command will be run immediately and will inform you of the changes and errors.
75-
76-
.. note::
77-
78-
Our code base is still maturing and the core team doesn't yet recommend
79-
running this as a pre-commit hook due to the number of changes this will
80-
cause while constructing a pull request. Independent pull requests with
81-
linting changes would be a great help to making this possible.
82-
43+
You can read all of our :doc:`/development/index` to understand more the development of Read the Docs. When contributing code, then please follow the standard Contribution Guidelines set forth at `contribution-guide.org`_.
8344

8445
.. _Feature: https://github.com/readthedocs/readthedocs.org/issues?direction=desc&labels=Feature&page=1&sort=updated&state=open
8546
.. _Improvement: https://github.com/readthedocs/readthedocs.org/issues?q=is%3Aopen+is%3Aissue+label%3AImprovement
@@ -88,14 +49,6 @@ command will be run immediately and will inform you of the changes and errors.
8849
.. _Sprintable: https://github.com/readthedocs/readthedocs.org/issues?q=is%3Aopen+is%3Aissue+label%3ASprintable
8950
.. _contribution-guide.org: http://www.contribution-guide.org/#submitting-bugs
9051

91-
.. _pre-commit: https://github.com/pre-commit/pre-commit
92-
.. _autoflake: https://github.com/myint/autoflake
93-
.. _autopep8: https://github.com/hhatto/autopep8
94-
.. _docformatter: https://github.com/myint/docformatter
95-
.. _isort: https://github.com/timothycrosley/isort
96-
.. _prospector: https://prospector.landscape.io/en/master
97-
.. _unify: https://github.com/myint/unify
98-
.. _yapf: https://github.com/google/yapf
9952

10053
Contributing to documentation
10154
-----------------------------
@@ -106,34 +59,6 @@ There are guidelines around writing and formatting documentation for the project
10659
For full details, including how to build it, see :doc:`/development/docs`.
10760

10861

109-
Developer documentation
110-
-----------------------
111-
112-
These are guides and helpful documentation to running your own local version of Read the Docs
113-
for development or taking the open source Read the Docs codebase
114-
for your own :doc:`custom installation <custom_installs/index>`.
115-
116-
.. toctree::
117-
:maxdepth: 1
118-
119-
development/install
120-
development/standards
121-
development/search
122-
development/architecture
123-
development/tests
124-
development/docs
125-
development/front-end
126-
development/design/index
127-
development/buildenvironments
128-
development/symlinks
129-
development/settings
130-
development/i18n
131-
development/issue-labels
132-
development/design
133-
RTD Theme <https://sphinx-rtd-theme.readthedocs.io/en/latest/>
134-
135-
136-
13762
Triaging tickets
13863
----------------
13964

docs/custom_installs/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ It has those features and more!
1919
:maxdepth: 2
2020
:glob:
2121

22-
*
22+
local_rtd_vm
23+
customization

docs/custom_installs/local_rtd_vm.rst

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
1-
Local VM Install
2-
================
1+
Local Install
2+
=============
3+
4+
Before proceeding to setup your own local Read the Docs instance,
5+
it may be worth familiarizing yourself with the Read the Docs
6+
:doc:`development setup and standards </development/standards>`,
7+
which details the local development setup with Docker,
8+
and the :doc:`installation guide </development/install>`.
9+
10+
Again, if your primary reasons for considering a private installation
11+
are to connect to private repositories or to have fine grained access control over your documentation,
12+
please consider :doc:`Read the Docs for Business </commercial/index>`.
13+
It has those features and many more and helps support Read the Docs!
14+
315

416
Assumptions and Prerequisites
517
-----------------------------

docs/development/index.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Developer documentation
2+
-----------------------
3+
4+
These are guides and helpful documentation to running your own local version of Read the Docs
5+
for development or taking the open source Read the Docs codebase
6+
for your own :doc:`custom installation </custom_installs/index>`.
7+
8+
.. toctree::
9+
:maxdepth: 1
10+
11+
standards
12+
search
13+
architecture
14+
tests
15+
docs
16+
front-end
17+
design/index
18+
buildenvironments
19+
symlinks
20+
settings
21+
install
22+
i18n
23+
issue-labels
24+
design
25+
RTD Theme <https://sphinx-rtd-theme.readthedocs.io/en/latest/>
26+

docs/development/install.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ Installation
88
Here is a step by step guide on how to install Read the Docs.
99
It will get you to a point of having a local running instance.
1010

11+
.. note::
12+
13+
It may be worth familiarizing yourself with the Read the Docs
14+
:doc:`development setup and standards </development/standards>`.
15+
That document details the local setup with Docker which may be useful
16+
for setting up your own instance.
17+
18+
1119
Requirements
1220
------------
1321

docs/development/search.rst

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,54 @@ Search
44
Read The Docs uses Elasticsearch_ instead of the built in Sphinx search for providing better search
55
results. Documents are indexed in the Elasticsearch index and the search is made through the API.
66
All the Search Code is open source and lives in the `GitHub Repository`_.
7-
Currently we are using the `Elasticsearch 6.3`_ version.
7+
Currently we are using `Elasticsearch 6.3`_.
88

99
Local Development Configuration
1010
-------------------------------
1111

12-
Installing and running Elasticsearch
13-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12+
Elasticsearch is installed and run as part of the :doc:`development setup </development/standards>`.
1413

15-
You need to install and run Elasticsearch_ version 6.3 on your local development machine.
16-
You can get the installation instructions
17-
`here <https://www.elastic.co/guide/en/elasticsearch/reference/6.3/install-elasticsearch.html>`_.
18-
Otherwise, you can also start an Elasticsearch Docker container by running the following command::
19-
20-
docker run -p 9200:9200 -p 9300:9300 \
21-
-e "discovery.type=single-node" \
22-
docker.elastic.co/elasticsearch/elasticsearch:6.3.2
23-
24-
You need to override the ``ES_HOSTS`` and ``ELASTICSEARCH_DSL`` settings to point to ``127.0.0.1:9200``.
2514

2615
Indexing into Elasticsearch
2716
^^^^^^^^^^^^^^^^^^^^^^^^^^^
2817
For using search, you need to index data to the Elasticsearch Index. Run ``reindex_elasticsearch``
29-
management command::
18+
management command:
19+
20+
.. prompt:: bash
3021

31-
./manage.py reindex_elasticsearch
22+
inv docker.manage reindex_elasticsearch
3223

3324
For performance optimization, we implemented our own version of management command rather than
3425
the built in management command provided by the `django-elasticsearch-dsl`_ package.
3526

27+
3628
Auto Indexing
3729
^^^^^^^^^^^^^
3830
By default, Auto Indexing is turned off in development mode. To turn it on, change the
3931
``ELASTICSEARCH_DSL_AUTOSYNC`` settings to `True` in the `readthedocs/settings/dev.py` file.
4032
After that, whenever a documentation successfully builds, or project gets added,
4133
the search index will update automatically.
4234

35+
36+
Manual Elasticsearch installation and setup
37+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38+
39+
Usually you can just rely on the Docker Compose
40+
:doc:`development setup </development/standards>` which includes Elasticsearch.
41+
However, if you're developing or testing Read the Docs' search integration, you may need this.
42+
43+
You need to install and run Elasticsearch_ version 6.3 on your local development machine.
44+
You can get the installation instructions
45+
`here <https://www.elastic.co/guide/en/elasticsearch/reference/6.3/install-elasticsearch.html>`_.
46+
Otherwise, you can also start an Elasticsearch Docker container by running the following command:
47+
48+
.. prompt:: bash
49+
50+
docker run -p 9200:9200 -p 9300:9300 \
51+
-e "discovery.type=single-node" \
52+
docker.elastic.co/elasticsearch/elasticsearch:6.3.2
53+
54+
4355
Architecture
4456
------------
4557
The search architecture is divided into 2 parts.

docs/development/standards.rst

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,9 @@
1-
Development Standards
2-
=====================
1+
Development Setup and Standards
2+
===============================
33

4-
These are build standards that are adhered to by the core development team while
5-
developing Read the Docs and related services. If you are a new contributor to
6-
Read the Docs, it might a be a good idea to follow these guidelines as well. The
7-
:doc:`standard installation instructions <install>` do cover what it takes to
8-
get started with a local installation of Read the Docs and can be used for local
9-
development by non-core team.
10-
11-
.. warning::
12-
13-
Take into account that Core team does not offer support on this setup currently.
4+
These are development setup and standards that are adhered to by the core development team while
5+
developing Read the Docs and related services. If you are a contributor to Read the Docs,
6+
it might a be a good idea to follow these guidelines as well.
147

158

169
Core team standards
@@ -69,7 +62,7 @@ Serve documentation via El Proxito
6962

7063
Search enabled by default
7164
Elasticsearch is properly configured and enabled by default.
72-
Besides, all the documentation indexes are updated after a build is finished.
65+
All the documentation indexes are updated after a build is finished.
7366

7467

7568
Set up your environment
@@ -216,3 +209,33 @@ to connect to the debug process port:
216209

217210
The ``rdb`` debugger is similar to ``pdb``, there is no ``ipdb`` for remote
218211
debugging currently.
212+
213+
214+
Configuring connected accounts
215+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
216+
217+
These are optional steps to setup the :doc:`connected accounts </connected-accounts>`
218+
(GitHub, GitLab, and BitBucket) in your development environment.
219+
This will allow you to login to your local development instance
220+
using your GitHub, Bitbucket, or GitLab credentials
221+
and this makes the process of importing repositories easier.
222+
223+
However, because these services will not be able to connect back to your local development instance,
224+
:doc:`webhooks </webhooks>` will not function correctly.
225+
For some services, the webhooks will fail to be added when the repository is imported.
226+
For others, the webhook will simply fail to connect when there are new commits to the repository.
227+
228+
.. figure:: ../_static/images/development/bitbucket-oauth-setup.png
229+
:align: center
230+
:figwidth: 80%
231+
:target: ../_static/images/development/bitbucket-oauth-setup.png
232+
233+
Configuring an OAuth consumer for local development on Bitbucket
234+
235+
* Configure the applications on GitHub, Bitbucket, and GitLab.
236+
For each of these, the callback URI is ``http://community.dev.readthedocs.io/accounts/<provider>/login/callback/``
237+
where ``<provider>`` is one of ``github``, ``gitlab``, or ``bitbucket_oauth2``.
238+
When setup, you will be given a "Client ID" (also called an "Application ID" or just "Key") and a "Secret".
239+
* Take the "Client ID" and "Secret" for each service and enter it in your local Django admin at:
240+
``http://community.dev.readthedocs.io/admin/socialaccount/socialapp/``.
241+
Make sure to apply it to the "Site".

docs/development/tests.rst

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,46 @@ and your code style passes our code linting suite.
77
Read the Docs uses `Tox`_ to execute testing and linting procedures. Tox is the
88
only dependency you need to run linting or our test suite, the remainder of our
99
requirements will be installed by Tox into environment specific virtualenv
10-
paths. Before testing, make sure you have Tox installed::
10+
paths. Before testing, make sure you have Tox installed:
11+
12+
.. prompt:: bash
1113

1214
pip install tox
1315

1416
To run the full test and lint suite against your changes, simply run Tox. Tox
1517
should return without any errors. You can run Tox against all of our
16-
environments by running::
18+
environments by running:
19+
20+
.. prompt:: bash
1721

1822
tox
1923

2024
By default, tox won't run tests from search,
2125
in order to run all test including the search tests,
2226
you need to override tox's posargs.
2327
If you don't have any additional arguments to pass,
24-
you can also set the ``TOX_POSARGS`` environment variable to an empty string::
28+
you can also set the ``TOX_POSARGS`` environment variable to an empty string:
29+
30+
.. prompt:: bash
2531

2632
TOX_POSARGS='' tox
2733

2834
.. note::
2935

3036
If you need to override tox's posargs, but you still don't want to run the search tests,
31-
you need to include ``-m 'not search'`` to your command::
37+
you need to include ``-m 'not search'`` to your command:
38+
39+
.. prompt:: bash
3240

3341
tox -- -m 'not search' -x
3442

3543
.. warning::
3644

37-
Running tests for search needs an Elasticsearch :ref:`instance running locally <development/search:Installing and running Elasticsearch>`.
45+
Running tests for search needs an Elasticsearch :ref:`instance running locally <development/search:Manual Elasticsearch installation and setup>`.
46+
47+
To target a specific environment:
3848

39-
To target a specific environment::
49+
.. prompt:: bash
4050

4151
tox -e py36
4252

0 commit comments

Comments
 (0)