Skip to content

Conversation

@AgnieszkaZaba
Copy link
Collaborator

No description provided.

@AgnieszkaZaba AgnieszkaZaba requested a review from Sfonxu December 21, 2025 17:13
@AgnieszkaZaba AgnieszkaZaba changed the title hook checking if notebooks executed and without warnings and errors hook checking if notebooks executed with output and without warnings and errors Dec 21, 2025
@slayoo
Copy link
Member

slayoo commented Dec 26, 2025

To make the hooks maintainable, it would be great to store in the repo some example files that demonstrate when the hooks should fail. Chat suggests the following pattern:
image
Could it work?

@Sfonxu
Copy link
Contributor

Sfonxu commented Dec 27, 2025

To make the hooks maintainable, it would be great to store in the repo some example files that demonstrate when the hooks should fail. Chat suggests the following pattern: [...] Could it work?

I think it could, with maybe a more clear naming convention (like tests/passing/(hook_name).py, tests/failing/(hook_name).py )?

Same goes for example notebooks I suppose. And maybe a good idea would be to add a CI job to run the hooks on those files as well.

args: [--fix-header, --repo-name=devops_tests]
language: python
types: [jupyter]
exclude: tests/examples/bad/
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed to actually make commit. We can think about running this pre-commits only on CI.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like in the above suggestion?
image

Copy link
Collaborator Author

@AgnieszkaZaba AgnieszkaZaba Jan 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but then we have to remove this hook from config because the suggested code will not run on excluded files.

@AgnieszkaZaba
Copy link
Collaborator Author

  • run pre-commit hooks on both paths (bad and good) with fail mark
  • add test with edge cases (injected cells in test)

@AgnieszkaZaba AgnieszkaZaba changed the title hook checking if notebooks executed with output and without warnings and errors new logic gor tests; hook checking nb outputs; Jan 15, 2026
@AgnieszkaZaba AgnieszkaZaba changed the title new logic gor tests; hook checking nb outputs; new logic for tests - bad and good example; hook checking nb outputs; Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants