Skip to content

Add PR action to validate notebook format #1793

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 28, 2025

Conversation

brandonbaker-openai
Copy link
Contributor

@brandonbaker-openai brandonbaker-openai commented Apr 24, 2025

Summary

Adds a github action to validate the format of all changed notebook files

Motivation

Added to make sure only valid notebook changes are merged

Tests

  1. With no .ipynb changes, confirmed the action passed trivially
  2. Intentionally mangling a notebook (05f37b5), confirmed the workflow failed:
Run python .github/scripts/check_notebooks.py
Validating 1 notebook(s)...
examples/vector_databases/chroma/hyde-with-chroma-and-openai.ipynb: INVALID - Notebook does not appear to be JSON: '{\n  {\n   "cell_type": "markdown",\n  ...
1 invalid notebook(s) found.
Error: Process completed with exit code 1.
  1. With a valid notebook edit (c0d0297), confirmed the workflow passed:
Run python .github/scripts/check_notebooks.py
Validating 1 notebook(s)...
All changed notebooks are valid.

@brandonbaker-openai brandonbaker-openai force-pushed the bbaker/validate-notebooks branch from ddb319d to 05f37b5 Compare April 24, 2025 17:54
@brandonbaker-openai brandonbaker-openai marked this pull request as ready for review April 24, 2025 18:13
@brandonbaker-openai
Copy link
Contributor Author

brandonbaker-openai commented Apr 24, 2025

Reached out to Katia for suggestions on additional approvers

Update: Connected offline and she said it looks good to her

@brandonbaker-openai brandonbaker-openai force-pushed the bbaker/validate-notebooks branch from a2fe5dd to d586b40 Compare April 25, 2025 15:15
@brandonbaker-openai brandonbaker-openai merged commit 3c2a4de into main Apr 28, 2025
1 check passed
@brandonbaker-openai brandonbaker-openai deleted the bbaker/validate-notebooks branch April 28, 2025 10:33
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