Skip to content

Commit 09f4d6c

Browse files
committed
Merge branch 'master' into davidfischer/ad-display-when-scrolled
2 parents 2bd9ce5 + 6919611 commit 09f4d6c

30 files changed

+555
-222
lines changed

.circleci/config.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
version: 2.1
2+
3+
jobs:
4+
tests:
5+
docker:
6+
- image: 'cimg/python:3.6'
7+
environment:
8+
TOX_POSARGS: ''
9+
- image: 'docker.elastic.co/elasticsearch/elasticsearch:6.8.12'
10+
name: search
11+
steps:
12+
- checkout
13+
- run: git submodule sync
14+
- run: git submodule update --init
15+
- run: pip install --user tox
16+
- run: tox -e py36,codecov
17+
18+
checks:
19+
docker:
20+
- image: 'cimg/python:3.6'
21+
environment:
22+
NODE_VERSION: 10.17.0
23+
steps:
24+
- checkout
25+
- run: git submodule sync
26+
- run: git submodule update --init
27+
- run: pip install --user tox
28+
- run: scripts/circle/install_node.sh
29+
- run:
30+
name: Add node to the path
31+
command: |
32+
echo 'export PATH=~/.nvm/versions/node/v${NODE_VERSION}/bin:$PATH' >> $BASH_ENV
33+
source $BASH_ENV
34+
- run: tox -e migrations
35+
- run: tox -e lint
36+
- run: tox -e docs-lint
37+
- run: tox -e docs
38+
- run: tox -e eslint
39+
40+
workflows:
41+
version: 2
42+
test:
43+
jobs:
44+
- checks
45+
- tests

.travis.yml

-52
This file was deleted.

CHANGELOG.rst

+25
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
Version 5.6.1
2+
-------------
3+
4+
:Date: October 26, 2020
5+
6+
* `@agjohnson <https://github.com/agjohnson>`__: Bump common to include docker task changes (`#7597 <https://github.com/readthedocs/readthedocs.org/pull/7597>`__)
7+
* `@agjohnson <https://github.com/agjohnson>`__: Default to sphinx theme 0.5.0 when defaulting to latest sphinx (`#7596 <https://github.com/readthedocs/readthedocs.org/pull/7596>`__)
8+
* `@humitos <https://github.com/humitos>`__: Use correct Cache-Tag (CDN) and X-RTD-Project header on subprojects (`#7593 <https://github.com/readthedocs/readthedocs.org/pull/7593>`__)
9+
* `@davidfischer <https://github.com/davidfischer>`__: Ads JS hotfix (`#7586 <https://github.com/readthedocs/readthedocs.org/pull/7586>`__)
10+
* `@agjohnson <https://github.com/agjohnson>`__: Add remoterepo query param (`#7580 <https://github.com/readthedocs/readthedocs.org/pull/7580>`__)
11+
* `@agjohnson <https://github.com/agjohnson>`__: Undeprecate APIv2 in docs (`#7579 <https://github.com/readthedocs/readthedocs.org/pull/7579>`__)
12+
* `@agjohnson <https://github.com/agjohnson>`__: Add settings and docker configuration for working with new theme (`#7578 <https://github.com/readthedocs/readthedocs.org/pull/7578>`__)
13+
* `@stsewd <https://github.com/stsewd>`__: Search: exclude chagelog from results (`#7570 <https://github.com/readthedocs/readthedocs.org/pull/7570>`__)
14+
* `@stsewd <https://github.com/stsewd>`__: Search: better results for single terms (`#7569 <https://github.com/readthedocs/readthedocs.org/pull/7569>`__)
15+
* `@stsewd <https://github.com/stsewd>`__: Search: refactor query objects (`#7568 <https://github.com/readthedocs/readthedocs.org/pull/7568>`__)
16+
* `@humitos <https://github.com/humitos>`__: Add our `readthedocs_processor` data to our notifications (`#7565 <https://github.com/readthedocs/readthedocs.org/pull/7565>`__)
17+
* `@stsewd <https://github.com/stsewd>`__: Update ES to 6.8.12 (`#7559 <https://github.com/readthedocs/readthedocs.org/pull/7559>`__)
18+
* `@stsewd <https://github.com/stsewd>`__: Builds: always install latest version of our sphinx extension (`#7542 <https://github.com/readthedocs/readthedocs.org/pull/7542>`__)
19+
* `@stsewd <https://github.com/stsewd>`__: Bring back project privacy level (`#7525 <https://github.com/readthedocs/readthedocs.org/pull/7525>`__)
20+
* `@ericholscher <https://github.com/ericholscher>`__: Add future default true to Feature flags (`#7524 <https://github.com/readthedocs/readthedocs.org/pull/7524>`__)
21+
* `@stsewd <https://github.com/stsewd>`__: Add feature flag to not install the latest version of pip (`#7522 <https://github.com/readthedocs/readthedocs.org/pull/7522>`__)
22+
* `@davidfischer <https://github.com/davidfischer>`__: No longer proxy RTD ads through RTD servers (`#7506 <https://github.com/readthedocs/readthedocs.org/pull/7506>`__)
23+
* `@stsewd <https://github.com/stsewd>`__: Subprojects: fix form (`#7491 <https://github.com/readthedocs/readthedocs.org/pull/7491>`__)
24+
* `@AvdN <https://github.com/AvdN>`__: correct inconsistent indentation of YAML (`#7459 <https://github.com/readthedocs/readthedocs.org/pull/7459>`__)
25+
126
Version 5.6.0
227
-------------
328

