Metadata-Version: 2.4
Name: compas_lca
Version: 1.0.2
Summary: bim-lca integration
Author-email: Eric Wuite <e.b.wuite@gmail.com>, Li Chen <leochen1990@gmail.com>
License: MIT License
        
        BRG
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/BlockResearchGroup/compas_lca
Project-URL: Documentation, https://github.com/BlockResearchGroup/compas_lca#readme
Project-URL: Repository, https://github.com/BlockResearchGroup/compas_lca
Project-URL: Changelog, https://github.com/BlockResearchGroup/compas_lca/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/BlockResearchGroup/compas_lca/issues
Project-URL: Forum, https://forum.compas-framework.org/
Classifier: Development Status :: 4 - Beta
Classifier: Topic :: Scientific/Engineering
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: compas>=2
Requires-Dist: compas_model
Requires-Dist: compas_ifc==2.0.0
Requires-Dist: ifcopenshell==0.8.4.post1
Requires-Dist: dotenv
Requires-Dist: pydantic==2.12.5
Requires-Dist: pydantic-ai==1.102.0
Requires-Dist: pyyaml
Requires-Dist: trafilatura
Requires-Dist: pandas
Requires-Dist: numpy
Requires-Dist: matplotlib
Requires-Dist: plotly
Requires-Dist: seaborn
Provides-Extra: dev
Requires-Dist: attrs>=17.4; extra == "dev"
Requires-Dist: black>=22.12.0; extra == "dev"
Requires-Dist: bump-my-version; extra == "dev"
Requires-Dist: compas_invocations2; extra == "dev"
Requires-Dist: invoke>=0.14; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: sphinx_compas2_theme; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: wheel; extra == "dev"
Dynamic: license-file

# compas_lca

AI-based Life Cycle Assessment (LCA) report generator for IFC building models.

`compas_lca` normalizes building data (from IFC) and environmental data (EPDs) into a unified schema that enables precise, customizable, and deterministic matching based on semantic and functional constraints.

In conventional BIM and environmental data schemas, critical classification and attribute information is often distributed across semi-structured and highly variable representations. `compas_lca` extracts and consolidates relevant attributes into an overlapping normalized format, enabling deterministic building-element to EPD matching and reproducible LCA report generation.

## Installation

Install from source:

```bash
git clone https://github.com/BlockResearchGroup/compas_lca.git
cd compas_lca
pip install -e ".[dev]"
```
# Setup

# 1. Download Dependencies

Download the [LCA database](https://drive.google.com/file/d/1f3A3flhQXG1KYwYv7hetk_ZY7b31kBg0/view?usp=drive_link)

Unzip the archive and move the extracted folder into the `data` directory such that the following path exists:
```bash
data/lca_database
```
# 2. Environment Configuration
* Add your API key to a `.env` file in the project root
* Specify project configurations in `config.yaml`
* Supported indicator values in `config.yaml` can be found in `src/compas_lca/inventory/constants.py` under the `OBD_INDICATOR_NAME` list.

# 3. Entry Point
All workflows are executed via:
```bash
python scripts/0_menu.py
```
## Building Model Extraction Workflow
* Drag and drop your IFC file into: `data/building_model`
* Configure relevant parameters in `config.yaml`
* Run `scripts/0_menu.py`
* Execute action points **01a to 01f** sequentially.

This workflow extracts, normalizes building model data for deterministic EPD matching and generates a report per configured emissions indicator.

NOTE: The matching parameters (score threshold and top_k matches) can be retroactively changed. Exit the menu, adjust the parameters, relaunch the menu and run action steps **01e and 01f**. This requires no API usage. Create a backup of initial files (if you want to compare results), as previous files will be overwritten!

## Environmental Data Extraction Workflow
* Review `oekobaudat_remaining.csv`
* Add UUIDs of selected elements to `epd_parser.yaml`
* Run `scripts/0_menu.py`
* Execute action points **02a to 02c** sequentially.

This workflow parses and integrates additional Environmental Product Declarations (EPDs) into the existing LCA database.

## Thesis Evaluation & Data Availability

The multi-LLM benchmark scripts accompanying the thesis chapter "Data Model for AI"
live in [`thesis/evaluation/`](thesis/evaluation/README.md). The benchmark datasets,
model outputs, and case-study artifacts are distributed as a separate data package
(see that README for access details); they are not committed to this repository.

## Issue Tracker

If you find a bug or if you have a problem with running the code, please file an issue on the [Issue Tracker](https://github.com/BlockResearchGroup/compas_lca/issues).
