ProjectPythia / cookbook-template

Project Pythia Cookbook template
https://projectpythia.org/cookbook-template/
Apache License 2.0
21 stars 16 forks source link

Jupyter book build issue - causing nightly build to fail #160

Closed rmshkv closed 3 months ago

rmshkv commented 4 months ago

In the nightly build in this repo as well as other cookbooks, the Jupyter Book build step is failing with an error coming from Sphinx (full error here):

AttributeError: module 'docutils.nodes' has no attribute 'meta'
brian-rose commented 4 months ago

Thanks for the report @rmshkv, I noticed this too.

I'm not sure if this is related to issues with our Sphinx theme ( https://github.com/ProjectPythia/sphinx-pythia-theme/issues/39). @erogluorhan has been working on getting the theme up to date (https://github.com/ProjectPythia/sphinx-pythia-theme/pull/58).

ktyle commented 4 months ago

i'll take a look ASAP

ktyle commented 4 months ago

Looks like that when pip is installing our creaky old sphinx-pythia-theme, it is now updating the various sphinxcontrib libraries that are pinned in the conda environment from ProjectPythia/cookbook-actions#92 . Wonder if there is a way to pin libraries in pip as well?

brian-rose commented 4 months ago

Looks like that when pip is installing our creaky old sphinx-pythia-theme, it is now updating the various sphinxcontrib libraries that are pinned in the conda environment from ProjectPythia/cookbook-actions#92 . Wonder if there is a way to pin libraries in pip as well?

I'm not pip expert, but I think that is usually done in the requirements.txt file.

This is an unforunately legacy of the fact that the conda-forge recipe for our sphinx theme has been broken for years.

brian-rose commented 4 months ago

It's becoming more and more clear to me that we need to find a way to separate the environment description for the book build from the environment description for the notebook execution.

The first is generic and should be identical for every cookbook. It should be contained within a "Cookbook Infrastructure" package that can be maintained and versioned independently of the content of each Cookbook.

Whatever temporary fix we come up with here (possibly like https://github.com/ProjectPythia/ERA5_interactive-cookbook/pull/9) is going to need to be propagated across every existing Cookbook repo -- and then removed again once the upstream dependency issues get sorted out.

Related to #118 and https://github.com/ProjectPythia/cookbook-gallery/issues/86

ktyle commented 4 months ago

Assuming we can deploy a new sphinx-pythia-theme in conda-forge that has appropriate dependencies which play nicely with current versions of Sphinx and Jupyterbook, I think the only "book-specific" packages that we would need are jupyter-book and sphinx-pythia-theme. But that assumes of course that the new sphinx-pythia-theme does not again fall victim to obsolescence, necessitating ever-more complicated pins!

ahuang11 commented 3 months ago

Any fixes for this? I'm trying to update https://github.com/ProjectPythia/landsat-ml-cookbook/pull/22 and not sure how to proceed; should I merge with this broken?

Edit: oh I think I just need to follow https://github.com/ProjectPythia/ERA5_interactive-cookbook/pull/9/files

ktyle commented 3 months ago

@ahuang11 let's see how @erogluorhan 's work with ProjectPythia/sphinx-pythia-theme#58 looks with this cookbook.

brian-rose commented 3 months ago

Nightly build is finally passing again with the release of sphinx-pythia-theme v2024.3.0!

erogluorhan commented 3 months ago

I think we can close this now as we've update our Pythia theme, which has fixed this and several other repos' nightly builds. See the discussion for more information about the theme update.

erogluorhan commented 3 months ago

Hey @rmshkv, for using the updated theme in your ongoing cookbook work, please do not forget to check out the How to transition existing cookbooks part of the discussion to see how cookbook-template has been updated to start using the updated theme.