Skip to content
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

#2313 - Indigo functions doesn't work if ambiguous monomer present on the canvas #2689

Merged
merged 2 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions api/tests/integration/ref/formats/ket_to_ket.py.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
*** KET to KET ***
images.ket:SUCCEED
monomer_shape.ket molecule: SUCCEED
monomer_shape.ket molecule: SUCCEED
ambiguous_monomer.ket doc: SUCCEED
ambiguous_monomer.ket mol: SUCCEED
monomer_shape.ket doc: SUCCEED
monomer_shape.ket mol: SUCCEED
9 changes: 5 additions & 4 deletions api/tests/integration/tests/formats/ket_to_ket.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,19 @@ def check_res(filename, format, ket_ref, ket):
indigo.setOption("json-use-native-precision", True)
files = [
"monomer_shape",
"ambiguous_monomer",
]
formats = {
"mol": indigo.loadMolecule,
"doc": indigo.loadKetDocument,
"mol": indigo.loadMolecule,
}
for filename in sorted(files):
for format, loader in formats.items():
for format in sorted(formats.keys()):
file_path = os.path.join(ref_path, filename)
with open("{}_{}.ket".format(file_path, format), "r") as file:
ket_ref = file.read()
mol = loader(ket_ref)
mol = formats[format](ket_ref)
# with open("{}_{}.ket".format(file_path, format), "w") as file:
# file.write(mol.json())
ket = mol.json()
check_res(filename, "molecule", ket_ref, ket)
check_res(filename, format, ket_ref, ket)
Loading
Loading