ersilia-os / ersilia

The Ersilia Model Hub, a repository of AI/ML models for infectious and neglected disease research.
https://ersilia.io
GNU General Public License v3.0
224 stars 147 forks source link

Add tests for _is_smiles, _is_inchikey, and guess_type methods in CompoundIdentifier class #1358

Closed musasizivictoria closed 1 day ago

musasizivictoria commented 3 weeks ago

Thank you for taking your time to contribute to Ersilia, just a few checks before we proceed

Description

This commit introduces unit tests for the following methods in the CompoundIdentifier class:

  1. _is_smiles(): Positive and negative cases, both when RDKit (Chem) is available and not available.
  2. _is_inchikey(): Valid and invalid InChIKey tests to ensure correct identification.
  3. guess_type(): Tests to validate various inputs, including:

Changes to be made

Added the following tests:

  1. _is_smiles() positive and negative tests for RDKit presence and absence.
  2. _is_inchikey() positive and negative tests for valid/invalid keys.
  3. guess_type() tests covering:

Status

To do

Related to https://github.com/ersilia-os/ersilia/issues/1319

musasizivictoria commented 3 weeks ago

@DhanshreeA kindly this is ready for review. Thanks

cc @Malikbadmus

DhanshreeA commented 4 days ago

Quite a number of good tests here, I need to resolve conflicts in the PR before merging.