Skip to content
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

Add github action for linting jupyter #1289

Merged
merged 15 commits into from
Feb 10, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/jupyternotebook-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Jupyter Notebook Linter
on: push
JoshuaSBrown marked this conversation as resolved.
Show resolved Hide resolved

jobs:
lint-jupyter:
runs-on: ubuntu-latest

steps:
# Step 1: Checkout the repository
- name: Checkout Code
uses: actions/checkout@v4

# Step 2: Set up Python environment
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10' # Specify the Python version

# Step 3: Install dependencies
- name: Install nbQA, flake8, and black
run: |
pip install nbqa flake8 black

# Step 4: Run flake8 and black on notebooks in ./foo
- name: Lint Jupyter Notebooks with flake8
run: nbqa flake8 ./jupyter_notebooks

- name: Format Jupyter Notebooks with black
run: nbqa black ./jupyter_notebooks --check

# Step 5: Report status
- name: Complete
run: echo "Jupyter Notebook linting completed!"

Loading