pyrokinetics.plugins#
This modules contains utility functions for adding plugins to Pyrokinetics. This is achieved using entry-points.
If you want to register your own Equilibrium
reader, it should inherit pyrokinetics.file_utils.FileReader
,
and its read_from_file()
function should return an Equilibrium
. To add
this plugin to Pyrokinetics, you should add the following to your
pyproject.toml
file:
[project.entry-points."pyrokinetics.equilibrium"]
my_eq = "my_project.my_module:MyEqReader"
This will register the class MyEqReader
, and within Pyrokinetics the
equilibrium type will be "my_eq"
. Note that here, "pyrokinetics.equilibrium"
is
an entry point group name, not a module. The group names for each Pyrokinetics
file reader are:
"pyrokinetics.gk_input"
"pyrokinetics.gk_output"
"pyrokinetics.equilibrium"
"pyrokinetics.kinetics"
For more information, please see:
Functions
|
Defines an entry point group for classes that implement the |