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

DEV: Add Notebook AST Pre-Commit Hook #417

Merged
merged 4 commits into from
Jul 21, 2022
Merged

Conversation

John-P
Copy link
Contributor

@John-P John-P commented Jul 19, 2022

Add a simple pre-commit check which iterates over code cells in each notebook file and checks that any lines which don't start with a ! are valid python, i.e. that they parse to an abstract syntax tree (AST).

This PR also removes a broken and unused old hook.

@John-P John-P added documentation Improvements or additions to documentation dev tools Changes/Updates in Development tools labels Jul 19, 2022
@John-P John-P requested a review from shaneahmed July 19, 2022 14:06
@codecov
Copy link

codecov bot commented Jul 19, 2022

Codecov Report

Merging #417 (84f5102) into develop (8705422) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop     #417   +/-   ##
========================================
  Coverage    99.60%   99.60%           
========================================
  Files           55       55           
  Lines         5367     5367           
  Branches       962      962           
========================================
  Hits          5346     5346           
  Misses           9        9           
  Partials        12       12           

@John-P John-P self-assigned this Jul 19, 2022
@shaneahmed shaneahmed merged commit 1f3e07d into develop Jul 21, 2022
@shaneahmed shaneahmed deleted the dev-notebook-check-ast branch July 21, 2022 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev tools Changes/Updates in Development tools documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants