-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Move from nbsphinx to myst-nb #4759
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
Conversation
How do I get pre-commit to be happy with me changing the development dependencies? |
PR is now ready to test! As this has significant changes to doc building process, which is not covered anywhere by CI, it has to be tested locally by building the documentation and making sure everything works. This only modifies how docs are build, so they should look the same and have the same pages as the published website (except for differences between v3 and v4 like theano renamed to aesara and so on). I have tested locally and everything works, but someone else should do too and then merge |
@ricardoV94 shoud be ready to merge now. For everyone else, it works and notebooks are rendered, but some of the css is not compatible with the current theme, so images are not shrinked and look way to large and other technically correct yet unpleasant rendering. I propose to not cherry pick that onto v3 unless necessary. i.e. we start using cool sphinx features in ~2-3 weeks but still have to make a 3.11.4 release 2 months from now. If that were to happen we'd have to build the docs from an old commit in pymc-examples or use myst and get ugly notebooks. |
Looking at this now. |
It builds without error for me, but the examples and tutorials pages are blank, so I'm doing something wrong. I've cloned the pymc-examples submodule and run |
Have you opened the html file or have you use We went over the whole doc building process yesterday with @ricardoV94, who might be able to document it? |
Yeah, this is running the webserver. The console is showing some file errors:
The docs build completed without error, but I will go back and scan the output for any clues. |
There are some warnings that may be relevant.
I must have missed a step. Maybe I should wait for the doc build process documentation that you mentioned. Here's what I did:
|
These steps should be enough 🤔 Inside the html folder, do you have a These 2 sphinx warnings look like an error generated when restructuring the notebooks. They all used to be in the I have no idea what to make of the other server warnings though |
Yes, the The |
What do you have inside the |
Something went wrong at some point, I see different files and many more images |
This occurs both on Linux and Mac for me, so it is not unique to one platform/environment. |
Solved the issue by running the script a second time. |
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.
Curious to see how this myst-nb
will play out in practice!
@OriolAbril delete the docs branch? |
My plan is to first make this change, which will work once the widget issue in
pymc-devs/pymc-examples#83 is fixed, @chiral-carbon will
send a PR for this at some point tomorrow. Moving from nbsphinx to myst-nb will allow us
to use all sphinx features from within markdown. Therefore, if we write a glossary,
we'll be able to link to terms defined there with
{term}`RV`
from within any markdown cellin notebooks, we'll be able to link to respective api docs with
{func}`pymc3.to_inference_data`
or{class}`pymc3.Normal`
, to define anchors with(anchor_name)=
and reference them with{ref}`anchor_name`
and so on.After that, I will also change the theme to pydata-sphinx-theme, like pandas and ArviZ. Note that
both changes are independent and we could do only one without the other, which is why I'm doing two
separate PRs. I think it would be great to change the appearance of the docs with 4.0, but
it would still be good to have myst already in v3 so we can start using it in pymc-examples without
breaking anything. We can then cherry pick this one onto v4 but not port the theme one.
cc @martinacantaro @ricardoV94