Skip to content

Abstract Base Classes for better documentation #418

@willwheelera

Description

@willwheelera

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions