forte2.mods_manager#
Module Contents#
- forte2.mods_manager.load_mods()#
Load forte2 installed mods from standard locations.
By default, this function checks for mods in the following directories: 1. The ~/.forte2/mods/ directory in the user’s home folder. 2. The mods/ directory in the forte2 package.
Mods are expected to be python files with a register(forte2) function of the form
```python # ~/.forte2/mods/my_mod.py
- def register(forte2):
…
- forte2.mods_manager.enable_mod(modname: str, paths=None)#
Load optional mods
By default, this function checks for mods in the following directories: 1. The ~/.forte2/optional_mods/ directory in the user’s home folder. 2. The current working directory.
Optional mods are expected to be python files with a register(forte2) function of the form
```python # ~/.forte2/optional_mods/my_mod.py
- def register(forte2):
…
- Parameters:
- modnamestr
The name of the mod to load (without the .py extension)
- pathslist of Path or str, optional, default=None
Optional list of directories to search for mods. If None, the default directories are used.