Skip to content
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

Run cartopy plot function on notebooks during github workflow #666

Open
1 task done
soutobias opened this issue Dec 11, 2023 · 0 comments
Open
1 task done

Run cartopy plot function on notebooks during github workflow #666

soutobias opened this issue Dec 11, 2023 · 0 comments
Labels
Plotting Issues related to plotting data

Comments

@soutobias
Copy link
Collaborator

Is there an existing request for this?

  • I have searched the existing request

Desired Feature

The notebook polar_plotting.ipynb contains a cell responsible for plotting maps in polar projection. Unfortunately, when running the markdown-general.yml workflow, this notebook encounters an issue. Although the workflow appears to execute successfully, an error can be observed in the log:

[NbConvertApp] ERROR | Kernel died while waiting for execute reply.
...
nbclient.exceptions.DeadKernelError: Kernel died

This problem occurs within the notebook_to_md.sh script on the following line:

jupyter nbconvert --to notebook --execute example_scripts/notebook_tutorials/runnable_notebooks/${directory}/*.ipynb --allow-errors --output-dir example_scripts/notebook_tutorials/runnable_notebooks/executed/${directory}/

It's worth noting that the --allow-errors option prevents workflow failure due to errors in the notebook. However, because the notebooks are executed alphabetically, any notebooks following polar_plotting.ipynb won't run if an error occurs in this notebook.

Attempts to address the issue include:

  1. Adding --log-level=DEBUG --ExecutePreprocessor.timeout=600 to the nbconvert command to visualize notebook outputs and extend the cell execution time.

  2. Manually installing jupyter, notebook, and ipykernel within the markdown-general.yml file:

pip install upgrade pip
pip uninstall -y ipykernel
pip install ipykernel
pip install notebook nbconvert jupyter jupyter-server jupyter_client jupyter_core

Despite these efforts, a solution hasn't been found. As a workaround, the plotting section of the notebooks has been commented out, and a configuration gallery for polar plotting has been created. Images of the maps are manually added to the Markdown documentation.

Justification


User Workflow


Anything else?


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Plotting Issues related to plotting data
Projects
Status: BODC - Todo
Development

No branches or pull requests

1 participant