https://github.com/cleanlab/nblint-action
https://github.com/cleanlab/nblint-action
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/cleanlab/nblint-action
- Owner: cleanlab
- Created: 2022-11-23T18:30:23.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-01T22:39:46.000Z (over 3 years ago)
- Last Synced: 2025-03-20T11:03:31.576Z (over 1 year ago)
- Language: Python
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Notebook Linting GitHub Action
Checks if Jupyter Notebooks in your repository are well formatted according to certain specifications.
## Usage
This GitHub action can conduct a few different types of checks on your notebook, please specify in your inputs which checks should be conducted.
### General Inputs
| Input | Description | Default |
|-------|-------------|---------|
| `directory` | Directory to search for notebooks. | `"."` |
| `ignore_paths` | Comma-seperated list of paths to ignore, paths should be relative to the directory specified above. | `""` |
### Inputs Specifying Checks to be Done
| Input | Check Description | Default |
|-------|-------------------|---------|
| `check_outputs_empty` | Check that output cells are empty. | `true` |
| `check_no_trailing_newline` | Check that there is no newline at the end of code cells. | `true` |
| `check_correct_kernel` | Check that notebook is using the right kernel (here it checks for `Python 3 (ipykernel)`). | `false` |
| `check_notebook_badge` | Check that notebook has a google colab badge. | `false` |
## Example Workflow
```yml
name: Sample Workflow
on: push
jobs:
nblint:
name: Lint Notebooks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cleanlab/nblint-action@v1
with:
directory: 'src'
ignore_paths: 'path_to_ingore'
check_outputs_empty: false
check_correct_kernel: true
```