open-reaction-database / ord-schema

Schema for the Open Reaction Database
https://open-reaction-database.org
Apache License 2.0
95 stars 27 forks source link

Name/SMILES getters/setters for compounds #479

Closed connorcoley closed 4 years ago

connorcoley commented 4 years ago

Resolves #425

Note that the new function get_compound_smiles is NOT the same as smiles_from_compound. The newly-added former just gets the string value of the SMILES identifier (or None), whereas the latter tries to parse other structural identifiers as a back-up option.

I could envision combining these functions with an optional kwarg like from_mol=False. However, changing this would break the editor since it relies on molblock_from_compound at least. @skearnes what is our plan for synchronizing the two repos?

codecov[bot] commented 4 years ago

Codecov Report

Merging #479 into main will increase coverage by 0.26%. The diff coverage is 88.46%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #479      +/-   ##
==========================================
+ Coverage   75.94%   76.20%   +0.26%     
==========================================
  Files          22       22              
  Lines        2029     2047      +18     
  Branches      459      459              
==========================================
+ Hits         1541     1560      +19     
+ Misses        347      346       -1     
  Partials      141      141              
Impacted Files Coverage Δ
ord_schema/message_helpers.py 84.19% <88.46%> (+1.51%) :arrow_up:
skearnes commented 4 years ago

I could envision combining these functions with an optional kwarg like from_mol=False. However, changing this would break the editor since it relies on molblock_from_compound at least. @skearnes what is our plan for synchronizing the two repos?

Please see https://github.com/Open-Reaction-Database/ord-editor/pull/11