open-atmos / devops_tests

pytest test routines asserting for GitHub issue-linked TODO labelling in the code, README link consistency and some Jupyter notebook sanity checks
GNU General Public License v3.0
0 stars 4 forks source link

add check if all notebooks have md with badges, md with description and Colab header #34

Closed AgnieszkaZaba closed 1 month ago

AgnieszkaZaba commented 1 month ago

I added three tests proposed by @slayoo in #8. Changed order of cells in notebooks as:

  1. markdown with badges
  2. markdown with description
  3. Colab header

In test_third_cell_contains_colab_header I set cell index as 2.

slayoo commented 1 month ago

Thank you @AgnieszkaZaba ! (closed and reopened the PR to trigger CI tests which were auto-disabled by GitHub due to project inactivity)

AgnieszkaZaba commented 1 month ago

@slayoo Should I add definitions of badge functions to test_notebooks.py or is it better to use utils?

AgnieszkaZaba commented 1 month ago

I added badge functions to test_notebooks.py for now.

There is a problem with empty.ipynb because it does not have proper structure. Should we change it or maybe exclude from those tests?

slayoo commented 1 month ago

I added badge functions to test_notebooks.py for now.

:+1:

There is a problem with empty.ipynb because it does not have proper structure. Should we change it or maybe exclude from those tests?

Let's either rename it to template.ipynb and add there all the features that are tested, or add a separate template.ipynb file.

BTW, we maintain a set of "hints" for Python development here: https://github.com/open-atmos/python-dev-hints/wiki