From 11b21953da5f55e6505e3bea10b59c11a71c8427 Mon Sep 17 00:00:00 2001 From: AgnieszkaZaba <56157996+AgnieszkaZaba@users.noreply.github.com> Date: Sun, 15 Feb 2026 16:34:43 +0100 Subject: [PATCH 1/3] Add new hook for checking notebook structure --- .pre-commit-config.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cfe3c77c..8652edae 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,3 +20,10 @@ repos: - id: trailing-whitespace - id: end-of-file-fixer - id: debug-statements + + - repo: https://github.com/AgnieszkaZaba/devops_tests + rev: 6260ff80f0fb46f72de26dcbe173ce5564f236de + hooks: + - id: check-notebook-open-atmos-structure + name: check notebook has open-atmos structure + args: [--repo-name=PyPartMC] From 19585a056ec790801a980c041385b89f845e23ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agnieszka=20=C5=BBaba?= Date: Sun, 15 Feb 2026 17:10:06 +0100 Subject: [PATCH 2/3] pre-commit autoupdate only for scheduled builds --- .github/workflows/pre-commit.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index ef6df64f..aa1c8419 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -13,7 +13,12 @@ jobs: python-version: "3.10" - name: Linting run: | - pip install pre-commit - pre-commit clean - pre-commit autoupdate - pre-commit run --all-files \ No newline at end of file + pip install pre-commit + + # avoiding failures unrelated to PR contents + if [ "${{ github.event_name }}" = "schedule" ]; then + pre-commit clean + pre-commit autoupdate + fi + + pre-commit run --all-files --show-diff-on-failure From 6684903a6f838b94529b964c9537dbb03297580b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Agnieszka=20=C5=BBaba?= Date: Sun, 15 Feb 2026 17:21:24 +0100 Subject: [PATCH 3/3] fix yml structure --- .github/workflows/pre-commit.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index aa1c8419..f5dd2814 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -13,12 +13,12 @@ jobs: python-version: "3.10" - name: Linting run: | - pip install pre-commit - - # avoiding failures unrelated to PR contents - if [ "${{ github.event_name }}" = "schedule" ]; then - pre-commit clean - pre-commit autoupdate - fi - - pre-commit run --all-files --show-diff-on-failure + pip install pre-commit + + # avoiding failures unrelated to PR contents + if [ "${{ github.event_name }}" = "schedule" ]; then + pre-commit clean + pre-commit autoupdate + fi + + pre-commit run --all-files --show-diff-on-failure