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
+13-9Lines changed: 13 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -488,19 +488,24 @@ extra_bibtex_id_2
488
488
```
489
489
490
490
## Watermark
491
-
Once you're finished with your NB, add a very last cell with [the watermark package](https://github.com/rasbt/watermark). This will automatically print the versions of Python and the packages you used to run the NB -- reproducibility rocks! Here is some example code. Note that the `-p` argument may not be necessary (or it may need to have different libraries as input), but all the other arguments must be present.
491
+
492
+
[`watermark`](https://github.com/rasbt/watermark) is a library which automatically prints the versions of Python and the packages you used to run the NB -- reproducibility rocks!
493
+
494
+
This library should be in your virtual environment if you installed our `requirements-dev.txt`. Otherwise, run `pip install watermark`.
495
+
496
+
First, add a Markdown cell with the `## Watermark` title only so it appears in the table of contents. This is the second to last section, above the epilogue/footer. Then, add a code cell to print the versions of Python and packages used in the notebook. This is the last *code* cell in the notebook.
497
+
498
+
The `p` flag is optional (or it may need to have different libraries as input), but should be added if Aesara or xarray are not imported explicitly. This will also be checked by `pre-commit` (because we all forget to do things sometimes 😳).
499
+
500
+
```markdown
501
+
## Watermark
502
+
```
492
503
493
504
```python
494
505
%load_ext watermark
495
506
%watermark -n -u -v -iv -w -p aesara,aeppl,xarray
496
507
```
497
508
498
-
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.
499
-
500
-
`watermark` should be in your virtual environment if you installed our `requirements-dev.txt`.
501
-
Otherwise, just run `pip install watermark`.
502
-
The `p` flag is optional but should be added if Aesara or xarray are not imported explicitly.
503
-
This will also be checked by `pre-commit` (because we all forget to do things sometimes 😳).
504
509
505
510
## Epilogue
506
511
The last cell in the notebooks should be a markdown cell with exactly the following content:
@@ -515,5 +520,4 @@ update the path to page footer for the include to work.
515
520
516
521
---
517
522
518
-
You're all set now 🎉 You can push your changes, open a pull request, and, once it's merged, rest with the feeling of a job well done 👏
519
-
Thanks a lot for your contribution to open-source, we really appreciate it!
523
+
You're all set now 🎉. You can push your changes, open a pull request, and, once it's merged, rest with the feeling of a job well done 👏. Thanks a lot for your contribution to open-source, we really appreciate it!
0 commit comments