-
-
Notifications
You must be signed in to change notification settings - Fork 253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update stochastic volatility notebook for best practices #378
Update stochastic volatility notebook for best practices #378
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
I had trouble finding out who was the original author of this notebook since it's been around for awhile - any ideas? |
Fixing dashes in reference entry Removing extra lines from reference bib file
7580644
to
7a0f349
Compare
Author is me if I remember correctly. |
I think you need to remove and recreate the myst file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! I left some comments regarding style and use of sphinx features
I have reviewed on the myst because I find it much easier and comfortable, but I'd recommend making the changes on the notebook and letting jupytext update the myst one.
--- | ||
|
||
(notebook_name)= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not use notebook_name
literally: https://docs.pymc.io/en/latest/contributing/jupyter_style.html#first-cell
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oof, that was a big oversight.
:::{post} June 17, 2022 | ||
:tags: time series | ||
:category: basic | ||
:author: Thomas Wiecki |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everyone who appears on the authorship section (except those that have only re-executed the notebook) should appear here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This brings up an interesting issue because there is extensive history on this notebook stretching back to its .py
incarnation, with multiple people making multiple edits over time. I've got a new author list at the Authors
section at the end of this notebook - does that format look acceptable?
For more recent edits, I've tried to explicitly point out the PR while for those that edited multiple times, I was less specific.
1. Hoffman & Gelman. (2011). [The No-U-Turn Sampler: Adaptively Setting Path Lengths in Hamiltonian Monte Carlo](http://arxiv.org/abs/1111.4246). | ||
:::{bibliography} | ||
:filter: docname in docnames | ||
::: | ||
|
||
```{code-cell} ipython3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be a markdown cell with the "watermark" title before this code cell: https://docs.pymc.io/en/latest/contributing/jupyter_style.html#watermark
|
||
+++ | ||
|
||
* Written by Thomas Wiecki in 2013 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notebook seems to have been created in pymc-devs/pymc@f76a6b1 from the already existing pyhton script with that example. The python script looks like it was introduced in pymc-devs/pymc@2fe6e88
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for tracking down the history! Did you find it just by going to an older version of pymc
and then looking at the history from there? Or is there a trick to viewing the file history back to 2013 on GitHub from within the pymc-examples
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Went to pymc repo and searched "stochastic volatility" on the PR tab, opened the oldest one and clicked on "browse files" or something like that which brought me to the right notebook already around 2013, then checked the history of that file to find the first commit I linked. From there I checked the history of the python script to find the 2nd commit I linked. I hope that makes sense, seeing it written sounds super complicated but it took longer to write this down than it took to do the actual thing 😅
* Bring stochastic volatility notebook in line with style guide Fixing dashes in reference entry Removing extra lines from reference bib file * Adding original author information to stochastic volatility notebook * Adding updated myst file * Fixing misspecified tags and updating author list * Update stochastic_volatility.myst.md
This PR updates the stochastic volatility example notebook to include some recommended updates from the style guide and addresses #60