pytest test routines asserting for GitHub issue-linked TO-DO labelling in the code, README link consistency and some Jupyter notebook sanity checks
Check Jupyter notebooks structure default for open-atmos projects.
Required:
- three badges in the first cell:
- markdown type of the second cell
- Colab-header in the third cell
import os, sys
os.environ['NUMBA_THREADING_LAYER'] = 'workqueue' # PySDM & PyMPDATA don't work with TBB; OpenMP has extra dependencies on macOS
if 'google.colab' in sys.modules:
!pip --quiet install open-atmos-jupyter-utils
from open_atmos_jupyter_utils import pip_install_on_colab
pip_install_on_colab('devops_tests-examples', 'devops_tests')
These errors relate to notebook execution state and structural integrity.
- NB000 – Missing execution count
- NB001 – Empty execution
- NB002 – Cell contains execution error
- NB003 – Insufficient number of cells (minimum required not met)
- NB004 – Invalid or missing required content in first cell
These errors relate to required badges in the first notebook cell.
- NB100 - Incorrect GitHub preview badge
- NB101 – Incorrect MyBinder badge
- NB102 – Incorrect Colab badge
These errors relate to required markdown structure in the second notebook cell.
- NB200 – Required markdown cell missing
- NB201 – Invalid markdown structure
- NB202 – Required markdown section missing
These errors relate to the required Colab setup header.
- NB300 – Header missing
- NB301 – Header version mismatch
- NB302 – Invalid header content
- NB303 – Header in incorrect position
These errors relate to the usage of show_anim() and show_plot()
functions from open-atmos-jupyter-utils package required when matplotlib is used.
- NB400 - show_plot not used
- NB401 - show_anim not used