-
Notifications
You must be signed in to change notification settings - Fork 39
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
feat: add FileContents
to read/watch files
#62
Conversation
✅ Deploy Preview for anywidget canceled.
|
Codecov Report
@@ Coverage Diff @@
## main #62 +/- ##
==========================================
- Coverage 98.34% 98.28% -0.07%
==========================================
Files 6 7 +1
Lines 303 349 +46
==========================================
+ Hits 298 343 +45
- Misses 5 6 +1
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Lol, not quite sure why the coverage is still messaged up. Anyways, I think this is probably ready for a review now. Like I said, still thinking about the right API to hide the |
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.
(still looking)
Co-authored-by: Talley Lambert <[email protected]>
Co-authored-by: Talley Lambert <[email protected]>
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.
this is great. thanks for writing all the tests.
merge when ready (s'ok if you either want to revert my suggestion, or use the sleep
approach)
Thanks for the review! I tried the |
Closes #61
This PR adds the
anywidget._file_contents.FileContents
object.FileContents
watches for file changes in a provided path in a background thread and continuously emitschanged
signals any time the file changes, until the file is deleted (emits adeleted
event). ConnectingFileContents
withMimeReprBuilder
orAnyWidget
allows for #60 to be leveraged during development. Currently this must be done manually, but we should aim to make the creation ofFileContents
hidden.With
traitlets
With
MimeReprBuilder