appabuild.cli.lca#

Attributes#

app

Functions#

build(appabuild_config_path, lca_config_path[, init])

Build an impact model and save it to the disk.

graph(path, fu_name[, type, width, height, sensitive])

Generate a mermaid graph from a set of foreground datasets and export it in an image file (PNG or SVG format).

validate_foreground_datasets(datasets_root)

Validates a folder of foreground datasets. Show an error message for each invalid dataset.

validate_size(→ int)

validate_type(→ str)

Module Contents#

appabuild.cli.lca.build(appabuild_config_path: Annotated[str | None, typer.Argument(help='AppaBuild environment configuration file, required unless --no-init is specified')], lca_config_path: Annotated[str, typer.Argument(help='LCA configuration file')], init: Annotated[bool, typer.Option(help='initialize AppaBuild environment')] = True)#

Build an impact model and save it to the disk. An AppaBuild environment is initialized (background and foreground databases), unless –no-init is specified.

appabuild.cli.lca.graph(path: Annotated[str, typer.Argument(help='Root path of foreground datasets')], fu_name: Annotated[str, typer.Argument(help='Name of the root dataset (without its file extension)')], type: Annotated[str, typer.Option(help='Type of the output image, can only be png or svg, the default type is png', callback=validate_type)] = 'png', width: Annotated[int, typer.Option(help='Width of the output image', callback=validate_size)] = 750, height: Annotated[int, typer.Option(help='Height of the output image', callback=validate_size)] = 750, sensitive: Annotated[bool, typer.Option(help='If the data used to build the graph are sensitive')] = True)#

Generate a mermaid graph from a set of foreground datasets and export it in an image file (PNG or SVG format). :param path: root path of the foreground datasets used to build the graph. :param fu_name: name of the dataset that will be the root of the graph. :param type: type of the output image, can only be png or svg. :param width: width of the output image. :param height: height of the output image. :param sensitive: if true, ask with a prompt if the data used to build the graph are sensitive.

appabuild.cli.lca.validate_foreground_datasets(datasets_root: Annotated[str, typer.Argument(help='Root path of a set of foreground datasets.')])#

Validates a folder of foreground datasets. Show an error message for each invalid dataset. :param datasets_root: Root path of a set of foreground datasets.

appabuild.cli.lca.validate_size(size: int) int#
appabuild.cli.lca.validate_type(type: str) str#
appabuild.cli.lca.app#