Skip to content

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:

modules:
  - name: TEKSI Wastewater
    id: tww
    organisation: teksi
    repository: wastewater

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
class ModuleConfig(BaseModel):
    """Configuration for a single module.

    Attributes:
        name: **Required.** Display name of the module.
        id: **Required.** Unique identifier for the module (used for loading).
        organisation: **Required.** GitHub organisation where the module is hosted.
        repository: **Required.** GitHub repository name for the module.
        exclude_releases: *Optional.* Regex pattern to exclude certain releases.
        experimental: *Optional.* Whether this module is experimental (not shown by default).
    """

    name: str
    id: str
    organisation: str
    repository: str
    exclude_releases: str | None = None  # Regexp pattern to exclude releases
    experimental: bool = False  # Whether this module is experimental

Save and test

After editing the file, restart oQtopus. The new module appears in the module selection dropdown.