-
-
Notifications
You must be signed in to change notification settings - Fork 555
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
Test all visualizers against API promises systematically #180
Comments
If all this is possible, that would be incredible and really contribute to my peace of mind! I think you nailed the list, and I think we could come up with a heuristic checking methodology that is built into our tests, perhaps as follows:
|
So it turns out that scikit-learn has a Which is discussed here: http://scikit-learn.org/stable/developers/contributing.html#rolling-your-own-estimator So potentially we can borrow/be inspired by this tool. |
I'm a fan of this systematic testing approach. after it is implemented, it will be great for maintaining code and documentation quality as well as keeping testing boiler plate to a minimum |
@ndanielsen and @NealHumphrey -- beginning to do some planning for PyCon and this seems useful for it. Do one of you guys have time this weekend/early next week to take a crack at it? If not, no worries, I'll go ahead and make a try. |
I'm thinking something much more basic for this using TestCase inheritance. We can use / modify What I'm thinking:
For existing tests, we just plug in viz_class with the Visualizer being tested. This is a basic, crude example but I think it would save us from having to develop testing paradigm for this |
I might have a good starting implementation of this by early / mid next week |
@ndanielsen I don't find that crude at all and I think it's a good idea so that we have the checks tested automatically. Once you get your preliminary insertions together, I can formulate the |
Ok, framework is in place -- but the specific checks were actually kind of difficult to implement. I'm going to punt on this for now, but you guys can take a look to see if the tests.checks module makes sense. |
Just found this interesting package, we might be able to modify for our doc string conventions: |
Nice, I'll have to put that on my list of tools to use! |
@NealHumphrey @bbengfort @ndanielsen — I'm going to archive this now given that we have incorporated much of this (albeit manual) checking into #669 and the recent updates to the tests. |
@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 |
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.
Checks:
self.set_title
and notself.ax.set_title
.The text was updated successfully, but these errors were encountered: