Skip to content

Commit

Permalink
improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
albertbou92 committed Aug 8, 2024
1 parent 0eae930 commit 8dec96d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/unittest/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ python -m pip install --upgrade pip
python -m pip install flake8 pytest pytest-cov hydra-core tqdm
python -m pip install torch torchvision
python -m pip install transformers promptsmiles torchrl rdkit==2023.3.3 MolScore # causal-conv1d>=1.4.0 mamba-ssm==1.2.2
python -m pip install deepsmiles selfies smi2sdf smi2svg # atomInSmiles safe
python -m pip install deepsmiles selfies smi2sdf smi2svg atomInSmiles safe-mol
python -m pip install molbloom

# Verify installations
Expand Down
2 changes: 1 addition & 1 deletion .github/unittest/install_dependencies_nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ python -m pip install --upgrade pip
python -m pip install flake8 pytest pytest-cov hydra-core tqdm
python -m pip install torch torchvision
python -m pip install transformers promptsmiles torchrl rdkit==2023.3.3 MolScore # causal-conv1d>=1.4.0 mamba-ssm==1.2.2
python -m pip install deepsmiles selfies smi2sdf smi2svg # atomInSmiles safe
python -m pip install deepsmiles selfies smi2sdf smi2svg atomInSmiles safe-mol
python -m pip install molbloom

# Verify installations
Expand Down
9 changes: 6 additions & 3 deletions tests/test_tokenizers.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pytest
import warnings
from functools import partial
from rdkit.Chem import AllChem as Chem

import pytest

from acegen.vocabulary.tokenizers import (
AISTokenizer,
Expand All @@ -13,6 +13,7 @@
SMILESTokenizerGuacaMol,
SmiZipTokenizer,
)
from rdkit.Chem import AllChem as Chem

try:
import deepsmiles
Expand Down Expand Up @@ -376,4 +377,6 @@ def test_smiles_based_tokenizers(tokenizer, available, error):
eq, err = smiles_eq(decoded_smiles, smiles)
assert eq, err
if decoded_smiles != smiles:
warnings.warn(f"{tokenizer.__name__} behaviour: {smiles} -> {decoded_smiles}")
warnings.warn(
f"{tokenizer.__name__} behaviour: {smiles} -> {decoded_smiles}"
)

0 comments on commit 8dec96d

Please sign in to comment.