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 doctest decorations to monaco editor per result #1911

Merged
merged 7 commits into from
May 24, 2023

Conversation

Sleepful
Copy link
Contributor

@Sleepful Sleepful commented May 18, 2023

Adds a red circle on the gutter of the editor for failed doctests.
Adds a green circle on the gutter of the editor for passed doctests.

Screen Shot 2023-05-18 at 02 16 04

Re-attempt of #1789
Following implementation details by @jonatanklosko #1789 (comment)

Adds a red circle on the gutter of the editor for failed doctests.
Adds a green circle on the gutter of the editor for passed doctests.
@github-actions
Copy link

github-actions bot commented May 18, 2023

Uffizzi Preview deployment-25743 was deleted.

@@ -23,7 +23,9 @@ defmodule Livebook.Runtime.Evaluator.Doctests do
|> Enum.map(&run_test/1)
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we could stream the gutter results per test? Before we run the test, we add a gray dot, after we run it, we make it red or green?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh so that way the tests update the indicator as they are ran on the server, super cool!

This is what it looks like :)

Screen.Recording.2023-05-22.at.00.51.25.mov

@josevalim
Copy link
Contributor

I love it. :) I dropped one suggestion.

@Sleepful
Copy link
Contributor Author

Implemented suggestion 😁

@josevalim
Copy link
Contributor

It looks so good!

@jonatanklosko
Copy link
Member

@Sleepful awesome! Some tiny comments from me :)

@Sleepful Sleepful force-pushed the WIP_livebook branch 2 times, most recently from ccee1a0 to e53723b Compare May 24, 2023 06:14
@Sleepful
Copy link
Contributor Author

@jonatanklosko code almost done cooking...maybe? 🍳

@jonatanklosko
Copy link
Member

jonatanklosko commented May 24, 2023

@Sleepful looks good, final nitpicks. Please run mix format.all to make CI happy :)

@jonatanklosko
Copy link
Member

@Sleepful are you running mix format.all (or npm run format in assets)? It seems the formatter doesn't use the right configuration.

@Sleepful
Copy link
Contributor Author

@jonatanklosko aha yeah. I tried both commands. I am struggling slightly with this prettier thing. It seems this repo does not contain a prettierrc config file, so maybe my system is picking up some custom default configuration that is different from this project. Well, that is my best guess right now.

@Sleepful
Copy link
Contributor Author

should work now :)
yeah I have a particular .prettierc in my home directory that I use as default config. Since the prettier will travel up directories until it finds a config, it was finding my personal config. So removed my default prettierc and it worked fine

@jonatanklosko jonatanklosko merged commit e614dcb into livebook-dev:main May 24, 2023
@Sleepful
Copy link
Contributor Author

Exciting!!! Thanks for the help @jonatanklosko

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.

3 participants