-
Notifications
You must be signed in to change notification settings - Fork 104
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
#1285 Add new query properties support to KET format #1286
Merged
AliaksandrDziarkach
merged 10 commits into
epam:master
from
AliaksandrDziarkach:json-atom-query-properties
Sep 27, 2023
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
27bee61
#1285 Add new query properties support to KET format
AliaksandrDziarkach 48e3b14
#1285 Add new query properties support to KET format
AliaksandrDziarkach 8885e9b
#1285 Add new query properties support to KET format
AliaksandrDziarkach 4a5c125
#1285 Add new query properties support to KET format
AliaksandrDziarkach 6430c00
#1285 Add new query properties support to KET format
AliaksandrDziarkach 9b941cb
#1285 Add new query properties support to KET format
AliaksandrDziarkach 9307464
#1285 Add new query properties support to KET format
AliaksandrDziarkach e1135fc
#1285 Add new query properties support to KET format
AliaksandrDziarkach 7c696ca
#1285 Add new query properties support to KET format
AliaksandrDziarkach bfdc821
#1285 Add new query properties support to KET format
AliaksandrDziarkach File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
api/tests/integration/ref/formats/ket_with_query_properties.py.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*** KET with query properties *** | ||
ket_with_query_properties.ket:SUCCEED |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
api/tests/integration/tests/formats/ket_with_query_properties.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import difflib | ||
import os | ||
import sys | ||
|
||
|
||
def find_diff(a, b): | ||
return "\n".join(difflib.unified_diff(a.splitlines(), b.splitlines())) | ||
|
||
|
||
sys.path.append( | ||
os.path.normpath( | ||
os.path.join(os.path.abspath(__file__), "..", "..", "..", "common") | ||
) | ||
) | ||
from env_indigo import * # noqa | ||
|
||
indigo = Indigo() | ||
indigo.setOption("json-saving-pretty", True) | ||
|
||
print("*** KET with query properties ***") | ||
|
||
ref_path = joinPathPy("ref/", __file__) | ||
name = "ket_with_query_properties.ket" | ||
filename = os.path.join(ref_path, name) | ||
|
||
mol = indigo.loadQueryMoleculeFromFile(filename) | ||
with open(filename, "r") as file: | ||
ket_ref = file.read() | ||
ket = mol.json() | ||
diff = find_diff(ket_ref, ket) | ||
if not diff: | ||
print(name + ":SUCCEED") | ||
else: | ||
print(name + ":FAILED") | ||
print(diff) |
126 changes: 126 additions & 0 deletions
126
api/tests/integration/tests/formats/ref/ket_with_query_properties.ket
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
{ | ||
"root": { | ||
"nodes": [ | ||
{ | ||
"$ref": "mol0" | ||
} | ||
] | ||
}, | ||
"mol0": { | ||
"type": "molecule", | ||
"atoms": [ | ||
{ | ||
"label": "C", | ||
"location": [ | ||
6.3348493576049809, | ||
-5.550074577331543, | ||
0.0 | ||
] | ||
}, | ||
{ | ||
"label": "C", | ||
"location": [ | ||
8.06515121459961, | ||
-5.549589157104492, | ||
0.0 | ||
] | ||
}, | ||
{ | ||
"label": "C", | ||
"location": [ | ||
7.2016377449035648, | ||
-5.049966812133789, | ||
0.0 | ||
] | ||
}, | ||
{ | ||
"label": "C", | ||
"location": [ | ||
8.06515121459961, | ||
-6.55053186416626, | ||
0.0 | ||
] | ||
}, | ||
{ | ||
"label": "C", | ||
"location": [ | ||
6.3348493576049809, | ||
-6.555019855499268, | ||
0.0 | ||
] | ||
}, | ||
{ | ||
"label": "C", | ||
"location": [ | ||
7.203820705413818, | ||
-7.050033092498779, | ||
0.0 | ||
], | ||
"queryProperties": { | ||
"aromaticity": "aliphatic", | ||
"connectivity": 5, | ||
"ringMembership": 3, | ||
"ringSize": 4 | ||
} | ||
} | ||
], | ||
"bonds": [ | ||
{ | ||
"type": 2, | ||
"atoms": [ | ||
2, | ||
0 | ||
] | ||
}, | ||
{ | ||
"type": 2, | ||
"atoms": [ | ||
3, | ||
1 | ||
] | ||
}, | ||
{ | ||
"type": 1, | ||
"atoms": [ | ||
0, | ||
4 | ||
] | ||
}, | ||
{ | ||
"type": 1, | ||
"atoms": [ | ||
1, | ||
2 | ||
] | ||
}, | ||
{ | ||
"type": 2, | ||
"atoms": [ | ||
4, | ||
5 | ||
] | ||
}, | ||
{ | ||
"type": 1, | ||
"atoms": [ | ||
5, | ||
3 | ||
] | ||
} | ||
], | ||
"sgroups": [ | ||
{ | ||
"type": "MUL", | ||
"atoms": [ | ||
0, | ||
1, | ||
2, | ||
3, | ||
4, | ||
5 | ||
], | ||
"mul": 1 | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strings moved to constants.
Added code to treat [new] UT as failed to prevent forgotten UT.