-
Notifications
You must be signed in to change notification settings - Fork 15
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
Conversation
Reviewer's Guide by SourceryThis pull request introduces a new GitHub Actions workflow to lint Jupyter Notebooks. The workflow checks and formats notebooks using nbQA, flake8, and black. Sequence diagram for Jupyter Notebook Linting WorkflowsequenceDiagram
participant G as GitHub
participant A as GitHub Actions
participant P as Python Environment
participant N as nbQA
G->>A: Push event triggered
A->>A: Checkout repository
A->>P: Setup Python 3.10
A->>P: Install dependencies
Note over P: Install nbQA, flake8, black
A->>N: Run flake8 on notebooks
A->>N: Run black on notebooks
N-->>A: Return linting results
A-->>G: Report completion status
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @JoshuaSBrown - I've reviewed your changes - here's some feedback:
Overall Comments:
- Please complete the PR description and checklist items to help reviewers understand the changes and ensure all requirements are met.
- Consider adding path filters to the workflow trigger (e.g.,
on: push: paths: ['jupyter_notebooks/**']
) to avoid running notebook linting when no notebooks have changed.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Question: Which linter config is being used to lint these? I ask because we should be able to correct these locally with an easy setup that can be pulled from a known source |
It is using the defaults for the tools. I'll make it explicit and consistent with the rest of the repo good callout. |
@AronPerez looks like the default for black was set to 88, and not 100. I don't want to reformat a bunch of things outside of the jupyternotebooks at the moment. I'll get this passing, and we can address all the files that do not adhere to the 100 line limit in a separate PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved on CI passing
PR Description
This PR adds a linter to the GitHub actions to make sure that our jupyternotebooks will work correctly. In addition, the discovered linting items were addressed.
i.e.
Tasks
Summary by Sourcery
CI: