-
Notifications
You must be signed in to change notification settings - Fork 3
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
[AG-1105] Data-Driven Test for transform_genes_biodomains
#74
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work - I know this is WIP, but here are some initial thoughts.
transform_genes_biodomains
transform_genes_biodomains
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Point of discussion: Should we have these test files within transform folders:
tests/test_data/biodomains/input
tests/test_data/biodomains/output
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🪟 I like this framework, let's see what Jess/Jaclyn think!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but we should wait for Jaclyn to take a look too.
Out of curiosity what do the % values after the test output mean? Does that represent the % of the tests that have passed so far? If so, why is the first test 60% of the tests?
...PASSED [ 60%]
...PASSED [ 80%]
....PASSED [100%]
Thanks @JessterB ! I believe that is what the % values mean. This looks weird here because I copied only the output lines that pertain to these new tests. The full output looks like this:
With the tests for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 LGTM! I'm going to pre-approve first. Can you add to the CONTRIBUTING.md some instructions on how to contribute these transform tests? (There's a PR open for the contributing guide)
It doesn't have to be perfect, but it'll serve as a starting place for Jess/Jaclyn.
@thomasyu888 I added instructions for contributing transform tests to #72. Merging this one now. |
This PR implements the
TestTransformGenesBiodomains
class intransform_genes_biodomains.py
. The new class is made up of some attribute data objects used for the parameterized testing, and two test functions,test_transform_genes_biodomains_should_pass
andtest_transform_genes_biodomains_should_fail
. Each test imports the example input files, attempts to rungenes_biodomains.transform_genes_biodomains
, and checks the result. In the passing case, the resultingoutput_df
is checked against theexpected_output
which is provided by the example output files. In the failing case, we expect the function call to result in aKeyError
which is verified.The parameterized testing runs are also annotated with IDs that describe which condition is being tested. When you run
the output from the new tests looks like