Skip to content

Commit

Permalink
add pre-commit hook to enforce notebooks run order (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
AgnieszkaZaba authored Oct 26, 2024
1 parent 16203c5 commit b9e40dc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ repos:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: debug-statements

- repo: https://github.com/christopher-hacker/enforce-notebook-run-order
rev: 2.0.1
hooks:
- id: enforce-notebook-run-order
13 changes: 9 additions & 4 deletions test_files/template.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,23 @@
"id": "7a729b2624b70eae"
},
{
"metadata": {},
"metadata": {
"ExecuteTime": {
"end_time": "2024-10-26T12:29:32.925592Z",
"start_time": "2024-10-26T12:29:32.919920Z"
}
},
"cell_type": "code",
"outputs": [],
"execution_count": null,
"source": [
"import sys\n",
"if 'google.colab' in sys.modules:\n",
" !pip --quiet install open-atmos-jupyter-utils\n",
" from open_atmos_jupyter_utils import pip_install_on_colab\n",
" pip_install_on_colab('devops_tests-examples')"
],
"id": "72ccd23c0ab9f08e"
"id": "72ccd23c0ab9f08e",
"outputs": [],
"execution_count": 1
}
],
"metadata": {
Expand Down

0 comments on commit b9e40dc

Please sign in to comment.