-
Notifications
You must be signed in to change notification settings - Fork 129
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
Add unit tests and increase coverage #476
Comments
I can work on align.py. I've been reviewing that file for most of the day now. |
I'll take a stab at |
Thank you all for signing up to write tests! In addition to unit tests for individual functions in each module, it would be amazing to have tests for the command line interfaces of major augur modules, too. For example, the
Testing this type of interface reveals issues with the entire module's data flow even if all of the module's other unit tests are passing. It looks like some folks are using pytest-mock to test these CLIs and it would be great to keep moving in this direction! |
Absolutely @huddlej. We should be enabling coverage on CI which will indicate for each PR the increase in test coverage by file and by PR ☀️ |
In addition to unit tests for functions within each of the python files above (which are great) it would be amazing to have an example of a test of the actual CLI (sub)command itself (e.g. see this comment & this comment). There are a number of invocations of each |
I can start with |
I can work on |
I can start on |
I'll start on version.py. |
Quick bookkeeping question:
Confirmed that this reproduces in the Travis build output, e.g. here. Should this issue's worklist be updated accordingly? (I'd do it myself, but wasn't sure if ancestral.py had been left off of this issue on purpose - e.g. out of scope, or covered in another issue elsewhere, etc.) |
@vanguard737 The omission of ancestral.py was accidental. I will add it now and assign it to you in the first message. Thanks! |
Working down the list, I'll start on |
I'll work on |
Is there a good example dataset that can be used with the distance command? Ran through the tb_tutorial and i don't see a distance map I can apply to the tree. I can mock up something based on the examples in the docstrings but I'd prefer to see how it works against a real dataset to sanity check myself. |
I'll start with |
I can work on export.py |
@dharrison-salesforce The distance maps described in the docstrings were developed for our seasonal influenza analyses, so the best place to start with real-world data is the nextstrain/seasonal-flu repo. Check out the distances rule in the Snakefile_base for an example of how we run the augur distance command. If you follow the instructions in the repo's README for setting up example data, you should be able to run a simple build quickly on your local machine. Let me know if you have other questions or issues with these data though. We can fork a separate issue for distances unit tests for further conversation. |
I can work on lbi.py |
I can work on |
Hi there! I came across this project via codetriage, and I was looking for a project to contribute to and write tests. This looks perfect. What is the status of this issue, as I see it says it may be resolved by #504, or is that the issue I should focus on? |
Test coverage has improved so much thanks to the efforts here. I'm going to close this long-running issue in favor of smaller issues for specific modules that we'll work on in the future. Thank you all! |
Context
Let's give this great project more test coverage. 💯
Description
If we divide and conquer, we should be able to increase test coverage significantly.
Here's a list of Python files which could benefit from tests or additional tests:
To claim a file, edit this message and insert your github username after the filename. Please start by claiming 1 or 2 files. You can always return to claim more.
Once your PR is merged, please check off that the file is covered. Celebrate the increase in tests and coverage and that your contribution makes a difference 🎉
cc/ @huddlej
The text was updated successfully, but these errors were encountered: