Skip to content

Commit c0ad809

Browse files
authored
Merge branch 'master' into humitos/use-mamba-for-conda-environment
2 parents d34b8d0 + 8118908 commit c0ad809

File tree

438 files changed

+21740
-9992
lines changed

Some content is hidden

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

438 files changed

+21740
-9992
lines changed

.circleci/config.yml

Lines changed: 45 additions & 0 deletions
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

.readthedocs.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,19 @@ formats: all
33
sphinx:
44
configuration: docs/conf.py
55
python:
6-
install:
7-
- requirements: requirements/local-docs-build.txt
6+
install:
7+
- requirements: requirements/pip.txt
8+
- requirements: requirements/docs.txt
9+
10+
search:
11+
ranking:
12+
# Deprecated content
13+
api/v1.html: -1
14+
config-file/v1.html: -1
15+
16+
# Internal documentation
17+
development/design/*: -5
18+
19+
# Useful content, but not something we want most users finding
20+
custom_installs/*: -6
21+
changelog.html: -6

.travis.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

CHANGELOG.rst

Lines changed: 756 additions & 50 deletions
Large diffs are not rendered by default.

README.rst

Lines changed: 3 additions & 4 deletions
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
@@ -78,6 +77,6 @@ when you push to GitHub.
7877
License
7978
-------
8079

81-
`MIT`_ © 2010-2019 Read the Docs, Inc & contributors
80+
`MIT`_ © 2010-2020 Read the Docs, Inc & contributors
8281

8382
.. _MIT: LICENSE

docker-compose.override.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ services:
8484
image: microsoft/azure-cli
8585
volumes:
8686
- ${PWD}/common/dockerfiles/scripts/create-containers.sh:/usr/local/bin/create-containers.sh
87+
environment:
88+
- INIT=${INIT:-}
8789
links:
8890
- storage
8991
depends_on:

dockerfiles/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ RUN ln -s /usr/bin/python3 /usr/bin/python
3939

4040
WORKDIR /tmp
4141

42-
RUN curl -O https://raw.githubusercontent.com/readthedocs/readthedocs.org/master/requirements/pip.txt
43-
RUN curl -O https://raw.githubusercontent.com/readthedocs/readthedocs.org/master/requirements/docker.txt
42+
COPY requirements/pip.txt pip.txt
43+
COPY requirements/docker.txt docker.txt
4444
RUN pip3 install --no-cache-dir -r docker.txt
4545

4646
# Install readthedocs-ext only if GITHUB_TOKEN is provided
@@ -49,6 +49,8 @@ RUN if [ -n "$GITHUB_TOKEN" ] ; \
4949
then \
5050
git clone --depth 1 https://${GITHUB_TOKEN}@github.com/readthedocs/readthedocs-ext ; \
5151
pip3 install --no-cache-dir -e readthedocs-ext ; \
52+
git clone --depth 1 https://${GITHUB_TOKEN}@github.com/readthedocs/ext-theme ; \
53+
pip3 install --no-cache-dir -e ext-theme ; \
5254
fi
5355

5456
WORKDIR /usr/src/app/checkouts/readthedocs.org

dockerfiles/nginx/proxito.conf

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ server {
2424
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
2525
proxy_set_header X-Forwarded-Host $host;
2626

27-
proxy_intercept_errors on;
28-
error_page 404 = @proxito404;
27+
proxy_intercept_errors on;
28+
error_page 404 = @notfoundfallback;
2929

3030
add_header X-Served Django-Proxito always;
3131
}
@@ -56,8 +56,16 @@ server {
5656
add_header X-RTD-Path $rtd_path always;
5757
set $rtd_domain $upstream_http_x_rtd_domain;
5858
add_header X-RTD-Domain $rtd_domain always;
59-
set $rtd_method $upstream_http_x_rtd_version_method;
60-
add_header X-RTD-Version-Method $rtd_method always;
59+
set $rtd_version_method $upstream_http_x_rtd_version_method;
60+
add_header X-RTD-Version-Method $rtd_version_method always;
61+
set $rtd_project_method $upstream_http_x_rtd_project_method;
62+
add_header X-RTD-Project-Method $rtd_project_method always;
63+
set $rtd_redirect $upstream_http_x_rtd_redirect;
64+
add_header X-RTD-Redirect $rtd_redirect always;
65+
set $cache_tag $upstream_http_cache_tag;
66+
add_header Cache-Tag $cache_tag always;
67+
set $referrer_policy $upstream_http_referrer_policy;
68+
add_header Referrer-Policy $referrer_policy always;
6169
}
6270

6371
# Serve 404 pages here

dockerfiles/nginx/web.conf

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@ server {
99
break;
1010
}
1111

12-
# FIXME: this is a workaround because CORS on the storage.
13-
# The command to enable it is failing without reason:
14-
# pip install azure-cli
15-
# AZURE_STORAGE_CONNECTION_STRING="UseDevelopmentStorage=true" az storage cors add --origins 'community.dev.readthedocs.io' --services 'b' --methods GET OPTIONS HEAD --allowed-headers '*'
16-
location /devstoreaccount1 {
17-
proxy_pass http://storage:10000$request_uri;
18-
}
19-
2012
location / {
2113
proxy_pass http://web:8000/;
2214
proxy_set_header X-Forwarded-Host $host;

dockerfiles/settings/web.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22

33

44
class WebDevSettings(DockerBaseSettings):
5-
pass
5+
6+
# Router is useful from webs only because they have access to the database.
7+
# Builders will use the same queue that was assigned the first time on retry
8+
CELERY_ROUTES = (
9+
'readthedocs.builds.tasks.TaskRouter',
10+
)
611

712

813
WebDevSettings.load_settings(__name__)

docs/.rstcheck.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[rstcheck]
22
ignore_directives=automodule,http:get,tabs,tab,prompt,http:patch,http:post,http:put,http:delete
33
ignore_roles=djangosetting,setting,featureflags,buildpyversions
4+
ignore_substitutions=org_brand,com_brand,:smile:
45
# This error needs to be ignored for now
56
# See: https://github.com/myint/rstcheck/issues/19
67
ignore_messages=(Hyperlink target ".*" is not referenced)

docs/_ext/djangodocs.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@ def setup(app):
44
rolename="setting",
55
indextemplate="pair: %s; setting",
66
)
7+
8+
return {
9+
'version': 'builtin',
10+
'parallel_read_safe': True,
11+
'parallel_write_safe': True,
12+
}
Loading
Loading
Binary file not shown.
Loading
248 KB
Loading

docs/_static/js/expand_tabs.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/*
2+
* Expands a specific tab of sphinx-tabs.
3+
* Usage:
4+
* - docs.readthedocs.io/?tab=Name
5+
* - docs.readthedocs.io/?tab=Name#section
6+
* Where 'Name' is the title of the tab (case sensitive).
7+
*/
8+
$( document ).ready(function() {
9+
const urlParams = new URLSearchParams(window.location.search);
10+
const tabName = urlParams.get('tab');
11+
if (tabName !== null) {
12+
const tab = $('a.item > div:contains("' + tabName + '")');
13+
if (tab.length > 0) {
14+
tab.click();
15+
}
16+
}
17+
});

docs/about.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
About Read the Docs
2+
===================
3+
4+
Read the Docs is a C Corporation registered in Oregon.
5+
Our bootstrapped company is owned and fully controlled by the founders,
6+
and fully funded by our customers and advertisers.
7+
This allows us to **focus 100% on our users**.
8+
9+
We have two main sources of revenue:
10+
11+
* |com_brand| - where we `provide <https://readthedocs.com>`__ a valuable paid service to companies.
12+
* |org_brand| - where we provide a free service to the open source community, funded via :doc:`/advertising/ethical-advertising`.
13+
14+
We believe that having both paying customers and ethical advertising is the best way to create a sustainable platform for our users.
15+
We have built something that we expect to last a long time,
16+
and we are able to make decisions based only on the best interest of our community and customers.
17+
18+
All of the source code for Read the Docs is open source.
19+
You are welcome to :doc:`contribute </contribute>` the features you want or run your own instance.
20+
We should note that we generally only support our hosted versions as a matter of :doc:`our philosophy </open-source-philosophy>`.
21+
22+
We owe a great deal to the open source community that we are a part of,
23+
so we provide free ads via our :ref:`community ads <advertising/ethical-advertising:Community Ads>` program.
24+
This allows us to give back to the communities and projects that we support and depend on.
25+
26+
We are proud about the way we manage our company and products,
27+
and are glad to have you on board with us in this :doc:`great documentation journey </story>`.

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: 11 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

@@ -118,6 +124,9 @@ These steps apply both to analytics collected by Read the Docs and when
118124
* Users can opt-out of analytics by using the Do Not Track feature of their browser.
119125
* Read the Docs instructs Google to anonymize IP addresses sent to them.
120126
* The cookies set by GA expire in 30 days rather than the default 2 years.
127+
* Project maintainers can completely disable analytics on their own projects.
128+
Follow the steps in :ref:`guides/google-analytics:Disabling Google Analytics on your project`.
129+
121130

122131
Why we use analytics
123132
~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)