-
Notifications
You must be signed in to change notification settings - Fork 88
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 file save hook support #97
Conversation
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.
Hi @wseaton 👋 ! Thanks for the PR. Left a few inline comments. Do you have the bandwidth to turn your pre_save and post_save examples into tests?
Sure, I'll try to get something out this week 🙂 |
@ericdill ping, I added tests for the example hooks in |
Linter is complaining about
You should run Running this locally works for everything:
Then in a diff terminal
Looks like there's a bunch of warnings, but I'm not going to lay those at your feet 😁 . Just get that linter appeased and I can merge it (or give me commit to your branch and I can just push the commit) |
No worries @ericdill, I'll fix those two issues and add a doc section with the examples from the tests and we should be good. |
@ericdill this should be ready to go, just needs your approval on the docs changes! |
lgtm. Thanks @wseaton ! |
This fixes #70 and #65, basically just ported over the
FileSystemContentsManager
implementations from upstream notebook.Tested the following hooks locally with
minio
:Post save hooks are a little tricky to write, but I was able to get one to work that runs
nbconvert
and saves the notebook as HTML by reusingcontents_manager.fs
. I treated theos_path
from the hook function as essentially the S3 API path: