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 pre-commit hooks for jupyter notebooks #54

Merged
merged 4 commits into from
Sep 21, 2022
Merged

Conversation

pzdkn
Copy link
Contributor

@pzdkn pzdkn commented Sep 9, 2022

Description

We have our example notebooks in the sq-ds-core repo. To standardize notebook outputs, prevent private information leakage, and reduce PR diffs, we can introduce an nbstripout precommit hook.

Fixes # issue

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring including code style reformatting
  • Other (please describe):

Checklist:

  • I have read the contributing guideline doc (external contributors only)
  • Lint and unit tests pass locally with my changes
  • I have kept the PR small so that it can be easily reviewed
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • All dependency changes have been reflected in the pip requirement files.

@github-actions
Copy link

github-actions bot commented Sep 9, 2022

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@pzdkn
Copy link
Contributor Author

pzdkn commented Sep 9, 2022

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Sep 9, 2022
@AlpAribal
Copy link
Contributor

/gcbrun

Copy link
Contributor

@AlpAribal AlpAribal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to push a notebook with outputs (in a separate branch) using this configuration. Could you make a dummy commit with outputs in the PR so that we check that the hook is working?

.pre-commit-config.yaml Outdated Show resolved Hide resolved
@pzdkn
Copy link
Contributor Author

pzdkn commented Sep 14, 2022

Currently, there is an issue with nbstripout, that prevents it from been run locally. I have created a mirror-repository implementing the changes that would fix the issue until it's solved at nbstripout's side.

Copy link
Contributor

@winfried-ripken winfried-ripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@winfried-ripken
Copy link
Contributor

Currently, there is an issue with nbstripout, that prevents it from been run locally. I have created a mirror-repository implementing the changes that would fix the issue until it's solved at nbstripout's side.

Nice catch!

@pzdkn pzdkn merged commit a651b6f into main Sep 21, 2022
@pzdkn pzdkn deleted the peng-add-nbstripout branch September 21, 2022 08:47
@github-actions github-actions bot locked and limited conversation to collaborators Sep 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants