-
Notifications
You must be signed in to change notification settings - Fork 45
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
Assert Statements are for Debugging #242
Comments
Here is an article covering this idea in more detail: |
Hello! I'm trying to get my feet wet with some python open source. This seems straight forward so I'm happy to take care of it. Does this seem like a good first issue? Thanks! |
@onedeeper I am so sorry I missed this. Yes this would be a great first issue. Please lmk if you need any help contributing! |
* loads/extreme convert asserts to errors * loads/general convert asserts to errors * loads/graphics convert asserts to errors * power module convert asserts to errors * loads module, convert try-except validation to errors * utils module, convert asserts to errors * dolfyn module, convert asserts to errors * tidal module, convert asserts to errors * river module, convert asserts to errors * wave hindcast, replace asserts with errors * wave/io module, convert asserts to errors * wave module, convert asserts to errors * rename reserved variable min in plot_directional_spectrum * fix miscellaneous typos * catch new error type * fix test logic and parameter name * minor review comments, fix f strings, fix messages, etc * list correct types in error messages, f strings, etc * standardize error messages for optional parameters * Apply suggestions from ssolson's 2nd review
Currently MHKiT uses assert staements in its production code (primarilty for type checking functional inputs). As stated in the docs (https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement) assert stements are for debugging.
We should raise an error if the user does not pass the correct information.
So going forward we would convert:
to this
The text was updated successfully, but these errors were encountered: