Adding Modules¶
This guide explains how to add new modules to oQtopus and how to structure a module repository.
Module configuration¶
oQtopus uses a YAML configuration file (default_config.yaml) to define the list of available modules.
Locate the configuration¶
The configuration file is at the root of the oQtopus package directory:
- QGIS plugin: inside the installed plugin folder (e.g.
~/.local/share/QGIS/QGIS3/profiles/default/python/plugins/oqtopus/default_config.yaml). - Standalone: inside the pip-installed package directory.
Add a module entry¶
Open default_config.yaml and add an entry under the modules key:
ModuleConfig reference¶
Bases: BaseModel
Configuration for a single module.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Required. Display name of the module. |
id |
str
|
Required. Unique identifier for the module (used for loading). |
organisation |
str
|
Required. GitHub organisation where the module is hosted. |
repository |
str
|
Required. GitHub repository name for the module. |
exclude_releases |
str | None
|
Optional. Regex pattern to exclude certain releases. |
experimental |
bool
|
Optional. Whether this module is experimental (not shown by default). |
Source code in oqtopus/core/modules_config.py
Save and test¶
After editing the file, restart oQtopus. The new module appears in the module selection dropdown.