Something like using abstract base classes would help with documentation. Many classes are required to have specific methods implemented, but there are many versions. The majority of the documentation is the same (e.g. specifying input and return types for each method) and repeated (or not yet written), and would make sense to write just once in the base class.
Examples of object types with many "subclass" forms
- WaveFunction: where we have Slater, Jastrow, etc.
- Configs: OpenConfigs and PeriodicConfigs
- Func3d: 3d functions for Jastrow basis functions in func3d.py
- Accumulator: (EnergyAccumulator, OBDMAccumulator, SqAccumulator, custom accumulators, etc)
In addition, accumulators objects have some methods that could have a default implementation (i.e. avg and keys, which have the same implementation across many accumulator classes).
Something like using abstract base classes would help with documentation. Many classes are required to have specific methods implemented, but there are many versions. The majority of the documentation is the same (e.g. specifying input and return types for each method) and repeated (or not yet written), and would make sense to write just once in the base class.
Examples of object types with many "subclass" forms
In addition, accumulators objects have some methods that could have a default implementation (i.e. avg and keys, which have the same implementation across many accumulator classes).