README.rst

+2-3
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,9 @@ when you push to GitHub.
6060
#. All done. Commit away and your project will auto-update.
6161

6262

63-
.. |build-status| image:: https://img.shields.io/travis/readthedocs/readthedocs.org.svg?style=flat
63+
.. |build-status| image:: https://circleci.com/gh/readthedocs/readthedocs.org.svg?style=svg
6464
:alt: build status
65-
:scale: 100%
66-
:target: https://travis-ci.org/readthedocs/readthedocs.org
65+
:target: https://circleci.com/gh/readthedocs/readthedocs.org
6766

6867
.. |docs| image:: https://readthedocs.org/projects/docs/badge/?version=latest
6968
:alt: Documentation Status

docs/api/v2.rst

+13-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
1-
API v2 (deprecated)
2-
===================
1+
API v2
2+
======
33

44
The Read the Docs API uses :abbr:`REST (Representational State Transfer)`.
55
JSON is returned by all API responses including errors
66
and HTTP response status codes are to designate success and failure.
77

8-
.. note::
8+
.. warning::
99

10-
A newer and better API v3 is ready to use.
11-
Some improvements coming in v3 are:
10+
API v2 is planned to be deprecated soon, though we have not yet set a time
11+
frame for deprecation yet. We will alert users with our plans when we do.
12+
13+
For now, API v2 is still used by some legacy application operations still,
14+
but we highly recommend Read the Docs users use :doc:`API v3 </api/v3>`
15+
instead.
16+
17+
Some improvements in :doc:`API v3 </api/v3>` are:
1218

13-
* Simpler URLs which use slugs
1419
* Token based authentication
15-
* Import a new project
16-
* Activate a version
20+
* Easier to use URLs which no longer use numerical ids
21+
* More common user actions are exposed through the API
1722
* Improved error reporting
1823

1924
See its full documentation at :doc:`/api/v3`.

docs/commercial/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ Advertising-free
3535
organizations
3636
single-sign-on
3737
sharing
38+
privacy-level
3839
analytics

docs/commercial/privacy-level.rst

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Project Privacy Level
2+
---------------------
3+
4+
.. note::
5+
6+
This feature only exists on `Read the Docs for Business <https://readthedocs.com/>`__.
7+
8+
By default, only users that belong to your organization can see the dashboard of your project and its builds.
9+
If you want users outside your organization and anonymous users to be able to see the dashboard of your project,
10+
and the build output of *public versions* you can set the privacy level of your project to ``Public``.
11+
12+
- Go the :guilabel:`Admin` tab of your project.
13+
- Click on :guilabel:`Advanced Settings`.
14+
- Change to :guilabel:`Privacy level` to `Public`.
15+
16+
17+
.. note::
18+
19+
To control access to the documentation itself,
20+
see :ref:`versions:privacy levels`.

docs/config-file/v2.rst

+36-36
Original file line numberDiff line numberDiff line change
@@ -114,16 +114,16 @@ Configuration of the Python environment to be used.
114114
version: 2
115115
116116
python:
117-
version: 3.7
118-
install:
119-
- requirements: docs/requirements.txt
120-
- method: pip
121-
path: .
122-
extra_requirements:
123-
- docs
124-
- method: setuptools
125-
path: another/package
126-
system_packages: true
117+
version: 3.7
118+
install:
119+
- requirements: docs/requirements.txt
120+
- method: pip
121+
path: .
122+
extra_requirements:
123+
- docs
124+
- method: setuptools
125+
path: another/package
126+
system_packages: true
127127
128128
python.version
129129
``````````````
@@ -165,10 +165,10 @@ Example:
165165
version: 2
166166
167167
python:
168-
version: 3.7
169-
install:
170-
- requirements: docs/requirements.txt
171-
- requirements: requirements.txt
168+
version: 3.7
169+
install:
170+
- requirements: docs/requirements.txt
171+
- requirements: requirements.txt
172172
173173
.. warning::
174174

