openforcefield / openff-evaluator

A physical property evaluation toolkit from the Open Forcefield Consortium.
https://docs.openforcefield.org/projects/evaluator
MIT License
55 stars 18 forks source link

Replace the internal AttributeXXX classes with attrs #226

Open dotsdl opened 4 years ago

dotsdl commented 4 years ago

From @SimonBoothroyd:

The current AttributeClass and Attribute classes were mainly created to be flexible representations of data classes to be used when speccing out the new class designs as part of the openff-evaluator refactoring.

While these classes are flexible, extensible and allow new classes to be specced out easily, complete with automatic serialization support, automatic docstrings and a degree of automatic validation, they are not particularly performant and could (and should) likely be replace with / built on top of the existing attrs library.

Any replacement solution must provide the same level of flexibility, extensibility and automation, as well as being able to readily support polymorphic class designs.

dotsdl commented 4 years ago

We have decided to pursue re-implementing these classes using pydantic over attrs.