Skip to content

Commit aa75ca0

Browse files
committed
Merge tag '9.12.0' into rel
2 parents b6f2552 + a715d1a commit aa75ca0

File tree

120 files changed

+15000
-10997
lines changed

Some content is hidden

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

120 files changed

+15000
-10997
lines changed

CHANGELOG.rst

+28
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
Version 9.12.0
2+
--------------
3+
4+
:Date: May 02, 2023
5+
6+
* `@benjaoming <https://github.com/benjaoming>`__: Allow build.commands without build.tools (`#10281 <https://github.com/readthedocs/readthedocs.org/pull/10281>`__)
7+
* `@benjaoming <https://github.com/benjaoming>`__: Remove raise_for_exception=False tests (`#10280 <https://github.com/readthedocs/readthedocs.org/pull/10280>`__)
8+
* `@github-actions[bot] <https://github.com/github-actions[bot]>`__: Dependencies: all packages updated via pip-tools (`#10278 <https://github.com/readthedocs/readthedocs.org/pull/10278>`__)
9+
* `@stsewd <https://github.com/stsewd>`__: Remove dead code (`#10275 <https://github.com/readthedocs/readthedocs.org/pull/10275>`__)
10+
* `@benjaoming <https://github.com/benjaoming>`__: Dev: Disable cacheops in proxito docker environment (`#10274 <https://github.com/readthedocs/readthedocs.org/pull/10274>`__)
11+
* `@stsewd <https://github.com/stsewd>`__: Tests: be explicit about the privacy level (`#10273 <https://github.com/readthedocs/readthedocs.org/pull/10273>`__)
12+
* `@stsewd <https://github.com/stsewd>`__: Fix typo in tests (`#10271 <https://github.com/readthedocs/readthedocs.org/pull/10271>`__)
13+
* `@stsewd <https://github.com/stsewd>`__: Update docs about setuptools dependency (`#10270 <https://github.com/readthedocs/readthedocs.org/pull/10270>`__)
14+
* `@stsewd <https://github.com/stsewd>`__: Build: Pin setuptools only when required (`#10268 <https://github.com/readthedocs/readthedocs.org/pull/10268>`__)
15+
* `@github-actions[bot] <https://github.com/github-actions[bot]>`__: Dependencies: all packages updated via pip-tools (`#10267 <https://github.com/readthedocs/readthedocs.org/pull/10267>`__)
16+
* `@benjaoming <https://github.com/benjaoming>`__: Backend: Make Features ordered in a nice way (`#10262 <https://github.com/readthedocs/readthedocs.org/pull/10262>`__)
17+
* `@stsewd <https://github.com/stsewd>`__: Proxito: allow overlapping public and external version domains (`#10260 <https://github.com/readthedocs/readthedocs.org/pull/10260>`__)
18+
* `@ericholscher <https://github.com/ericholscher>`__: Revert "Proxito: inject hosting integration header for `build.commands` (#10219)" (`#10259 <https://github.com/readthedocs/readthedocs.org/pull/10259>`__)
19+
* `@stsewd <https://github.com/stsewd>`__: Test explicitly without organizations (`#10258 <https://github.com/readthedocs/readthedocs.org/pull/10258>`__)
20+
* `@ericholscher <https://github.com/ericholscher>`__: Release 9.11.0 (`#10255 <https://github.com/readthedocs/readthedocs.org/pull/10255>`__)
21+
* `@stsewd <https://github.com/stsewd>`__: Tests: set production domain explicitly (`#10253 <https://github.com/readthedocs/readthedocs.org/pull/10253>`__)
22+
* `@benjaoming <https://github.com/benjaoming>`__: Docs: Style guide stash (`#10250 <https://github.com/readthedocs/readthedocs.org/pull/10250>`__)
23+
* `@benjaoming <https://github.com/benjaoming>`__: Docs: New entries to glossary (`#10249 <https://github.com/readthedocs/readthedocs.org/pull/10249>`__)
24+
* `@stsewd <https://github.com/stsewd>`__: Proxito: handle http to https redirects for all requests (`#10199 <https://github.com/readthedocs/readthedocs.org/pull/10199>`__)
25+
* `@ericholscher <https://github.com/ericholscher>`__: Fix checking of PR status (`#10085 <https://github.com/readthedocs/readthedocs.org/pull/10085>`__)
26+
* `@ewdurbin <https://github.com/ewdurbin>`__: implement multiple .readthedocs.yml files per repo (`#10001 <https://github.com/readthedocs/readthedocs.org/pull/10001>`__)
27+
* `@benjaoming <https://github.com/benjaoming>`__: Contextualize 404 page (`#9657 <https://github.com/readthedocs/readthedocs.org/pull/9657>`__)
28+
129
Version 9.11.0
230
--------------
331

