Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract Base Classes for better documentation #418

Open
willwheelera opened this issue Jan 16, 2024 · 0 comments
Open

Abstract Base Classes for better documentation #418

willwheelera opened this issue Jan 16, 2024 · 0 comments

Comments

@willwheelera
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant