Skip to content

Commit

Permalink
Fix some typos and unclear messages (#39)
Browse files Browse the repository at this point in the history
First fix: error message for converting an AND/OR graph to a synthesis
route would say there was more than one node if in fact there were zero
nodes.

Second fix: reaction string in `conftest.py`. This was also fixed in
  • Loading branch information
AustinT authored and kmaziarz committed Nov 21, 2023
1 parent 06d813e commit a948959
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ and the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.
- Adapt tutorials to the renaming from PR #9 ([#17](https://github.com/microsoft/syntheseus/pull/17)) ([@jagarridotorres])
- Pin `pydantic` version to `1.*` ([#10](https://github.com/microsoft/syntheseus/pull/10)) ([@kmaziarz])
- Fix compatibility with Python 3.7 ([#5](https://github.com/microsoft/syntheseus/pull/5)) ([@kmaziarz])
- Correct some typos and unclear error messages ([#39](https://github.com/microsoft/syntheseus/pull/39)) ([@austint])

## [0.1.0] - 2023-05-25

Expand Down
2 changes: 1 addition & 1 deletion syntheseus/search/graph/and_or.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def to_synthesis_graph(self, nodes: Optional[Collection[ANDOR_NODE]] = None) ->
root_reactions = list(subgraph.successors(self.root_node))
assert (
len(root_reactions) == 1
), "There appears to be more than 1 reaction for the root node."
), f"There appears to be {len(root_reactions)} reactions for the root node (expected exactly 1)."
new_graph = SynthesisGraph(root_node=root_reactions[0].reaction)

# Add all nodes and edges
Expand Down
2 changes: 1 addition & 1 deletion syntheseus/tests/search/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def retrosynthesis_task6() -> RetrosynthesisTask:
CCCOC -> CC + COC
There are 2 routes of length 2:
CCCO -> CCCO + C
CCCOC -> CCCO + C
C -> O
CCCOC -> CCCOO
Expand Down

0 comments on commit a948959

Please sign in to comment.