Added option --html to convert failed notebooks to html.#22
Open
bilke wants to merge 1 commit intoReviewNB:masterfrom
Open
Added option --html to convert failed notebooks to html.#22bilke wants to merge 1 commit intoReviewNB:masterfrom
bilke wants to merge 1 commit intoReviewNB:masterfrom
Conversation
Initial implementation by @chleh.
amit1rrr
reviewed
Dec 22, 2021
Member
amit1rrr
left a comment
There was a problem hiding this comment.
Thank you for the contribution. --html flag looks like a good addition to treon. I've left some comments.
P.S. - I'll not be able to review again for next 8-10 days as I'm out of office. But will look out for this in early January. Happy Holidays.
| try: | ||
| processor.preprocess(notebook, metadata(path)) | ||
| except CellExecutionError: | ||
| if html: |
Member
There was a problem hiding this comment.
It seems like html will only be generated if there's execution error. If there's an HTML flag then I'm guessing user is expecting HTML output even if the notebook executed successfully.
| setup_logging(arguments) | ||
| LOG.info('Executing treon version %s', __version__) | ||
| thread_count = arguments['--threads'] or DEFAULT_THREAD_COUNT | ||
| html_output = arguments['--html'] or False |
Member
There was a problem hiding this comment.
Maybe convert to bool i.e. bool(arguments['--html']) so that we're sure it's a boolean.
Let's use is_html as the variable name to indicate it's a boolean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To be used by CI as build artifacts.
Initial implementation by @chleh.