You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/contributing/jupyter_style.md
+10-6Lines changed: 10 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ the repository where the notebook is in (pymc or pymc-examples).
31
31
Choosing variable names can sometimes be difficult, tedious or annoying.
32
32
In case it helps, the dropdown below has some suggestions so you can focus on writing the actual content
33
33
34
-
::::::{dropdown} Variable name suggestions
34
+
:::::::{dropdown} Variable name suggestions
35
35
:icon: light-bulb
36
36
37
37
**Models and sampling results**
@@ -76,7 +76,8 @@ In case it helps, the dropdown below has some suggestions so you can focus on wr
76
76
77
77
::::{tab-set}
78
78
:::{tab-item} Local `ax` variables
79
-
```
79
+
```{code-block} python
80
+
:emphasize-lines: 3, 7
80
81
fig, axs = pyplot.subplots()
81
82
82
83
ax = axs[0, 1]
@@ -126,7 +127,8 @@ In case it helps, the dropdown below has some suggestions so you can focus on wr
126
127
* When looping, if you need to store a variable after subsetting with the loop index,
127
128
append the index variable used for looping to the original variable name:
128
129
129
-
```
130
+
```{code-block} python
131
+
:emphasize-lines: 4, 6
130
132
variable = np.array(...)
131
133
x = np.array(...)
132
134
for i in range(N):
@@ -136,7 +138,7 @@ In case it helps, the dropdown below has some suggestions so you can focus on wr
136
138
...
137
139
```
138
140
139
-
::::::
141
+
:::::::
140
142
141
143
## First cell
142
144
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.
@@ -437,12 +439,14 @@ Once you're finished with your NB, add a very last cell with [the watermark pack
437
439
438
440
```python
439
441
%load_ext watermark
440
-
%watermark -n -u -v -iv -w -p theano,xarray
442
+
%watermark -n -u -v -iv -w -p aesara,xarray
441
443
```
442
444
443
445
This second to last code cell should be preceded by a markdown cell with the `## Watermark` title only so it appears in the table of contents.
444
446
445
-
`watermark` should be in your virtual environment if you installed our `requirements-dev.txt`. Otherwise, just run `pip install watermark`. The `p` flag is optional but should be added if Theano (or Aesara if in `v4`) or xarray are not imported explicitly.
447
+
`watermark` should be in your virtual environment if you installed our `requirements-dev.txt`.
448
+
Otherwise, just run `pip install watermark`.
449
+
The `p` flag is optional but should be added if Aesara or xarray are not imported explicitly.
446
450
This will also be checked by `pre-commit` (because we all forget to do things sometimes 😳).
0 commit comments