Getting started
Warning: At the moment, EcoInvent is required to run Appa Build, even if you don't use it in your project. This will be fixed in February.
Installation
Appa Build and Appa Run are available on PyPI. Appa Build requires at least Python 3.10, while Appa Run requires at least Python 3.9. Tested and recommended version is Python 3.11. Since Appa Run is required by Appa Build, you can install both by using:
If you only need Appa Run, you can use:
We recommend using virtualenv to limit the risks of package dependency conflicts, that are likely to occur with Appa Build, as Brightway requires a specific version of numpy to run.
Installation with source code
You may need to install Appa Build and/or Appa Run from source if you intend to modify the source or change some package versions in requirements.txt.
Appa Run
Clone the repository first:
It is recommended to use a virtualenv before installing Appa Run package dependencies. You can then use:
If you want to use Appa Run to run Appa Build, or to use its CLI, you need to build the package:
If necessary, you can install wheel using pip install wheel
.
Appa Build
Clone the repository first:
To install the dependencies of Appa Build (using the desired Python installation), you will need to specify the path of the packaged Appa Run:
Replacing X.X.X
with the appropriate version.
If you want to use the Appa Build CLI, you need to build the package:
If necessary, you can install wheel using pip install wheel
.
Usage
Appa Build and Appa Run most basic interface are their command line interfaces (CLIs). The following CLI commands will allow you to verify that both packages are properly installed by respectively building and running a sample impact model.
Appa Build
To test your Appa Build installation, you can set the project directory with the BRIGHTWAY2_DIR
environment variable.
You will also need an EcoInvent database. The tested version is 3.9.1 cutoff.
You must indicate the path of the folder containing the .spold datasets in samples/conf/appalca_conf.yaml
.
More information can be found in section Appa Build Basics.
Documentation about the CLI can be obtained by running the following command:
Here is an example of the Appa Build CLI call to build the demo impact model:
Both arguments are covered in section Appa Build basics.
Appa Run
You will need an environment variable to specify where the impact models are located.
Documentation about the CLI can be obtained by running the following command:
Here is an example of Appa Run CLI call to use the demo impact model: