-
-
Notifications
You must be signed in to change notification settings - Fork 148
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
🐕 Batch: Unit Testing in Ersilia CLI #1319
Comments
@DhanshreeA let me kindly give this(first checkbox) a shot as you reviewed well my work on the |
@musasizivictoria! Go for it! Please create a PR and link here. |
May I have the second one please ? |
|
Add is_input_header negative test |
Hi @DhanshreeA Can I work on the third one |
@aderemi1224 would you like to tackle any of the tests here? |
Hi @DhanshreeA can I pick is_key_header negative test to tackle? |
@
@DhanshreeA Yes I will, Please assign this to me. |
@Ajoke23 go ahead! Please link your PR here. |
@aderemi1224 you can work on any of the available tests! Thank you. |
@KimFarida I had reacted to your comment to indicate yes you can work on any test you wish to take up. Please create a PR and link it here. Thank you! |
@musasizivictoria feel free to pick up other tests if you're interested. :) |
@DhanshreeA I have already made completed my previous two tasks? Can I have these tests assigned? Tests for CatalogTable class in ersilia/hub/content/catalog.py file. In this we want to set up a global using a CatalogTable object catalog with some data and columns: as_list_of_dicts |
@daud99 welcome back! Indeed we want to create a |
@DhanshreeA Sounds great. Let's do it one by one. I'm on it. |
* Implemented test case with empty and standard input. * Updated README.md for input folder inside test. * Changed the input file structure to organize test inputs better for different test cases.
Haha i was working on those 😬 |
LOL @KimFarida I just made the pull request my bad. |
@DhanshreeA i'd asked for the second one earlier but seeing as @daud99 has worked on them, on to the others not taken?😬 |
All good 😊. I guess i'll just wait on @DhanshreeA for my next course of action |
Quick one, did you write all 4 tests or just one? |
@KimFarida, I believe that instead of working on all four at once, it might be better to tackle them one by one. You could make a pull request for as_json, and for the one you’re working on, try to be explicit with the name instead of using pointers like "second" or "first." This way, it will be easier for others to understand what you're working on and reduce any confusion. |
Yeah i figured that was my error, my bad. |
Hello @DhanshreeA , I picked |
Add _is_inchikey negative test |
Hi @DhanshreeA. I worked on the |
@DhanshreeA
, similar to how non-string inputs are typically handled? Would adding a stricter input validation—like checking for empty or whitespace-only strings—align better with the intended behavior of the method? otherwise, currently, testing the method returns True for an empty string. |
Hi @Faith-Adegoke . I already worked on this previously #1332 |
Oh!. Sorry about that. I didn't see it. |
* Implemented test case with empty and standard input. * Updated README.md for input folder inside test. * Changed the input file structure to organize test inputs better for different test cases.
* Implemented test case with empty and standard input.
* Implemented test case with empty and standard input. Co-authored-by: Daud Ahmed <[email protected]> Co-authored-by: Dhanshree Arora <[email protected]>
Hi @DhanshreeA I see this as " In Progress" with no one assigned to it. I also marked it as priority 3. Can we better define this? If it is higher priority we should push for someone to tackle it, if it is low priority maybe put it on hold? |
We have made a lot of headway in implementing unit testing within Ersilia thanks to contributions from several people. I will make a small update here as to what is done and what is remaining, sometime this week. Until then, this is good to go back to being on hold. |
Summary
We need to implement unit tests for the different components within Ersilia to make sure our pipelines are robust and we are able to push with confidence.
Due to the work of our fantastic contributors, we are expanding functionality within Ersilia that would definitely benefit from testing (PR linked as an example). This issue has a list of different components we could easily set up testing for. Please only pick one item, ie one checkbox` to work on and link your PR in this issue so we can track the ongoing work.
Objective(s)
CompoundIdentifier
class in ersilia/utils/identifiers/compound.py. Particularly, we need the following tests, and we will mock response from all the resolver URLs used in this class:is_input_header
positive test @musasizivictoriais_input_header
negative testis_key_header
positive test @mercybasseyis_key_header
negative test_is_smiles
positive test when Chem is None_is_smiles
positive test when Chem is not None_is_smiles
negative test when Chem is None_is_smiles
negative test when Chem is not None_is_inchikey
positive test_is_inchikey
negative testguess_type
with inchikeyguess_type
with smilesguess_type
with UNPROCESSABLE_INPUTguess_type
with whitespaces (\n, \t, etc) as inputguess_type
with non character input (numbers, floats, random unicode characters)_nci_smiles_to_inchikey
positive test (we will mock this URL)_nci_smiles_to_inchikey
negative test (mock this URL again)_pubchem_smiles_to_inchikey
positive test (mock this URL)_pubchem_smiles_to_inchikey
negative test (mock this URL)chemical_identifier_resolver
with a correct input, eg: 'aspirin' which should return 'CC(=O)Oc1ccccc1C(O)=O'. (We will mock the URL with status code as 200 and response as given here)chemical_identifier_resolver
with incorrect input, eg: 'someincorrectinput' which should return a 404 response (This will be mocked)chemical_identifier_resolver
with incorrect inputs (\n, \t, NoneType, UNPROCESSABLE_INPUT)encode
with an invalid SMILES input when Chem is not Noneencode
with a valid SMILES input when Chem is not Noneencode
with incorrect inputs (\n, \t, NoneType, UNPROCESSABLE_INPUT)encode
with Chem being None with valid smiles and mocked response fromself._pubchem_smiles_to_inchikey(smiles)
encode
with Chem being None with valid smiles and mocked response fromself._nci_smiles_to_inchikey(smiles)
CatalogTable
class inersilia/hub/content/catalog.py
file. In this we want to set up a global using a CatalogTable object catalog with some data and columns:as_list_of_dicts
as_json
generate_separator_line
as_table
write
Documentation
No response
The text was updated successfully, but these errors were encountered: