halo icon indicating copy to clipboard operation
halo copied to clipboard

fixed suboptimal usage of ipywidgets.Output widget

Open norweeg opened this issue 5 years ago • 6 comments

Description of new feature, or changes

Fixes suboptimal usage of ipywidgets.Output in HaloNotebook. See Output's API documentation for more info. resolves #140 resolves #59

Checklist

  • [ ] Your branch is up-to-date with the base branch
  • [ ] You've included at least one test if this is a new feature
  • [ ] All tests are passing

Related Issues and Discussions

People to notify

norweeg avatar Mar 07 '20 21:03 norweeg

Pull Request Test Coverage Report for Build 431

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at ?%

Totals Coverage Status
Change from base Build 429: 0%
Covered Lines:
Relevant Lines: 0

💛 - Coveralls

coveralls avatar Mar 07 '20 21:03 coveralls

Hi @norweeg Can I help in order to fix the pipeline? I tried locally with two python versions (2.7 and 3.7) both of them seem to succeed. Do you have an idea what the problem could be?

lujobi avatar May 11 '20 21:05 lujobi

Hi @norweeg Can I help in order to fix the pipeline? I tried locally with two python versions (2.7 and 3.7) both of them seem to succeed. Do you have an idea what the problem could be?

I suspect that these tests are bad. The code was originally doing all the formatting of the output and manually writing it into the output buffer, which is extremely unnecessary and defeats the purpose of using the Output widget, which are specifically intended to capture any output printed or displayed with print or display without any manual formatting to get it to display in Jupyter's output system. The tests appear to be looking for the output that would have been manually formatted and written in the buffer and therefore are bad tests. Basically, the result is the same, but the tests aren't looking at results, they're looking at how it produced the results, and the way that was originally used just did not use Output widgets correctly at all.

norweeg avatar May 12 '20 03:05 norweeg

Gently bumping this, since it hasn't seen activity in a while, and also happens to affects me. :)

mnicstruwig avatar Jun 24 '21 08:06 mnicstruwig

Gently bumping this, since it hasn't seen activity in a while, and also happens to affects me. :)

I will get back on this! I need to write tests, but a significant amount of the existing tests need to be reworked as they check values of internal attributes of the ipywidgets.Output class when the whole purpose of this PR is to get away from directly formatting and writing output, but rather allow the Output widget to perform that function for us

norweeg avatar Jun 24 '21 13:06 norweeg