Contributing to the Examples#

You can contribute examples to the Brightway Documentation webpage by following these steps:

Write your Notebook#

Prerequisites

  1. Basic knowledge of Jupyter Notebooks

  2. A working installation of Conda

  3. Basic knowledge of Conda environments

Write your Jupyter Notebook, using the template provided below. Make sure to include a Conda environment file in YAML format to ensure other users will be able to re-create your example from scratch.

Download Notebook Template

template.ipynb
template.yaml

Format your Notebook#

Prerequisites

  1. Basic knowledge of the MyST Markdown syntax

Please follow the formatting instructions from the Formatting Guide.

Add your Notebook#

Prerequisites

  1. Basic knowledge of the GitHub contribution workflow (fork, branch, pull request)

  2. A fork of the brightway-examples repository

  3. Your finished example notebook

Once you are happy with your example, you can start the process to add it to the Brightway Documentation webpage.

All examples are collected in the brightway-examples repository. To add your example, determine the appropriate location for it in the repository structure.

For instance, an example about importing data from the Ecoinvent 3.9.1 database should be added to the data_import directory:

.
└── brightway-examples/
    └── data_import/
        └── ecoinvent_3-9-1_import/
            β”œβ”€β”€ ecoinvent_3-9-1_import.ipynb
            └── ecoinvent_3-9-1_import.yaml

Add your example to the approriate location in your fork of the brightway-examples repository. Make sure to include the .ipynb and .yaml files. Finally, open a pull request. Once the pull request has been merged by a member of the Brightway Development team, your example will be added to the Brightway Documentation webpage.