Skip to content

Commit c1a6810

Browse files
committed
Merge branch 'master' into cross-reference-guide
2 parents 2cbabc8 + a8e817e commit c1a6810

Some content is hidden

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

78 files changed

+1212
-643
lines changed

.readthedocs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ search:
1515

1616
# Internal documentation
1717
development/design/*: -5
18+
19+
# Useful content, but not something we want most users finding
20+
custom_installs/*: -6

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ addons:
1010
jobs:
1111
include:
1212
- python: 3.6
13-
env: TOXENV=py36,codecov TOX_POSARGS='' ES_VERSION=6.2.4 ES_DOWNLOAD_URL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz
13+
env: TOXENV=py36,codecov TOX_POSARGS='' ES_VERSION=6.5.4 ES_DOWNLOAD_URL=https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz
1414
- python: 3.6
1515
env: TOXENV=docs
1616
- python: 3.6

CHANGELOG.rst

Lines changed: 101 additions & 51 deletions
Large diffs are not rendered by default.

dockerfiles/nginx/proxito.conf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ server {
6464
add_header X-RTD-Redirect $rtd_redirect always;
6565
set $cache_tag $upstream_http_cache_tag;
6666
add_header Cache-Tag $cache_tag always;
67+
set $referrer_policy $upstream_http_referrer_policy;
68+
add_header Referrer-Policy $referrer_policy always;
6769
}
6870

6971
# Serve 404 pages here

docs/advertising/ad-customization.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ In Sphinx, this is typically done by
3838
adding a new template (under `templates_path`_)
3939
for inclusion in the `HTML sidebar`_ in your ``conf.py``.
4040

41-
.. _HTML sidebar: http://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_sidebars
42-
.. _templates_path: http://www.sphinx-doc.org/en/master/usage/configuration.html#confval-templates_path
41+
.. _HTML sidebar: https://www.sphinx-doc.org/page/usage/configuration.html#confval-html_sidebars
42+
.. _templates_path: https://www.sphinx-doc.org/page/usage/configuration.html#confval-templates_path
4343

4444
.. code-block:: python
4545

docs/advertising/advertising-details.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ Instead, we target based solely upon:
7171
targeting by state or by metro area (DMA specifically).
7272
* We geolocate a user's IP address to a country when a request is made.
7373

74-
Read the Docs uses GeoLite2 data created by `MaxMind <http://maxmind.com>`_.
75-
7674

7775
Where ads are shown
7876
-------------------
@@ -97,6 +95,14 @@ For more details, see the :ref:`Do Not Track section <privacy-policy:Do Not Trac
9795
of our privacy policy.
9896

9997

98+
Ad serving infrastructure
99+
-------------------------
100+
101+
Our `entire ad server <https://github.com/readthedocs/ethical-ad-server>`_ is open source,
102+
so you can inspect how we're doing things.
103+
We believe strongly in open source, and we practice what we preach.
104+
105+
100106
Analytics
101107
---------
102108

docs/advertising/ethical-advertising.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ They should run before your content,
7474
they should take over the page,
7575
the bigger, weirder, or flashier the better.
7676

77+
.. _fake ad clicks: https://en.wikipedia.org/wiki/Click_fraud
78+
.. _massive downsides: http://idlewords.com/talks/what_happens_next_will_amaze_you.htm
79+
7780
We opt out
7881
~~~~~~~~~~
7982

@@ -91,8 +94,6 @@ The ads won't flash or move.
9194
We run the ads we want to have on our site,
9295
in a way that makes us feel good.
9396

94-
.. _fake ad clicks: https://en.wikipedia.org/wiki/Click_fraud
95-
9697
Additional details
9798
------------------
9899

@@ -105,6 +106,8 @@ Additional details
105106
* Eric Holscher, one of our co-founders
106107
`talks a bit more <https://www.ericholscher.com/blog/2016/aug/31/funding-oss-marketing-money/>`_
107108
about funding open source this way on his blog.
109+
* After proving our ad model as a way to fund open source and building our ad serving infrastructure,
110+
we launched the `EthicalAds network <https://www.ethicalads.io>`_ to help other projects be sustainable.
108111

109112
.. _advertising FAQ: https://readthedocs.org/sustainability/advertising/faq/
110113

@@ -120,8 +123,6 @@ We hope that others will join us in this mission:
120123
vote with your dollars and support us in building the ad model we want to exist.
121124
`Get more information <https://readthedocs.org/sustainability/advertising/>`_ on what we offer.
122125

123-
.. _massive downsides: http://idlewords.com/talks/what_happens_next_will_amaze_you.htm
124-
125126

126127
Community Ads
127128
-------------

docs/api/v3.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,3 +1364,8 @@ Environment Variable delete
13641364
:requestheader Authorization: token to authenticate.
13651365

13661366
:statuscode 204: Environment variable deleted successfully
1367+
1368+
Additional APIs
1369+
---------------
1370+
1371+
- :ref:`Server side search API <server-side-search:api>`.

docs/changelog.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@ Code Notes
2424
- Updated Django from `1.6.11` to `1.8.3`.
2525
- Removed South and ported the South migrations to Django's migration framework.
2626
- Updated django-celery from `3.0.23` to `3.1.26` as django-celery 3.0.x does not support Django 1.8.
27-
- Updated Celery from `3.0.24` to `3.1.18` because we had to update django-celery. We need to test this extensively and might need to think about using the new Celery API directly and dropping django-celery. See release notes: http://docs.celeryproject.org/en/latest/whatsnew-3.1.html
27+
- Updated Celery from `3.0.24` to `3.1.18` because we had to update django-celery. We need to test this extensively and might need to think about using the new Celery API directly and dropping django-celery.
28+
See release notes: https://docs.celeryproject.org/en/3.1/whatsnew-3.1.html
2829
- Updated tastypie from `0.11.1` to current master (commit `1e1aff3dd4dcd21669e9c68bd7681253b286b856`) as 0.11.x is not compatible with Django 1.8. No surprises expected but we should ask for a proper release, see release notes: https://github.com/django-tastypie/django-tastypie/blob/master/docs/release_notes/v0.12.0.rst
29-
- Updated django-oauth from `0.16.1` to `0.21.0`. No surprises expected, see release notes `in the docs <https://django-allauth.readthedocs.org/en/latest/changelog.html>`_ and `finer grained in the repo <https://github.com/pennersr/django-allauth/blob/9123223f167959e4e5c4074408db068f725559d1/ChangeLog#L1-169>`_
30+
- Updated django-oauth from `0.16.1` to `0.21.0`. No surprises expected, see release notes `in the docs <https://django-allauth.readthedocs.io/en/latest/release-notes.html>`_ and `finer grained in the repo <https://github.com/pennersr/django-allauth/blob/9123223f167959e4e5c4074408db068f725559d1/ChangeLog#L1-169>`_
3031
- Updated django-guardian from `1.2.0` to `1.3.0` to gain Django 1.8 support. No surprises expected, see release notes: https://github.com/lukaszb/django-guardian/blob/devel/CHANGES
3132
- Using `django-formtools` instead of removed `django.contrib.formtools` now. Based on the Django release notes, these modules are the same except of the package name.
32-
- Updated pytest-django from `2.6.2` to `2.8.0`. No tests required, but running the testsuite :smile:
33+
- Updated pytest-django from `2.6.2` to `2.8.0`. No tests required, but running the testsuite :smile:
3334
- Updated psycopg2 from 2.4 to 2.4.6 as 2.4.5 is required by Django 1.8. No trouble expected as Django is the layer between us and psycopg2. Also it's only a minor version upgrade. Release notes: http://initd.org/psycopg/docs/news.html#what-s-new-in-psycopg-2-4-6
3435
- Added `django.setup()` to `conf.py` to load django properly for doc builds.
3536
- Added migrations for all apps with models in the `readthedocs/` directory

docs/commercial/single-sign-on.rst

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ Single Sign-On is supported on |com_brand| for Pro and Enterprise plans.
1212
Currently, we support two different types of Single Sign-On:
1313

1414
* Authentication *and* authorization are managed by the Identity Provider (e.g. GitHub, Bitbucket or GitLab)
15-
* Authentication is managed by the Identity Provider (e.g. a ``@company.com`` verified email address)
15+
* Authentication (*only*) is managed by the Identity Provider (e.g. an active GSuite/Google ``@company.com`` with a verified email address)
1616

1717
.. note::
1818

19-
SSO is currently in **Beta** and only GitHub and Company Email are supported for now.
19+
SSO is currently in **Beta** and only GitHub, Bitbucket, GitLab and Google are supported for now.
2020
If you would like to apply for the Beta, please `contact us <mailto:[email protected]>`_.
2121

2222
.. contents::
@@ -66,11 +66,45 @@ Adding users as owners of your organization will give them permissions to import
6666
Note that to be able to import a project, that user must have **admin** permissions in the VCS repository associated.
6767

6868

69-
SSO with your company email address
70-
-----------------------------------
69+
Revoke access to a project
70+
~~~~~~~~~~~~~~~~~~~~~~~~~~
7171

72-
Using your company's email address (e.g. ``[email protected]``) allows you to
73-
"grant **read** access to all the projects under your organization to users with a ``@company.com`` verified email address".
72+
If a user should not have access anymore to a project for any reason,
73+
a VCS repository's admin (e.g. user with Admin role on GitHub for that specific repository)
74+
can revoke access to the VCS repository and this will be automatically reflected in Read the Docs.
75+
76+
The same process is followed in case you need to remove **admin** access,
77+
but still want that user to have access to read the documentation.
78+
Instead of revoking access completely, just need lower down permissions to **read** only.
79+
80+
81+
SSO with GSuite (Google email account)
82+
--------------------------------------
83+
84+
Using your company's Google email address (e.g. ``[email protected]``) allows you to
85+
manage authentication for your organization's members.
86+
As this Identity Provider does not provide authorization over each repositories/projects per user,
87+
permissions are managed by the :ref:`internal Read the Docs's Teams <commercial/organizations:Team Types>` authorization system.
88+
89+
By default, users that Sign Up with a Google account do not have any permissions over any project.
90+
However, you can define which Teams users matching your company's domain email address will auto-join when they Sign Up.
91+
Read the following sections to learn how to grant read and admin access.
92+
93+
94+
Grant access to read a project
95+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
96+
97+
You can add a user under a "Read Only Team" to grant **read** permissions to all the projects under that Team.
98+
This can be done under "your organization detail's page" > :guilabel:`Teams` > :guilabel:`Read Only` > :guilabel:`Invite Member`.
99+
100+
To avoid this repetitive task for each employee of your company,
101+
the owner of the Read the Docs organization can mark one or many Teams for users matching the company's domain email
102+
to join these Teams automaically when they Sign Up.
103+
104+
For example, you can create a "General Documentaion (Read Only)" team
105+
with the projects that all employees of your company should have access to
106+
and mark it as :guilabel:`Auto join users with an organization's email address to this team`.
107+
Then all users that Sign Up with their ``[email protected]`` email will automatically join this Team and have **read** access to those projects.
74108

75109

76110
Grant access to administer a project
@@ -88,3 +122,17 @@ they will be granted access to import a project.
88122

89123
Note that to be able to import a project, that user must have **admin** permissions in the GitHub, Bitbucket or GitLab repository associated,
90124
and their social account connected with Read the Docs.
125+
126+
127+
Revoke user's access to a project
128+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
129+
130+
To revoke access to a project for a particular user, you should remove that user from the Team that contains that Project.
131+
This can be done under "your organization detail's page" > :guilabel:`Teams` > :guilabel:`Read Only` and click :guilabel:`Remove` next to the user you want to revoke access.
132+
133+
134+
Revoke user's access to all the projects
135+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
136+
137+
By disabling the GSuite/Google account with email ``[email protected]``,
138+
you revoke access to all the projects that user had access and disable login on Read the Docs completely for that user.

docs/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ def get_version():
127127
linkcheck_ignore = [
128128
r'http://127\.0\.0\.1',
129129
r'http://localhost',
130+
r'http://community\.dev\.readthedocs\.io',
130131
r'https://yourproject\.readthedocs\.io',
131132
r'https?://docs\.example\.com',
132133
r'https://foo\.readthedocs\.io/projects',
@@ -135,6 +136,8 @@ def get_version():
135136
r'https://github\.com/readthedocs/readthedocs\.org/pull',
136137
r'https://docs\.readthedocs\.io/\?rtd_search',
137138
r'https://readthedocs\.org/search',
139+
# This page is under login
140+
r'https://readthedocs\.org/accounts/gold',
138141
]
139142

140143

docs/config-file/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The main advantages of using a configuration file over the web interface are:
1818
- Some settings are only available using a configuration file
1919

2020
.. tip::
21-
21+
2222
Using a configuration file is the recommended way of using Read the Docs.
2323

2424
.. toctree::

docs/config-file/v1.rst

Lines changed: 7 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Here is an example of what this file looks like:
1919
2020
build:
2121
image: latest
22-
22+
2323
python:
2424
version: 3.6
2525
setup_py_install: true
@@ -34,7 +34,7 @@ version
3434
* Default: 1
3535

3636
.. code-block:: yaml
37-
37+
3838
version: 1
3939
4040
@@ -49,7 +49,7 @@ The formats of your documentation you want to be built.
4949
Set as an empty list ``[]`` to build none of the formats.
5050

5151
.. note:: We will always build an HTML & JSON version of your documentation.
52-
These are used for web serving & search indexing, respectively.
52+
These are used for web serving & search indexing, respectively.
5353

5454
.. code-block:: yaml
5555
@@ -146,7 +146,7 @@ This is the version of Python to use when building your documentation.
146146
If you specify only the major version of Python,
147147
the highest supported minor version will be selected.
148148

149-
.. warning::
149+
.. warning::
150150

151151
The supported Python versions depends on the version of the build image your
152152
project is using. The default build image that is used to build
@@ -186,8 +186,8 @@ When true, install your project into the Virtualenv with
186186

187187
.. code-block:: yaml
188188
189-
python:
190-
setup_py_install: true
189+
python:
190+
setup_py_install: true
191191
192192
193193
python.pip_install
@@ -204,37 +204,6 @@ documentation.
204204
python:
205205
pip_install: true
206206
207-
208-
.. TODO not yet implemented. We should move these to another doc.
209-
.. ==============================================================
210-
..
211-
.. type
212-
.. ~~~~
213-
..
214-
.. * Default: ``sphinx``
215-
.. * Options: ``sphinx``, ``mkdocs``
216-
..
217-
.. The ``type`` block allows you to configure the build tool used for building
218-
.. your documentation.
219-
..
220-
.. .. code-block:: yaml
221-
..
222-
.. type: sphinx
223-
..
224-
.. conf_file
225-
.. ~~~~~~~~~
226-
..
227-
.. * Default: `None`
228-
.. * Type: Path (specified from the root of the project)
229-
..
230-
.. The path to a specific Sphinx ``conf.py`` file. If none is found, we will
231-
.. choose one.
232-
..
233-
.. .. code-block:: yaml
234-
..
235-
.. conf_file: project2/docs/conf.py
236-
237-
238207
python.extra_requirements
239208
`````````````````````````
240209

@@ -284,6 +253,6 @@ Behind the scene the following Pip command will be run:
284253
pip install .[tests,docs]
285254

286255

287-
.. _environment file: http://conda.pydata.org/docs/using/envs.html#share-an-environment
256+
.. _environment file: https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-from-an-environment-yml-file
288257
.. _extra requirements: https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-extras-optional-features-with-their-own-dependencies
289258
.. _package default dependencies: https://setuptools.readthedocs.io/en/latest/setuptools.html#declaring-dependencies

docs/config-file/v2.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Read the Docs supports configuring your documentation builds with a YAML file.
55
The :doc:`configuration file <index>` must be in the root directory of your project.
66
We recommend the filename ``.readthedocs.yml``.
77

8+
All options are applied to the version containing this file.
89
Below is an example YAML file which shows the most common configuration options:
910

1011
.. code:: yaml
@@ -340,7 +341,8 @@ Read the Docs will try to find a ``conf.py`` file in your project.
340341
sphinx.fail_on_warning
341342
``````````````````````
342343

343-
`Turn warnings into errors <http://www.sphinx-doc.org/en/master/man/sphinx-build.html#id6>`__.
344+
Turn warnings into errors
345+
(:option:`-W <sphinx:sphinx-build.-W>` and :option:`--keep-going <sphinx:sphinx-build.--keep-going>` options).
344346
This means the build fails if there is a warning and exits with exit status 1.
345347

346348
:Type: ``bool``

docs/faq.rst

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,9 @@ Yes. One criticism of Sphinx is that its annotated docstrings are too
200200
dense and difficult for humans to read. In response, many projects
201201
have adopted customized docstring styles that are simultaneously
202202
informative and legible. The
203-
`NumPy <https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt>`_
203+
`NumPy <https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard>`__
204204
and
205-
`Google <https://google.github.io/styleguide/pyguide.html?showone=Comments#Comments>`_
205+
`Google <https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings>`__
206206
styles are two popular docstring formats. Fortunately, the default
207207
Read The Docs theme handles both formats just fine, provided
208208
your ``conf.py`` specifies an appropriate Sphinx extension that
@@ -251,6 +251,23 @@ using a Read the Docs :doc:`config-file/index`.
251251
.. _pip requirements file: https://pip.pypa.io/en/stable/user_guide.html#requirements-files
252252

253253

254+
I need to install a package in a environment with pinned versions
255+
-----------------------------------------------------------------
256+
257+
To ensure proper installation of a python package, the ``pip`` :ref:`install method <config-file/v2:python.install>` will automatically upgrade every dependency to its most recent version in case they aren't pinned by the package definition.
258+
If instead you'd like to pin your dependencies outside the package, you can add this line to your requirements or environment file (if you are using Conda).
259+
260+
In your ``requirements.txt`` file::
261+
262+
# path to the directory containing setup.py relative to the project root
263+
-e .
264+
265+
In your Conda environment file (``environment.yml``)::
266+
267+
# path to the directory containing setup.py relative to the environment file
268+
-e ..
269+
270+
254271
How can I avoid search results having a deprecated version of my docs?
255272
----------------------------------------------------------------------
256273

0 commit comments

Comments
 (0)