Skip to content

Commit

Permalink
Merge pull request #529 from Steinbeck-Lab/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
sriramkanakam87 authored Jan 13, 2025
2 parents 79f2cc6 + d474ed5 commit 0b1ac87
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: API workflow
name: test

on:
push:
Expand Down Expand Up @@ -31,10 +31,6 @@ jobs:
python -m pip install --upgrade pip
pip3 install --upgrade setuptools pip
pip3 install --no-cache-dir -r requirements.txt
pip3 install rdkit
python3 -m pip uninstall -y imantics
pip3 install imantics==0.1.12
pip3 install openbabel-wheel
pip3 install --no-deps decimer-segmentation==1.1.3
pip3 install --no-deps decimer==2.3.0
pip3 install --no-deps STOUT-pypi==2.0.5
Expand Down
2 changes: 1 addition & 1 deletion app/modules/toolkits/cdk_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def setup_jvm():

if not isJVMStarted():
paths = {
"cdk-2.9": "https://github.com/cdk/cdk/releases/download/cdk-2.9/cdk-2.9.jar",
"cdk-2.10": "https://github.com/cdk/cdk/releases/download/cdk-2.10/cdk-2.10.jar",
"SugarRemovalUtility-jar-with-dependencies": "https://github.com/JonasSchaub/SugarRemoval/releases/download/v1.3.2/SugarRemovalUtility-jar-with-dependencies.jar",
"centres": "https://github.com/SiMolecule/centres/releases/download/1.0/centres.jar",
"opsin-cli-2.8.0-jar-with-dependencies": "https://github.com/dan2097/opsin/releases/download/2.8.0/opsin-cli-2.8.0-jar-with-dependencies.jar",
Expand Down
14 changes: 10 additions & 4 deletions tests/test_classyfire.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
"""
import pytest
from app.modules.classyfire import classify, result
import asyncio
Expand All @@ -19,7 +18,11 @@ def test_valid_classyfire(valid_smiles):
result_ = loop.run_until_complete(classify(valid_smiles))
assert result_["query_type"] == "STRUCTURE"
id_ = result_["id"]
classified = loop.run_until_complete(result(id_))
while True:
classified = loop.run_until_complete(result(id_))
if classified["classification_status"] == "Done":
break
asyncio.run(asyncio.sleep(2))
assert classified["classification_status"] == "Done"
assert classified["entities"][0]["class"]["name"] == "Imidazopyrimidines"

Expand All @@ -29,10 +32,13 @@ def test_invalid_classyfire(invalid_smiles):
result_ = loop.run_until_complete(classify(invalid_smiles))
assert result_["query_input"] == "invalid_smiles"
id_ = result_["id"]
classified = loop.run_until_complete(result(id_))
while True:
classified = loop.run_until_complete(result(id_))
if classified["classification_status"] == "Done":
break
asyncio.run(asyncio.sleep(2))
assert classified["classification_status"] == "Done"
assert (
classified["invalid_entities"][0]["report"][0]
== "Cannot process the input SMILES string, please check again"
)
"""
2 changes: 1 addition & 1 deletion tests/test_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def test_all_rdkit_descriptors(test_smiles_descriptors):
0,
1.0,
0,
62.12,
61.98,
)
assert expected_result == descriptors

Expand Down

0 comments on commit 0b1ac87

Please sign in to comment.