dockerfiles/settings/proxito.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@
66
class ProxitoDevSettings(CommunityProxitoSettingsMixin, DockerBaseSettings):
77
DONT_HIT_DB = False
88

9-
CACHEOPS_ENABLED = True
9+
# Disabled because of issues like
10+
# ResponseError: Error running script (call to f_1880dea5c524f6a37a650f715fa630416a2fe1fd):
11+
# @user_script:50: @user_script: 50: Wrong number of args calling Redis command From Lua script
12+
# (this issue goes away after a few reloads)
13+
CACHEOPS_ENABLED = False
1014

1115
# El Proxito does not have django-debug-toolbar installed
1216
@property

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474

7575
master_doc = "index"
7676
copyright = "Read the Docs, Inc & contributors"
77-
version = "9.11.0"
77+
version = "9.12.0"
7878
release = version
7979
exclude_patterns = ["_build", "shared", "_includes"]
8080
default_role = "obj"

docs/dev/style-guide.rst

+15-1
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,25 @@ Word list
5454

5555
We have a specific way that we write common words:
5656

57+
* ``build command`` is the name of each step in the file.
58+
We try to avoid confusion with pipelines, jobs and steps from other CIs,
59+
as we do not have a multi-dimentional build sequence.
60+
* ``build job`` is the name of the general and pre-defined steps that can be overridden.
61+
They are similar to "steps" in pipelines,
62+
but on Read the Docs they are pre-defined.
63+
So it's important to have a unique name.
64+
* ``Git`` should be upper case. Except when referring to the :program:`git` command, then it should be written as `:program:\`git\``.
5765
* ``Git repository`` for the place that stores Git repos. We used to use ``VCS``, but this is deprecated.
5866
* ``Git provider`` for generic references to GitHub/Bitbucket/GitLab/Gitea etc.
5967
We avoid "host" and "platform" because they are slightly more ambiguous.
68+
* ``how to`` do the thing is explained in a ``how-to guide`` (notice hyphen and spaces).
69+
* ``lifecycle`` is spelled without hyphen nor space.
6070
* ``open source`` should be lower case, unless you are definitely referring to `OSI's Open Source Definition <https://opensource.org/osd>`.
61-
* ``Git`` should be upper case. Except when referring to the :program:`git` command, then it should be written as `:program:\`git\``.
71+
* ``.readthedocs.yaml`` is the general name of the build configuration file.
72+
Even though we allow custom paths to the config file,
73+
we only validate ``.readthedocs.yaml`` as the file name.
74+
Older variations of the name are considered legacy.
75+
We do not refer to it in general terms.
6276

6377
Substitutions
6478
-------------

docs/user/build-customization.rst

+16-5
Original file line numberDiff line numberDiff line change
@@ -360,14 +360,25 @@ Where to put files
360360
~~~~~~~~~~~~~~~~~~
361361

362362
It is your responsibility to generate HTML and other formats of your documentation using :ref:`config-file/v2:build.commands`.
363-
The contents of the ``_readthedocs/<format>/`` directory will be hosted as part of your documentation.
363+
The contents of the ``$READTHEDOCS_OUTPUT/<format>/`` directory will be hosted as part of your documentation.
364+
365+
We store the the base folder name ``_readthedocs/`` in the environment variable ``$READTHEDOCS_OUTPUT`` and encourage that you use this to generate paths.
364366

365367
Supported :ref:`formats <downloadable-documentation:accessing offline formats>` are published if they exist in the following directories:
366368

367-
* ``_readthedocs/html/`` (required)
368-
* ``_readthedocs/htmlzip/``
369-
* ``_readthedocs/pdf/``
370-
* ``_readthedocs/epub/``
369+
* ``$READTHEDOCS_OUTPUT/html/`` (required)
370+
* ``$READTHEDOCS_OUTPUT/htmlzip/``
371+
* ``$READTHEDOCS_OUTPUT/pdf/``
372+
* ``$READTHEDOCS_OUTPUT/epub/``
373+
374+
.. note::
375+
376+
Remember to create the folders before adding content to them.
377+
You can ensure that the output folder exists by adding the following command:
378+
379+
.. code-block:: console
380+
381+
mkdir -p $READTHEDOCS_OUTPUT/html/
371382
372383
Search support
373384
~~~~~~~~~~~~~~

docs/user/build-default-versions.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ pip:
5252
Latest version by default.
5353

5454
setuptools:
55-
``58.2.0`` or older.
55+
Projects using ``setup.py install`` as installation method use ``58.2.0`` or older.
56+
All other projects use the latest version.
5657

5758
mock:
5859
``1.0.1`` (could be removed in the future).

docs/user/build-notifications.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Email notifications:
99
This makes sure you know when your builds have failed.
1010

1111
Build Status Webhooks:
12-
Build notifications can happen via webhooks.
12+
Build notifications can happen via :term:`webhooks <webhook>`.
1313
This means that we are able to support a wide variety of services that receive notifications.
1414

1515
Slack and Discord are supported through ready-made templates.

docs/user/connected-accounts.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ which allow us to build your documentation on every change to your repository.
8888
We ask for this so you can create a Read the Docs account and login with your GitHub credentials.
8989

9090
Administering webhooks (``admin:repo_hook``)
91-
We ask for this so we can create webhooks on your repositories when you import them into Read the Docs.
91+
We ask for this so we can create :term:`webhooks <webhook>` on your repositories when you import them into Read the Docs.
9292
This allows us to build the docs when you push new commits.
9393

9494
Read access to your organizations (``read:org``)
@@ -115,7 +115,7 @@ which allow us to build your documentation on every change to your repository.
115115
We request permissions for:
116116

117117
Administering your repositories (``repository:admin``)
118-
We ask for this so we can create webhooks on your repositories when you import them into Read the Docs.
118+
We ask for this so we can create :term:`webhooks <webhook>` on your repositories when you import them into Read the Docs.
119119
This allows us to build the docs when you push new commits.
120120
NB! This permission scope does **not** include any write access to code.
121121

docs/user/faq.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ and as a result, it tends to look a bit better with the default theme.
354354
I need to install a package in a environment with pinned versions
355355
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
356356

357-
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.
357+
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:term:`pinned <pinning>` by the package definition.
358358
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).
359359

360360
In your ``requirements.txt`` file::

docs/user/glossary.rst

+74-8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ so that you have a reference for how we're using them.
66

77
.. glossary::
88

9+
CI/CD
10+
CI/CD is a common way to write *Continuous Integration and Continuous Deployment*.
11+
In some scenarios, they exist as two separate platforms.
12+
Read the Docs is a combined CI/CD platform made for documentation.
13+
914
dashboard
1015
The "admin" site where Read the Docs projects are managed and configured.
1116
This varies for our two properties:
@@ -39,36 +44,97 @@ so that you have a reference for how we're using them.
3944
and rules for publication of documentation can be :doc:`automated </automation-rules>`.
4045
Similar to :term:`Docs as Code`.
4146

47+
pinning
48+
To *pin* a requirement means to explicitly specify which version should be used.
49+
*Pinning* software requirements is the most important technique to make a project :term:`reproducible`.
50+
51+
When documentation builds,
52+
software dependencies are installed in their latest versions permitted by the pinning specification.
53+
Since software packages are frequently released,
54+
we are usually trying to avoid incompatibilities in a new release from suddenly breaking a documentation build.
55+
56+
Examples of Python dependencies::
57+
58+
# Exact pinning: Only allow Sphinx 5.3.0
59+
sphinx==5.3.0
60+
61+
# Loose pinning: Lower and upper bounds result in the latest 5.3.x release
62+
sphinx>=5.3,<5.4
63+
64+
# Very loose pinning: Lower and upper bounds result in the latest 5.x release
65+
sphinx>=5,<6
66+
67+
Read the Docs recommends using **exact pinning**.
68+
69+
See: :doc:`/guides/reproducible-builds`.
70+
4271
pre-defined build jobs
4372
Commands executed by Read the Docs when performing the build process.
4473
They cannot be overwritten by the user.
4574

