Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces several improvements and refactors across the backend and frontend to standardize the handling of predicted synthesis graphs, improve robustness in molecule drawing utilities, and enhance compatibility and clarity in the codebase. The most significant changes include renaming and supporting both
predicted_synth_graphand the deprecatedpredictive_synth_graphfor backward compatibility, updating the molecule drawing logic for more robust atom highlighting, and updating the RDKit dependency version.Backend: Synthesis Graph Key Standardization and Compatibility
predicted_synth_graphthroughout the API and data files, while maintaining backward compatibility with the deprecatedpredictive_synth_graphkey. Updated logic in the data conversion and Cytoscape export functions to check for both keys, preferring the new one. [1] [2] [3] [4] [5] [6]predictive_synth_graph/predicted_routetopredicted_synth_graph/is_predictedfor clarity and consistency, including in function signatures and docstrings. [1] [2] [3] [4] [5] [6] [7]Backend: Molecule Drawing Robustness
determine_highlight_colorsfunction to be more robust: now, during the drawing phase, only atoms with known map numbers are highlighted, and missing map numbers are skipped instead of raising errors. The logic for assigning colors and highlighting bonds is clarified and made more fault-tolerant.mol_to_imageand related functions, ensured thatshow_atom_indicesis properly propagated and handled, preventing abbreviation logic from interfering when atom indices are shown. [1] [2]Backend: Dependency Update
environment.ymlfrom2024.3.5to2025.03.2for improved compatibility and features.Backend: Logging and Error Handling
Frontend: Synthesis Graph Selection and Example Data
NetworkSearchMenu.jsx) to distinguish between primary, evidence, and predicted synthesis graphs, only displaying evidence/predicted graphs if they differ from the primary graph, and supporting bothpredicted_synth_graphand the deprecatedpredictive_synth_graphkeys. [1] [2]App.jsand example graph lists to use the new predicted graph logic and added a new example file for merged routes. [1] [2]These changes collectively improve code clarity, maintainability, and robustness, while ensuring backward compatibility with older data formats.