Skip to content

Commit 04ee3df

Browse files
benjaomingericholscheragjohnson
authored
Docs: Read the Docs for Science - first version landing page in user documentation (#9460)
* Add science chapter * WIP: Updates to Read the Docs for Science, left a few TODOs around * Use sphinx-design :dropdown: instead of term list * Apply suggestions from code review @ericholscher Co-authored-by: Eric Holscher <[email protected]> * Adds sphinx-design to docs.in and run pip-compile * WIP: cards in a grid with logos of cool projects * WIP: Expanding features and adding video * Ignore dropdown for rst-check * Add some missing directives and roles for rstcheck * Added 3 example projects to make the section of logos look pretty * Add a screenshot and a video * Ignore further directives for button-* * More refinements in text and rstcheck * Adds a screenshot (to be improved) with the Edit on Github button * Oh *sigh* merge conflict artifact * A few more refinements of structure and text * Replace button with text link, Expand the SEO feature to generic Search and Analytics and add more description * Center the video * Crop screenshot re: https://github.com/readthedocs/readthedocs.org/pull/9460/files/14c5770e3645bf8eb1a64d295418163342051dc9#diff-27b7d89454610338aba49b760a3126183ee6923631b348f450e3d856da9f3eed * Reduce jupyter logo file size * Apply @agjohnson's code review suggestions Co-authored-by: Anthony <[email protected]> * Remove assumption about reader confusion in language * Update some of the exit-links with a "»" to indicate that this is a "next step" thing * Add note about this page and update video link Co-authored-by: Eric Holscher <[email protected]> Co-authored-by: Anthony <[email protected]>
1 parent a2ca1af commit 04ee3df

11 files changed

+175
-3
lines changed

docs/.rstcheck.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[rstcheck]
2-
ignore_directives=automodule,http:get,tabs,tab,prompt,http:patch,http:post,http:put,http:delete
3-
ignore_roles=djangosetting,setting,featureflags,buildpyversions,external+rtd:doc,external,external+rtd
2+
ignore_directives=automodule,dropdown,grid,http:get,tabs,tab,prompt,http:patch,http:post,http:put,http:delete,button-ref,button-link
3+
ignore_roles=djangosetting,setting,featureflags,buildpyversions,external+rtd:doc,external,external+rtd,external+jupyterbook:doc,external+jupyter:doc
44
ignore_substitutions=org_brand,com_brand,:smile:,:arrows_counterclockwise:,:heavy_plus_sign:,:tada:,:heart:,:pencil2:
55
# This error needs to be ignored for now
66
# See: https://github.com/myint/rstcheck/issues/19

docs/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"sphinx.ext.autodoc",
3535
"sphinx.ext.intersphinx",
3636
"sphinxcontrib.httpdomain",
37+
"sphinxcontrib.video",
3738
"djangodocs",
3839
"doc_extensions",
3940
"sphinx_tabs.tabs",
@@ -42,6 +43,7 @@
4243
"hoverxref.extension",
4344
"sphinx_search.extension",
4445
"sphinxemoji.sphinxemoji",
46+
"sphinx_design",
4547
"myst_parser",
4648
]
4749

@@ -89,9 +91,11 @@
8991
"myst-parser": ("https://myst-parser.readthedocs.io/en/stable/", None),
9092
"writethedocs": ("https://www.writethedocs.org/", None),
9193
"jupyterbook": ("https://jupyterbook.org/en/stable/", None),
94+
"executablebook": ("https://executablebooks.org/en/latest/", None),
9295
"rst-to-myst": ("https://rst-to-myst.readthedocs.io/en/stable/", None),
9396
"rtd": ("https://docs.readthedocs.io/en/stable/", None),
9497
"rtd-dev": ("https://dev.readthedocs.io/en/latest/", None),
98+
"jupyter": ("https://docs.jupyter.org/en/latest/", None),
9599
}
96100
# Redundant in Sphinx 5.0
97101
# https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#confval-intersphinx_disabled_reftypes

docs/user/img/logo_chain_ladder.png

19.8 KB
Loading

docs/user/img/logo_feature_engine.png

32.8 KB
Loading

docs/user/img/logo_jupyter.png

29.1 KB
Loading
31.4 KB
Loading
17.5 KB
Loading

docs/user/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ and how to write successful documentation.
164164
/guides/authors
165165
/guides/administrators
166166
/guides/developers
167+
/science
167168
/examples
168169

169170
Advanced features of Read the Docs

docs/user/science.rst

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
Read the Docs for Science
2+
=========================
3+
4+
.. 2022-08-10
5+
.. Notes about this section:
6+
..
7+
.. This section is intended as a "landing page", meaning that we will allow to
8+
.. mix messages in a pragmatic way UNTIL a permanent location for this landing
9+
.. page is found outside of the RTD User Documentation project.
10+
.. more discussion: https://github.com/readthedocs/readthedocs.org/pull/9460/
11+
..
12+
.. The main ways that the page will be improved are:
13+
.. - Add more focus to documentation perspectives
14+
.. - Move all descriptions of "benefits", i.e. marketing to a separate location
15+
.. - Likely stop using the dropdown element
16+
.. - Continue to function as a "landing" page, but a landing page for
17+
.. documentation resources for scientific/academic projects.
18+
19+
Documentation and technical writing are broad fields.
20+
Their tools and practices have grown relevant to most scientific activities.
21+
This includes building publications, books, educational resources, interactive data science, resources for data journalism and full-scale websites for research projects and courses.
22+
23+
Let's explore the overlap of features for software documentation and academic writing.
24+
Here's a brief overview of some :doc:`features <features>` that people in science and academic writing love about Read the Docs:
25+
26+
.. dropdown:: 🪄 Easy to use
27+
:open:
28+
29+
Documentation code doesn't have to be written by a programmer. In fact, documentation coding languages are designed and developed so you don't have to be a programmer, and there are many writing aids that makes it easy to abstract from code and focus on content.
30+
31+
Getting started is also made easy:
32+
33+
* All new to this? Take the official :external+jupyterbook:doc:`Jupyter Book Tutorial <start/your-first-book>`
34+
* Curious for practical code? See :doc:`/examples`
35+
* Familiar with Sphinx? See :doc:`/guides/jupyter`
36+
37+
.. dropdown:: 🔋 Batteries included: Graphs, computations, formulas, maps, diagrams and more
38+
39+
Take full advantage of getting all the richness of :external+jupyter:doc:`Jupyter Notebook <index>` combined with Sphinx and the giant ecosystem of extensions for both of these.
40+
41+
Here are some examples:
42+
43+
* Use symbols familiar from math and physics, build advanced proofs. See also: `sphinx-proof <https://sphinx-proof.readthedocs.io/en/latest/syntax.html>`__
44+
* Present results with plots, graphs, images and let users interact directly with your datasets and algorithms. See also: `Matplotlib <https://matplotlib.org/stable/tutorials/introductory/usage.html>`__, `Interactive Data Visualizations <https://jupyterbook.org/en/stable/interactive/interactive.html>`__
45+
* Graphs, tables etc. are computed when the latest version of your project is built and published as a stand-alone website. All code examples on your website are validated each time you build.
46+
47+
.. dropdown:: 📚 Bibliographies and external links
48+
49+
Maintain bibliography databases directly as code and have external links automatically verified.
50+
51+
Using extensions for Sphinx such as the popular `sphinxcontrib-bibtex <https://sphinxcontrib-bibtex.readthedocs.io/>`__ extension, you can maintain your bibliography with Sphinx directly or refer to entries ``.bib`` files, as well as generating entire Bibliography sections from those files.
52+
53+
.. dropdown:: 📜 Modern themes and classic PDF outputs
54+
55+
.. figure:: /img/screenshot_rtd_downloads.png
56+
:align: right
57+
58+
Use the latest state-of-the-art themes for web and have PDFs and e-book formats automatically generated.
59+
60+
New themes are improving every day, and when you write documentation based on Jupyter Book and Sphinx, you will separate your contents and semantics from your presentation logic. This way, you can keep up with the latest theme updates or try new themes.
61+
62+
Another example of the benefits from separating content and presentation logic: Your documentation also transforms into printable books and eBooks.
63+
64+
.. dropdown:: 📐 Widgets, widgets and more widgets
65+
66+
Design your science project's layout and components with widgets from a rich eco-system of open-source extensions built for many purposes. Special widgets help users display and interact with graphs, maps and more. :external+jupyterbook:doc:`Several <content/components>` `extensions <https://sphinx-gallery.github.io/>`__ are built and invented by the science community.
67+
68+
.. dropdown:: ⚙️ Automatic builds
69+
70+
Build and publish your project for every change made through Git (GitHub, GitLab, Bitbucket etc). Preview changes via pull requests. Receive notifications when something is wrong. How does this work? Have a look at this video:
71+
72+
.. video:: https://anti-pattern-sphinx-video-downloader.readthedocs.io/_static/videos/enable-pull-request-builders.mp4
73+
:width: 100%
74+
:height: 300
75+
76+
.. dropdown:: 💬 Collaboration and community
77+
78+
.. figure:: /img/screenshot_edit_on_github.png
79+
:align: right
80+
81+
Science and academia have a big kinship with software developers: We ❤️ community. Our solutions and projects become better when we foster inclusivity and active participation. Read the Docs features easy access for readers to suggest changes via your git platform (GitHub, GitLab, Bitbucket etc.). But not just any unqualified feedback. Instead, the *code* and all the tools are available for your community to forge qualified contributions.
82+
83+
Your readers can become your co-authors!
84+
85+
Discuss changes via pull request and track all changes in your project's version history.
86+
87+
Using git does not mean that anyone can go and change your code and your published project. The full ownership and permission handling remains in your hands. Project and organization owners on your git platform govern what is released and who has access to approve and build changes.
88+
89+
.. dropdown:: 🔎 Full search and analytics
90+
91+
Read the Docs comes with a number of features bundled in that you would have to configure if you were hosting documentation elsewhere.
92+
93+
Super-fast text search
94+
Your documentation is automatically indexed and gets its own search function.
95+
96+
Traffic statistics
97+
Have full access to your traffic data and have quick access to see which of your pages are most popular.
98+
99+
Search analytics
100+
What are people searching for and do they get hits? From each search query in your documentation, we collect a neat little statistic that can help to improve the discoverability and relevance of your documentation.
101+
102+
SEO - Don't reinvent Search Engine Optimization
103+
Use built-in SEO best-practices from Sphinx, its themes and Read the Docs hosting. This can give you a good ranking on search engines as a direct outcome of simply writing and publishing your documentation project.
104+
105+
.. dropdown:: 🌱 Grow your own solutions
106+
107+
The eco-system is open source and makes it accessible for anyone with Python skills to build their own extensions.
108+
109+
We want science communities to use Read the Docs and to be part of the documentation community 💞
110+
111+
Getting started: Jupyter Book
112+
-----------------------------
113+
114+
:external+jupyterbook:doc:`Jupyter Book <intro>` on Read the Docs brings you the rich experience of computated `Jupyter <https://jupyter.org/>`__ documents built together with a modern documentation tool. The results are beautiful and automatically deployed websites, built with Sphinx and :doc:`Executable Book <executablebook:index>` + all the extensions available in this ecosystem.
115+
116+
Here are some popular activities that are well-supported by Jupyter Book:
117+
118+
* Publications and books
119+
* Course and research websites
120+
* Interactive classroom activities
121+
* Data science software documentation
122+
123+
124+
:doc:`Visit the gallery of solutions built with Jupyter Book » <executablebook:gallery>`
125+
126+
127+
Ready to get started?
128+
"""""""""""""""""""""
129+
130+
.. Note that this is a deliberate repitition of a previous segment. Should it repeat? Maybe not, but for now it's nice to be sure that people see it.
131+
132+
* All new to this? Take the official :external+jupyterbook:doc:`Jupyter Book Tutorial » <start/your-first-book>`
133+
* Curious for practical code? See the list of :doc:`Example Projects » </examples>`
134+
* Familiar with Sphinx? Read :doc:`How to use Jupyter notebooks in Sphinx » </guides/jupyter>`
135+
136+
137+
Examples and users
138+
""""""""""""""""""
139+
140+
.. TODO: get the correct link for
141+
.. :external+jupyter:ref:`the many sub-projects of Jupyter <index.md#sub-project-documentation>`
142+
143+
Read the Docs community for science is already big and keeps growing. The :external+jupyter:doc:`Jupyter Project <index>` itself and `the many sub-projects of Jupyter <https://docs.jupyter.org/en/latest/#sub-project-documentation>`__ are built and published with Read the Docs.
144+
145+
.. grid:: 3
146+
:gutter: 2
147+
:padding: 0
148+
149+
.. grid-item-card:: Jupyter Project Documentation
150+
:img-top: img/logo_jupyter.png
151+
:link: https://docs.jupyter.org/
152+
153+
.. grid-item-card:: Chainladder - Property and Casualty Loss Reserving in Python
154+
:img-top: img/logo_chain_ladder.png
155+
:link: https://chainladder-python.readthedocs.io/
156+
157+
.. grid-item-card:: Feature-engine - A Python library for Feature Engineering and Selection
158+
:img-top: img/logo_feature_engine.png
159+
:link: https://feature-engine.readthedocs.io/en/latest/
160+
161+
.. Let's put some logos to sign off

requirements/docs.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Pygments==2.12.0
66
sphinx_rtd_theme==1.0.0
77
sphinx-tabs==3.3.1
88
sphinx-intl==2.0.1
9+
sphinx-design==0.2.0
910
sphinx-multiproject==1.0.0rc1
1011
readthedocs-sphinx-search==0.1.1
1112

requirements/docs.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# pyup: ignore file
21
#
32
# This file is autogenerated by pip-compile with python 3.10
43
# To update, run:
@@ -81,6 +80,8 @@ sphinx==4.5.0
8180
# -r docs.in
8281
# myst-parser
8382
# sphinx-autobuild
83+
# sphinx-design
84+
# sphinx-hoverxref
8485
# sphinx-intl
8586
# sphinx-prompt
8687
# sphinx-rtd-theme
@@ -89,6 +90,8 @@ sphinx==4.5.0
8990
# sphinxemoji
9091
sphinx-autobuild==2021.3.14
9192
# via -r docs.in
93+
sphinx-design==0.2.0
94+
# via -r docs.in
9295
sphinx-hoverxref @ git+https://github.com/readthedocs/sphinx-hoverxref
9396
# via -r docs.in
9497
sphinx-intl==2.0.1
@@ -132,3 +135,5 @@ urllib3==1.26.9
132135

133136
# The following packages are considered to be unsafe in a requirements file:
134137
# setuptools
138+
139+
sphinxcontrib-video @ git+https://github.com/readthedocs/sphinxcontrib-video/

0 commit comments

Comments
 (0)