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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add interactive extension #203
Conversation
Codecov Report
@@ Coverage Diff @@
## developer #203 +/- ##
=============================================
+ Coverage 29.49% 31.50% +2.00%
=============================================
Files 123 124 +1
Lines 11610 11644 +34
Branches 2036 1784 -252
=============================================
+ Hits 3424 3668 +244
+ Misses 7649 7535 -114
+ Partials 537 441 -96
Continue to review full report at Codecov.
|
"data": { | ||
"text/html": [ | ||
"<div><div><strong>Restore sources</strong><ul><li><span> C:/Users/schne/source/repos/fslaborg/FSharp.Stats/pkg</span></li></ul></div><div></div><div><strong>Installed Packages</strong><ul><li><span>FSharp.Stats, 0.0.0-dev</span></li><li><span>FSharp.Stats.Interactive, 0.0.0-dev</span></li></ul></div></div>" |
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.
Do you want the cell outputs to be preserved?
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.
Yes- i thought it would be nice that you can directly see the output when looking at the sample notebook on github
"\n", | ||
"The version of the package is always `0.0.0-dev`.\n", | ||
"\n", | ||
"To rre-run the build/repack you have to restart the notebook kernel, otherwise we cannot remove the referenced local nuget package." |
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.
typo rre-run
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.
fixed
| :? System.Double as f -> | ||
match f with | ||
| f when f <= -10000. -> sprintf "%.2g" f | ||
| f when f < 0. -> sprintf "%.2f" f |
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.
馃憤
@@ -0,0 +1,86 @@ | |||
锘縨odule FormattingTests |
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.
Are nans and infinities printed properly?
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.
I added tests for both individual formatting and a matrix containing mixed values of all cases.
@@ -26,7 +26,7 @@ | |||
{ | |||
"data": { | |||
"text/html": [ | |||
"<div><div><strong>Restore sources</strong><ul><li><span> C:/Users/schne/source/repos/fslaborg/FSharp.Stats/pkg</span></li></ul></div><div></div><div><strong>Installed Packages</strong><ul><li><span>FSharp.Stats, 0.0.0-dev</span></li><li><span>FSharp.Stats.Interactive, 0.0.0-dev</span></li></ul></div></div>" | |||
"<div><div><strong>Restore sources</strong><ul><li><span> C:/Users/schne/source/repos/fslaborg/FSharp.Stats/pkg</span></li></ul></div><div></div><div><strong>Installed Packages</strong><ul><li><span>FSharp.Stats, 0.0.1-dev</span></li><li><span>FSharp.Stats.Interactive, 0.0.1-dev</span></li></ul></div></div>" |
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.
In L11 you wrote "The version of the package is always 0.0.0-dev
.", but here you changed it to 0.0.1-dev. Is that intended?
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.
fixed
This PR adds a formatting extension for .NET interactive, providing a formatter for the
Matrix<'T>
type as a POC, tightly oriented on my work for the Deedle.Interactive extension (fslaborg/Deedle#547). When both are merged, we will have a nice consistent display across both libs.It completely overhauls the formatting for matrices as well, replacing the current
StructuredFormatDisplay
and making the FSI printer obsolete.While i have confidence in it, pls do not merge before i added tests 馃槅
An example notebook can be seen here.
Notebook screenshot:
FSI screenshot: