question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test all visualizers against API promises systematically

See original GitHub issue

Potential testing idea - not sure how much of this is worth the time. These can be built into each visualizers unit tests, but would be good to have a basic set of checks that can be run for all visualizers.

To make sure that each new visualizer fulfills the few important API promises discussed yesterday, we should write unit tests that check that every visualizer meets them.

  • Either make a list of all visualizers or (preferred) automatically find all childeren of the Visualizer class and run test on each one.

Checks:

  • fit returns self
  • transform returns X
  • check that it can accept both numpy array and pandas dataframe
  • check that there is a docstring under the class name, and not one under init
  • use Inspect module to find all param names, and check that docstring at least contains all of these words somewhere in the docstring (to avoid undocumented params).
  • See if there is any other quick and easy formatting check we can do on the docstring. Not sure if there’s anything else worth adding.
  • Use inspect module to search for anything that looks like a hard-coded hex value in the draw method.
  • Ensure finalize calls self.set_title and not self.ax.set_title.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
ndanielsencommented, Jun 1, 2017

Just found this interesting package, we might be able to modify for our doc string conventions:

https://github.com/PyCQA/pydocstyle

0reactions
bbengfortcommented, Jul 25, 2019

@rebeccabilbro I think you’re right that we can close this since we haven’t moved forward on it in 2 years. One last piece of cleanup might be tests/checks.py – which was a partial prototype of this automatic checking functionality.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visualizing Promises - Dan Levy's Programming Blog
In order to visualize how Promises execute, let's define a new method delay(millisecs) . function delay(millisecs) { return new Promise(resolve ...
Read more >
Finding Broken Promises in Asynchronous JavaScript Programs
In this paper, we extend the notion of promise graphs to include all promise-related features in ECMAScript 6, including default reactions, exceptions, and...
Read more >
3 new tools to try for Literature mapping — Connected Papers ...
Try these three new cutting edge yet user friendly literature mapping tools - Connected Maps, Inciteful, Litmaps and more.
Read more >
Visualizing responses - Postman Learning Center
You can use visualizers to model and highlight the information that's relevant to your project, instead of having to read through raw response ......
Read more >
Trending: The Promises and the Challenges of Big Social Data
The public APIs provided by social media and social network companies do not give all data that these companies themselves are capturing about...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found