-
Notifications
You must be signed in to change notification settings - Fork 29
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
how can unit tests and CI be added to the repo? #453
Comments
Unit tests are great to find bugs and program faster. But they do have a cost. Whereas the code problems detected by pylint/flake8 are free, requiring no more than that we look at the output and fix our code. See #456 for discussion. I will continue adding a unit test to demonstrate; it may be that you want to have unit testing in place in some cases before fixing the problems detected by pylint. |
OK, if you take a look at my branch you will see the following (failing) test:
This fails like this:
I need a copy of the file:
|
OK, we have begun our unit testing journey and that is very exciting. We now have a CI job which runs a flake8 test of the python code to check for syntax errors. If it passes, there are no syntax errors in the python code. We have a long way to go, but that's a great start. GitHub repo owners: you need to create a ruleset and apply it to the dev-sci branch. The ruleset should require that only PRs are used to update the branch, and that the flake8 tests must pass. Let me know if you need help setting this up, we have it on all the NCEPLIBS if you want to look. As new error messages are added to the flake8 check, you'll get incrementally closer to clearing all flake8 warnings. |
How can unit tests and CI be added to the repo?
There are shell scripts and python code.
Let's explore ways to add some unit testing.
The text was updated successfully, but these errors were encountered: