Generic EPD Aggregator¶
Features¶
Parse ILCD process and flow XMLs
Normalize material properties and LCIA modules
Aggregate impacts and compute weighted averages
Write new ILCD XML datasets
Installation¶
Install via PyPI:
pip install materia-epd
Requires Python 3.10+.
Usage¶
Here’s a minimal example:
python -m materia_epd <generic_processes_dir> <epd_processes_dir> -o <output_dir> -v
Note that you need to point to the \root\processes folders and need to provide a \matches folder in the generic data folder to link generic products and EPDs.
Add the flag –v or -v for verbosity. Logs files with details will be automatically created in <output_dir>.
The <generic_processes_dir> folder should be structured like this:
<generic_process_dir>
├── flows
│ ├── <flow-uuid-1>.xml # Reference flow of EPD-uuid-1
│ ├── <flow-uuid-2>.xml
│ └── ...etc
├── matches
│ ├── <matches-uuid-1>.json # Source EPDs for EPD-uuid-1
│ ├── <matches-uuid-1>.json
│ └── ...etc
├── PDFs
├── processes
│ ├── <EDP-uuid-1.xml> # Ready-to-fill skeleton file specific for EPD-uuid-1
│ ├── <EDP-uuid-2.xml>
│ └── ...etc
└── templates
├── GenPro_template.xml # Template with the EPD schema
└── GenRef_template.xml # Template with the flow schema
The <epd_process_dir> should have a structure like this:
<epd_process_dir>
├── flows # Contains all reference flows of all processes
└── processes # Contains all the potential source EPDs
The .json files are named after corresponding generic products and should be structured as follows:
{
"type": "<aggregation_type>", // "average" or "assembled"
"uuids": [
"<uuid-1>",
"<uuid-2>",
"<uuid-3>",
"... more UUIDs ..."
]
}
where the provided uuids link to the process files of the EPDs that match.
Development / running tests¶
For local development, install the package in editable mode with developer dependencies:
python -m pip install -e ".[dev]"
Then run tests:
pytest