Skip to content

Update log rendering in kernel #68

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

Merged
merged 9 commits into from
Aug 20, 2020
Merged

Update log rendering in kernel #68

merged 9 commits into from
Aug 20, 2020

Conversation

jld23
Copy link
Contributor

@jld23 jld23 commented Aug 19, 2020

This PR completely changes how SAS logs are rendered.
Currently, the SAS log and listing details are rendered as an HTML file which, through pygments, allows the log to be colored consistently with other SAS clients.

This caused problems in conversion to PDF, HTML, and other destinations and if you run from console instead of a notebook.

This PR renders the SAS log as text using ANSI escape sequences to color the log. The goal is that users will not notice any difference in routine usage and see a huge improvement in use cases beyond just entering code.

I've also taken advantage of metakernal functions to flag cells with ERROR messages as failing while producing the same output as before. This is a helpful visual cue to the user that there is an error and will aid in auto-grading from nbgrader through this PR jupyter/nbgrader/pull/1356

Thanks to @dsblank for committing my PR Calysto/metakernel/pull/205 of adding a new method Error_display that will show the error in the log with context and the listing output.

This PR also removes the dependency on pygments since everything can be done with IPython and text.

This update also addresses issues #13 and #42

Additional logging was also added to improve the ability to debug issues.

@jld23
Copy link
Contributor Author

jld23 commented Aug 20, 2020

Just updated the regex to fix some issues @tomweber-sas found. See below for examples:
image

image

image

@tomweber-sas
Copy link
Collaborator

Hey Jared, this does fix the 3 issues I saw. As for the dull red, I still see that in jupyter, but the exported html is bold, and much brighter. I still am using Notebook on this system, so maybe it comes out brighter in Lab? What you pasted above is bright, like I see in the html, but that screenshots actually jupyter right? So mine is probably because it's an old notebook version? All in all though, this looks good!
Tom

@jld23 jld23 merged commit 093d794 into sassoftware:master Aug 20, 2020
@tomweber-sas
Copy link
Collaborator

I installed in Lab on another machine and the REDs are bright! yea :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants