Skip to content

Remove xarray pin in environment; call dask compute on the two data a… #7

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

Closed
wants to merge 2 commits into from

Conversation

ktyle
Copy link
Collaborator

@ktyle ktyle commented Jun 29, 2023

…rrays; current version of Panel fixes time slider in rasterized dataset

…rrays; current version of Panel fixes time slider in rasterized dataset
@github-actions
Copy link

github-actions bot commented Jun 29, 2023

👋 Thanks for opening this PR! The Cookbook will be automatically built with GitHub Actions. To see the status of your deployment, click below.
🔍 Git commit SHA: a273522
✅ Deployment Preview URL: In Progress

@ktyle ktyle requested a review from brian-rose June 29, 2023 03:25
@brian-rose
Copy link
Member

For some reason the preview never deployed. Rerunning the build to see if that fixes it.

@brian-rose
Copy link
Member

Now the build has failed. Taking a look.

@brian-rose
Copy link
Member

I ran the notebooks and build the cookbook locally no problem. It's not clear to me what's failing on GitHub. Will try closing and reopening aka unplugging the router.

@brian-rose brian-rose closed this Jun 29, 2023
@brian-rose brian-rose reopened this Jun 29, 2023
github-actions bot pushed a commit that referenced this pull request Jun 29, 2023
@brian-rose
Copy link
Member

So the failure has nothing to do with executing the notebooks, which is working fine.

It's actually the sphinx theme that is failing:

