earthlab / matplotcheck

A python package for checking and testing matplotlib plots. We use this for autograding student assignments but there are many other potential use cases including package testing (for packages with plots)!
https://matplotcheck.readthedocs.io
BSD 3-Clause "New" or "Revised" License
18 stars 8 forks source link

Notebook function clarification needed #282

Open nkorinek opened 4 years ago

nkorinek commented 4 years ago

There are two functions in the notebook module that need clarification as to when they should be used and how.

  1. The error_test() function seems to only compare two numbers and see if they are equivalent or not. It prints out a custom error message based on the comparison. When is this used? Is there a way to make the code more robust to make it easier to incorporate into a work flow and make it's purpose more obvious?

  2. The remove_comments() function removes all commented lines in a string. When is this used in the workflow for notebook grading? Side note: The remove_comments() function used to leave empty spaces where it took out comments. I changed it so it deleted the line all together. The code used to look like this for records sake/if we decide to change it back:

    return "".join([line.split("#")[0] for line in split_lines]) 

Clarification on these two functions would be greatly appreciated so we can document them better!