microsoft / syntheseus

Package for Retrosynthetic Planning
https://microsoft.github.io/syntheseus/
MIT License
111 stars 14 forks source link

Further reduce code duplication between reaction classes #76

Closed kmaziarz closed 6 months ago

kmaziarz commented 6 months ago

Our data loading code produces ReactionSample objects, which (as of #74) are very similar to Reactions, except for holding a few extra things. These two classes also duplicate some of the functionality, e.g. utils for stringifying a Bag of Molecules. This PR makes an initial attempt at deduplicating these two classes, making ReactionSample inherit from Reaction.

Longer term we could potentially combine the two classes entirely (we can defer this to a future PR to speed up the release of v0.4.0).