File "/usr/share/miniconda3/envs/ERA5_interactive/lib/python3.11/site-packages/sphinx_book_theme/__init__.py", line 94, in sbt_generate_nav_html
[128](https://github.com/ProjectPythia/ERA5_interactive-cookbook/actions/runs/5414254894/jobs/9841049947?pr=7#step:20:129)
    toctree = context["generate_nav_html"](
[129](https://github.com/ProjectPythia/ERA5_interactive-cookbook/actions/runs/5414254894/jobs/9841049947?pr=7#step:20:130)
              ~~~~~~~^^^^^^^^^^^^^^^^^^^^^
[130](https://github.com/ProjectPythia/ERA5_interactive-cookbook/actions/runs/5414254894/jobs/9841049947?pr=7#step:20:131)
KeyError: 'generate_nav_html'

Fun!

@brian-rose
Copy link
Member

There must be a package conflict in the sphinx / jupyter-book stack. I will investigate elsewhere.

@brian-rose
Copy link
Member

So this is frustrating. I used the exact same environment description in this PR on the Cookbook template and did not reproduce the same failure.

Somehow the two builds are ending up different despite having the same contents in environment.yml. My guess is that the collision between mamba and pip is to blame. We use pip to install sphinx-pythia-theme, which is a workaround (ProjectPythia/cookbook-template#6) waiting for resolution of ProjectPythia/sphinx-pythia-theme#39.

At the end of the Update execution environment step in this PR, the log says

Installing collected packages: sphinx-book-theme
[334](https://github.com/ProjectPythia/ERA5_interactive-cookbook/actions/runs/5414254894/jobs/9841049947?pr=7#step:15:335)
  Attempting uninstall: sphinx-book-theme
[335](https://github.com/ProjectPythia/ERA5_interactive-cookbook/actions/runs/5414254894/jobs/9841049947?pr=7#step:15:336)
    Found existing installation: sphinx-book-theme 1.0.1
[336](https://github.com/ProjectPythia/ERA5_interactive-cookbook/actions/runs/5414254894/jobs/9841049947?pr=7#step:15:337)
    Uninstalling sphinx-book-theme-1.0.1:
[337](https://github.com/ProjectPythia/ERA5_interactive-cookbook/actions/runs/5414254894/jobs/9841049947?pr=7#step:15:338)
      Successfully uninstalled sphinx-book-theme-1.0.1
[338](https://github.com/ProjectPythia/ERA5_interactive-cookbook/actions/runs/5414254894/jobs/9841049947?pr=7#step:15:339)
Successfully installed sphinx-book-theme-0.1.10

Over at ProjectPythia/cookbook-template#130 the same stage of the build log says

Installing collected packages: docutils, pydata-sphinx-theme, sphinx-book-theme, sphinx-pythia-theme
[534](https://github.com/ProjectPythia/cookbook-template/actions/runs/5414625261/jobs/9841953808#step:15:535)
  Attempting uninstall: docutils
[535](https://github.com/ProjectPythia/cookbook-template/actions/runs/5414625261/jobs/9841953808#step:15:536)
    Found existing installation: docutils 0.17.1
[536](https://github.com/ProjectPythia/cookbook-template/actions/runs/5414625261/jobs/9841953808#step:15:537)
    Uninstalling docutils-0.17.1:
[537](https://github.com/ProjectPythia/cookbook-template/actions/runs/5414625261/jobs/9841953808#step:15:538)
      Successfully uninstalled docutils-0.17.1
[538](https://github.com/ProjectPythia/cookbook-template/actions/runs/5414625261/jobs/9841953808#step:15:539)
  Attempting uninstall: pydata-sphinx-theme
[539](https://github.com/ProjectPythia/cookbook-template/actions/runs/5414625261/jobs/9841953808#step:15:540)
    Found existing installation: pydata-sphinx-theme 0.13.3
[540](https://github.com/ProjectPythia/cookbook-template/actions/runs/5414625261/jobs/9841953808#step:15:541)
    Uninstalling pydata-sphinx-theme-0.13.3:
[541](https://github.com/ProjectPythia/cookbook-template/actions/runs/5414625261/jobs/9841953808#step:15:542)
      Successfully uninstalled pydata-sphinx-theme-0.13.3
[542](https://github.com/ProjectPythia/cookbook-template/actions/runs/5414625261/jobs/9841953808#step:15:543)
  Attempting uninstall: sphinx-book-theme
[543](https://github.com/ProjectPythia/cookbook-template/actions/runs/5414625261/jobs/9841953808#step:15:544)
    Found existing installation: sphinx-book-theme 1.0.1
[544](https://github.com/ProjectPythia/cookbook-template/actions/runs/5414625261/jobs/9841953808#step:15:545)
    Uninstalling sphinx-book-theme-1.0.1:
[545](https://github.com/ProjectPythia/cookbook-template/actions/runs/5414625261/jobs/9841953808#step:15:546)
      Successfully uninstalled sphinx-book-theme-1.0.1
[546](https://github.com/ProjectPythia/cookbook-template/actions/runs/5414625261/jobs/9841953808#step:15:547)
Successfully installed docutils-0.16 pydata-sphinx-theme-0.7.2 sphinx-book-theme-0.1.10 sphinx-pythia-theme-2022.3.29
[547](https://github.com/ProjectPythia/cookbook-template/actions/runs/5414625261/jobs/9841953808#step:15:548)

Basically it looks like pip is downgrading several packages in the sphinx stack to satisfy the requirement to use an old version of sphinx-book-theme. And that is working for most cookbook.

Why is the same thing not happening in this PR? I have no idea right now.

@brian-rose
Copy link
Member

I'll try pinning those packages in the environment file here so mamba installs the correct versions. But it would be great to understand what's causing the failure and/or how to reproduce it.

@brian-rose
Copy link
Member

Pinning to

  - pydata-sphinx-theme=0.7.2
  - sphinx-book-theme=0.1.10

caused a different build failure when I ran it locally.

Not sure where to go from here.

@ktyle
Copy link
Collaborator Author

ktyle commented Jun 29, 2023

Very interesting/confounding, since I believe the trigger-book-build action succeeded last night after I modified 01BasicVisualization.ipynb with the necessary dask.compute call.

Definitely makes the need to modernize the sphinx-pythia-theme more immediate.

@ktyle ktyle closed this by deleting the head repository Jan 25, 2024
negin513 pushed a commit that referenced this pull request Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants