Skip to content

Commit 01ed358

Browse files
minor doc fixes (#5224)
* minor fixes to docs * try fixing pymc-lab logo * set first cell language to markdown * make homepage buttons larger * fix sponsor images * Update docs/source/contributing/jupyter_style.md Co-authored-by: Martina Cantaro <[email protected]> Co-authored-by: Martina Cantaro <[email protected]>
1 parent e709c2c commit 01ed358

File tree

3 files changed

+25
-11
lines changed

3 files changed

+25
-11
lines changed

docs/source/conf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,9 @@
4444
"IPython.sphinxext.ipython_console_highlighting",
4545
"IPython.sphinxext.ipython_directive",
4646
"sphinx.ext.autosectionlabel",
47-
"sphinx.ext.napoleon",
4847
"myst_nb",
4948
"sphinx_design",
5049
"notfound.extension",
51-
"sphinx_design",
5250
"sphinx_copybutton",
5351
]
5452

@@ -232,7 +230,7 @@
232230
# Add any paths that contain custom static files (such as style sheets) here,
233231
# relative to this directory. They are copied after the builtin static files,
234232
# so a file named "default.css" will overwrite the builtin "default.css".
235-
# html_static_path = ["_static", "nb_tutorials/_images", "nb_examples/_images"]
233+
html_static_path = ["../logos"]
236234

237235
# Add any extra paths that contain custom files (such as robots.txt or
238236
# .htaccess) here, relative to this directory. These files are copied

docs/source/contributing/jupyter_style.md

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,14 @@ the repository where the notebook is in (pymc or pymc-examples).
2929
* When using non meaningful names such as single letters, add bullet points with a 1-2 sentence description of each variable below the equation where they are first introduced.
3030

3131

32-
## Post directive
33-
The first cell of all example notebooks should have a level 1 markdown title (that is a title with a single `#`) followed by the post directive. The syntax of the post directive is as follows:
32+
## First cell
33+
The first cell of all example notebooks should have a MyST target, a level 1 markdown title (that is a title with a single `#`) followed by the post directive.
34+
The syntax is as follows:
35+
36+
```markdown
37+
(notebook_id)=
38+
# Notebook Title
3439

35-
```
3640
:::{post} Aug 31, 2021
3741
:tags: tag1, tag2, tags can have spaces, tag4
3842
:category: level
@@ -42,15 +46,22 @@ The first cell of all example notebooks should have a level 1 markdown title (th
4246

4347
The date should correspond to the latest update/execution date, at least roughly (it's not a problem if the date is a few days off due to the review process before merging the PR). This will allow users to see which notebooks have been updated lately and will help the PyMC team make sure no notebook is left outdated for too long.
4448

45-
Tags can be anything, but we ask you to try to use [existing tags](https://github.com/pymc-devs/pymc/wiki/Categories-and-Tags-for-PyMC-Examples) to avoid the tag list from getting too long. Each notebook should
46-
have a single category indicating the level of the notebook. Choose a category from [existing categories](https://github.com/pymc-devs/pymc/wiki/Categories-and-Tags-for-PyMC-Examples#categories).
49+
The [MyST target](https://myst-parser.readthedocs.io/en/latest/syntax/syntax.html#targets-and-cross-referencing)
50+
is important to ease referencing and linking notebooks between each other.
51+
52+
Tags can be anything, but we ask you to try to use [existing tags](https://github.com/pymc-devs/pymc/wiki/Categories-and-Tags-for-PyMC-Examples)
53+
to avoid the tag list from getting too long.
54+
55+
Each notebook should have a single category indicating the level of the notebook.
56+
Choose a category from [existing categories](https://github.com/pymc-devs/pymc/wiki/Categories-and-Tags-for-PyMC-Examples#categories).
4757

4858
Authors should list people who authored, adapted or updated the notebook. See {ref}`jupyter_authors`
4959
for more details.
5060

5161
## Code preamble
5262

53-
In a cell just below the cell where you imported matplotlib (usually the first one), set the ArviZ style to darkgrid (this has to be in another cell than the MPL import because of the way MPL sets its defaults):
63+
In a cell just below the cell where you imported matplotlib and/or ArviZ (usually the first one),
64+
set the ArviZ style to darkgrid (this has to be in another cell than the matplotlib import because of the way matplotlib sets its defaults):
5465

5566
```python
5667
RANDOM_SEED = 8927
@@ -122,6 +133,7 @@ and `<date>` should preferably be month and year.
122133

123134
authored
124135
: for notebooks created specifically for pymc-examples
136+
125137
adapted
126138
: for notebooks adapted from other sources such as books or blogposts.
127139
It will therefore follow a different structure than the example above
@@ -130,9 +142,11 @@ adapted
130142
```markdown
131143
Adapted from Alice's [blogpost](blog.alice.com) by Bob and Carol on ...
132144
```
145+
133146
re-executed
134147
: for notebooks re-executed with a newer PyMC version without significant changes to the code.
135148
It can also mention the PyMC version used to run the notebook.
149+
136150
updated
137151
: for notebooks that have not only been re-executed but have also had significant updates to
138152
their content (either code, explanations or both).

docs/source/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Probabilistic Programming in Python
1919
:::{button-ref} learning
2020
:color: primary
2121
:ref-type: ref
22+
:class: sd-fs-2 sd-px-5
2223

2324
Get started!
2425
:::
@@ -94,6 +95,7 @@ PyMC is a non-profit project under NumFOCUS umbrella. If you value PyMC and want
9495
::::{div} sd-d-flex-row sd-align-major-center
9596
:::{button-link} https://numfocus.org/donate-to-pymc3
9697
:color: secondary
98+
:class: sd-fs-2 sd-px-5
9799

98100

99101
Donate
@@ -108,13 +110,13 @@ Donate
108110
:::
109111

110112
:::{grid-item-card}
111-
:img-background: https://www.numfocus.org/wp-content/uploads/2017/07/NumFocus_LRG.png
113+
:img-background: _static/sponsors/numfocus.png
112114
:link: https://numfocus.org/
113115
:shadow: none
114116
:::
115117

116118
:::{grid-item-card}
117-
:img-background: https://github.com/pymc-devs/pymc/raw/main/docs/pymc-labs-logo.png
119+
:img-background: _static/sponsors/pymc-labs.png
118120
:link: https://www.pymc-labs.io/
119121
:shadow: none
120122
:::

0 commit comments

Comments
 (0)