open-reaction-database / ord-schema

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

Fix a bug in ID reference replacements #603

Closed skearnes closed 3 years ago

skearnes commented 3 years ago

Resolves #602 (note that we will need to update the ord-schema version used by ord-data before https://github.com/open-reaction-database/ord-data/pull/94 can be submitted).

The issue is that the id_substitutions dict is only being populated when the reaction ID is not "proper". This PR checks whether IDs are proper before trying to look up a replacement in the id_substitutions dict.

codecov[bot] commented 3 years ago

Codecov Report

Merging #603 (fbbc2ac) into main (928919d) will increase coverage by 0.06%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #603      +/-   ##
==========================================
+ Coverage   76.13%   76.19%   +0.06%     
==========================================
  Files          18       18              
  Lines        1940     1941       +1     
  Branches      479      480       +1     
==========================================
+ Hits         1477     1479       +2     
  Misses        314      314              
+ Partials      149      148       -1     
Impacted Files Coverage Δ
ord_schema/updates.py 95.45% <100.00%> (+2.43%) :arrow_up: