appabuild.setup#

Setup everything required to build an ImpactModel

Functions#

build(lca_config_path[, foreground_database])

Build an impact model for the configured functional unit and save it to the disk (to the location configured in the file).

initialize(...)

Initialize a Brightway environment (background and foreground databases).

project_setup(...)

Triggers all Brightway functions and database import necessary to build an Impact

Module Contents#

appabuild.setup.build(lca_config_path: str, foreground_database: appabuild.database.databases.ForegroundDatabase | None = None)#

Build an impact model for the configured functional unit and save it to the disk (to the location configured in the file). :param lca_config_path: information about the current LCA, such as functional unit, list of methods. :param foreground_database: database containing the LCA functional unit :return the impact model

appabuild.setup.initialize(appabuild_config_path: str) appabuild.database.databases.ForegroundDatabase#

Initialize a Brightway environment (background and foreground databases). :param appabuild_config_path: generic information required by Appa Build to be initialized, such as location of EcoInvent or name of Brightway project. This config file should remain the same for all your LCAs. :return: the initialized foreground database

appabuild.setup.project_setup(project_name: str, foreground_name: str, foreground_path: str, ecoinvent_name: str | None = None, ecoinvent_path: str | None = None) appabuild.database.databases.ForegroundDatabase#

Triggers all Brightway functions and database import necessary to build an Impact Model. :param project_name: Brightway project name. :param ecoinvent_name: how EcoInvent is referred to in user datasets. :param ecoinvent_path: path to EcoInvent database. :param foreground_name: how user database is referred to. :param foreground_path: path to folder containing user datasets.