46-
profile page
47-
Page where you can see the projects of a certain user.
48-
4975
project home
5076
Page where you can access all the features of Read the Docs,
5177
from having an overview to browsing the latest builds or administering your project.
5278

5379
project page
5480
Another name for :term:`project home`.
5581

82+
reproducible
83+
A documentation project is said to be *reproducible* when its sources build correctly on Read the Docs over a periode of many years.
84+
You can also think of being *reproducible* as being *robust* or *resillient*.
85+
86+
Being "reproducible" is an important positive quality goal of documentation.
87+
88+
When builds are not reproducible and break due to external factors,
89+
they need frequent troubleshooting and manual fixing.
90+
91+
The most common external factor is that new versions of software dependencies are released.
92+
93+
See: :doc:`/guides/reproducible-builds`.
94+
95+
root URL
96+
Home URL of your documentation without the ``/<lang>`` and ``/<version>`` segments.
97+
For projects without custom domains, the one ending in ``.readthedocs.io/``
98+
(for example, ``https://docs.readthedocs.io`` as opposed to ``https://docs.readthedocs.io/en/latest``).
99+
56100
slug
57101
A unique identifier for a project or version. This value comes from the
58102
project or version name, which is reduced to lowercase letters, numbers,
59103
and hyphens. You can retrieve your project or version slugs from
60104
:doc:`our API <api/v3>`.
61105

106+
static website
107+
A static site or static website is a collection of HTML files, images, CSS and JavaScript that are served statically,
108+
as opposed to dynamic websites that generate a unique response for each request, using databases and user sessions.
109+
110+
Static websites are highly portable, as they do not depend on the webserver.
111+
They can also be viewed offline.
112+
113+
Documentation projects served on Read the Docs are *static websites*.
114+
115+
Tools to manage and generate static websites are commonly known as *static site generators* and there is a big overlap with documentation tools.
116+
Some static site generators are also documentation tools,
117+
and some documentation tools are also used to generate normal websites.
118+
119+
For instance, :doc:`Sphinx <sphinx:index>` is made for documentation but also used for blogging.
120+
62121
subproject
63122
Project A can be configured such that when requesting a URL ``/projects/<subproject-slug>``,
64123
the root of project B is returned.
65124
In this case, *project B* is the subproject.
66125
Read more in :doc:`/subprojects`.
67126

68-
root URL
69-
Home URL of your documentation without the ``/<lang>`` and ``/<version>`` segments.
70-
For projects without custom domains, the one ending in ``.readthedocs.io/``
71-
(for example, ``https://docs.readthedocs.io`` as opposed to ``https://docs.readthedocs.io/en/latest``).
72-
73127
user-defined build jobs
74128
Commands defined by the user that Read the Docs will execute when performing the build process.
129+
130+
webhook
131+
A webhook is a special URL that can be called from another service,
132+
usually with a secret token.
133+
It is commonly used to start a build or a deployment or to send a status update.
134+
135+
There are two important types of webhooks for Read the Docs:
136+
137+
* Git providers have webhooks which are special URLs that Read the Docs can call in order to notify about documentation builds.
138+
* Read the Docs has a unique webhook for each project that the Git provider calls when changes happen in Git.
139+
140+
See also: :doc:`/guides/git-integrations` and :doc:`/build-notifications`

docs/user/guides/build-notifications.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Build notifications can alert you when your builds fail so you can take immediat
66

77
.. note::
88

9-
Currently we don't send notifications or trigger webhooks
9+
Currently we don't send notifications or trigger :term:`webhooks <webhook>`
1010
on :doc:`builds from pull requests </pull-requests>`.
1111

1212

docs/user/guides/git-integrations.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Provider-specific instructions
114114
Additional integration
115115
----------------------
116116

117-
You can configure multiple webhooks.
117+
You can configure multiple incoming :term:`webhooks <webhook>`.
118118

119119
To manually set up an integration, go to :guilabel:`Admin` > :guilabel:`Integrations` > :guilabel:`Add integration`
120120
dashboard page and select the integration type you'd like to add.

docs/user/guides/reproducible-builds.rst

+4-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ How to create reproducible builds
22
=================================
33

44
Your documentation depends on a number of dependencies to be built.
5-
If your docs don't have reproducible builds,
5+
If your docs don't have :term:`reproducible` builds,
66
an update in a dependency can break your builds when least expected,
77
or make your docs look different from your local version.
88
This guide will help you to keep your builds working over time,
@@ -15,7 +15,6 @@ so that you can focus on content.
1515
Use a ``.readthedocs.yaml`` configuration file
1616
----------------------------------------------
1717

18-
1918
We recommend using a :doc:`configuration file </config-file/v2>` to manage your documentation.
2019
Our config file *provides you per version settings*,
2120
and *those settings live in your Git repository*.
@@ -26,7 +25,7 @@ and ensures that all your versions can be rebuilt from a reproducible configurat
2625
Use a requirements file for Python dependencies
2726
-----------------------------------------------
2827

29-
We recommend using a Pip :ref:`requirements file <pip:requirements-file-format>` or Conda :ref:`environment file <config-file/v2:conda.environment>` to pin Python dependencies.
28+
We recommend using a Pip :ref:`requirements file <pip:requirements-file-format>` or Conda :ref:`environment file <config-file/v2:conda.environment>` to :term:`pin <pinning>` Python dependencies.
3029
This ensures that top-level dependencies and extensions don't change.
3130

3231
A configuration file with explicit dependencies looks like this:
@@ -66,7 +65,7 @@ A configuration file with explicit dependencies looks like this:
6665
Pin your transitive dependencies
6766
--------------------------------
6867

69-
Once you have pinned your own dependencies,
68+
Once you have :term:`pinned <pinning>` your own dependencies,
7069
the next things to worry about are the dependencies of your dependencies.
7170
These are called *transitive dependencies*,
7271
and they can upgrade without warning if you do not pin these packages as well.
@@ -144,7 +143,7 @@ Check list ✅
144143
-------------
145144

146145
If you followed this guide,
147-
you have pinned:
146+
you have:term:`pinned <pinning>`:
148147

149148
* tool versions (Python, Node)
150149
* top-level dependencies (Sphinx, Sphinx extensions)

docs/user/tutorial/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ On the authorization page, click the green :guilabel:`Authorize readthedocs` but
7979

8080
Read the Docs needs elevated permissions to perform certain operations
8181
that ensure that the workflow is as smooth as possible,
82-
like installing webhooks.
82+
like installing :term:`webhooks <webhook>`.
8383
If you want to learn more,
8484
check out :ref:`connected-accounts:permissions for connected accounts`.
8585

media/css/core.css

+3
Original file line numberDiff line numberDiff line change
@@ -1331,6 +1331,9 @@ div.module.project-subprojects li.subproject a.subproject-edit:before {
13311331
content: "\f044";
13321332
}
13331333

1334+
#content ul.normal_list {list-style: disc; margin-left: 20px;}
1335+
#content code {background: #eee; border: 1px solid #ccc; padding: 3px; display: inline-block;}
1336+
13341337
/* Pygments */
13351338
div.highlight pre .hll { background-color: #ffffcc }
13361339
div.highlight pre .c { color: #60a0b0; font-style: italic } /* Comment */

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "readthedocs",
3-
"version": "9.11.0",
3+
"version": "9.12.0",
44
"description": "Read the Docs build dependencies",
55
"author": "Read the Docs, Inc <[email protected]>",
66
"scripts": {

readthedocs/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"""Read the Docs."""
22

33

4-
__version__ = "9.11.0"
4+
__version__ = "9.12.0"

readthedocs/api/mixins.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from readthedocs.core.unresolver import UnresolverError, unresolve
88
from readthedocs.core.utils import get_cache_tag
99
from readthedocs.projects.models import Project
10+
from readthedocs.proxito.cache import add_cache_tags
1011

1112
log = structlog.get_logger(__name__)
1213

@@ -31,7 +32,7 @@ def dispatch(self, request, *args, **kwargs):
3132
response = super().dispatch(request, *args, **kwargs)
3233
cache_tags = self._get_cache_tags()
3334
if cache_tags:
34-
response["Cache-Tag"] = ",".join(cache_tags)
35+
add_cache_tags(response, cache_tags)
3536
return response
3637

3738
def _get_cache_tags(self):

0 commit comments

Comments
 (0)