Data module
These are the primary validation functions used in data module integration tests.
clio_tools.data_module.ModuleInterface
Bases: BaseModel
Schema for module INTERFACE.yaml.
pathvars: Pathvars = Pathvars()
Snakemake pathvars, allowing module input re-wiring.
wildcards: dict[str, str] = Field(default_factory=dict)
Module wildcards. If provided, these must be present in the keys of either module resources or results.
check_wildcards() -> Self
Ensure wildcards are specified in file names.
Source code in src/clio_tools/data_module/io.py
to_mermaid_flowchart(name: str) -> str
Convert to a mermaid diagram.
Source code in src/clio_tools/data_module/io.py
clio_tools.data_module.modular_rulegraph_png(snakemake_dotfile: Path | str, output_path: Path | str, prefixes: str | list[str])
Create a PNG file with a simplified DAG with a single rule per module.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
snakemake_dotfile
|
Path | str
|
path to .dot file (e.g., a rulegraph). |
required |
output_path
|
Path | str
|
location to save the resulting PNG. |
required |
prefixes
|
str | list[str]
|
list of module prefixes to simplify. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
input was not a .dot file. |