@@ -213,14 +213,14 @@ Example:
213213
version: 2
214214
215215
python:
216-
version: 3.7
217-
install:
218-
- method: pip
219-
path: .
220-
extra_requirements:
221-
- docs
222-
- method: setuptools
223-
path: package
216+
version: 3.7
217+
install:
218+
- method: pip
219+
path: .
220+
extra_requirements:
221+
- docs
222+
- method: setuptools
223+
path: package
224224
225225
With the previous settings, Read the Docs will execute the next commands:
226226

@@ -400,8 +400,8 @@ VCS submodules configuration.
400400
401401
submodules:
402402
include:
403-
- one
404-
- two
403+
- one
404+
- two
405405
recursive: true
406406
407407
submodules.include
@@ -465,11 +465,11 @@ Settings for more control over :doc:`/server-side-search`.
465465
version: 2
466466
467467
search:
468-
ranking:
469-
api/v1/*: -1
470-
api/v2/*: 4
471-
ignore:
472-
- 404.html
468+
ranking:
469+
api/v1/*: -1
470+
api/v2/*: 4
471+
ignore:
472+
- 404.html
473473
474474
search.ranking
475475
``````````````
@@ -500,15 +500,15 @@ check :ref:`config-file/v2:search.ignore`.
500500
version: 2
501501
502502
search:
503-
ranking:
504-
# Match a single file
505-
tutorial.html: 2
503+
ranking:
504+
# Match a single file
505+
tutorial.html: 2
506506
507-
# Match all files under the api/v1 directory
508-
api/v1/*: -5
507+
# Match all files under the api/v1 directory
508+
api/v1/*: -5
509509
510-
# Match all files that end with tutorial.html
511-
'*/tutorial.html': 3
510+
# Match all files that end with tutorial.html
511+
'*/tutorial.html': 3
512512
513513
.. note::
514514

docs/versions.rst

+3
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ Private versions are available only to people who have permissions to see them.
111111
They will not display on any list view, and will 404 when you link them to others.
112112
If you want to share your docs temporarily, see :doc:`/commercial/sharing`.
113113

114+
In addition, if you want other users to view the build page of your public versions,
115+
you'll neeed to the set the :doc:`privacy level of your project </commercial/privacy-level>` to public.
116+
114117
Tags and branches
115118
-----------------
116119

readthedocs/api/v2/views/model_views.py

+3
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,9 @@ class RemoteRepositoryViewSet(viewsets.ReadOnlyModelViewSet):
380380

381381
def get_queryset(self):
382382
query = self.model.objects.api(self.request.user)
383+
full_name = self.request.query_params.get('full_name')
384+
if full_name is not None:
385+
query = query.filter(full_name__icontains=full_name)
383386
org = self.request.query_params.get('org', None)
384387
if org is not None:
385388
query = query.filter(organization__pk=org)

readthedocs/doc_builder/python_environments.py

+15-3
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,13 @@ def install_core_requirements(self):
346346

347347
# Install latest pip first,
348348
# so it is used when installing the other requirements.
349-
cmd = pip_install_cmd + ['pip']
349+
pip_version = self.project.get_feature_value(
350+
Feature.DONT_INSTALL_LATEST_PIP,
351+
# 20.3 uses the new resolver by default.
352+
positive='pip<20.3',
353+
negative='pip',
354+
)
355+
cmd = pip_install_cmd + [pip_version]
350356
self.build_env.run(
351357
*cmd, bin_path=self.venv_bin(), cwd=self.checkout_path
352358
)
@@ -380,11 +386,17 @@ def install_core_requirements(self):
380386
positive='sphinx',
381387
negative='sphinx<2',
382388
),
383-
'sphinx-rtd-theme<0.5',
389+
# If defaulting to Sphinx 2+, we need to push the latest theme
390+
# release as well. `<0.5.0` is not compatible with Sphinx 2+
391+
self.project.get_feature_value(
392+
Feature.USE_SPHINX_LATEST,
393+
positive='sphinx-rtd-theme',
394+
negative='sphinx-rtd-theme<0.5',
395+
),
384396
self.project.get_feature_value(
385397
Feature.USE_SPHINX_RTD_EXT_LATEST,
386398
positive='readthedocs-sphinx-ext',
387-
negative='readthedocs-sphinx-ext<1.1',
399+
negative='readthedocs-sphinx-ext<2.2',
388400
),
389401
])
390402

0 commit comments

Comments
 (0)