#data #lca #open #format #epd #human-readable #calculations

lcax_calculation

LCAx is an open, machine and human-readable data format for exchanging LCA results

7 stable releases

2.6.1 Nov 4, 2024
2.6.0 Sep 27, 2024
2.5.1 Aug 20, 2024
2.4.0 Jul 26, 2024

#294 in Value formatting

Download history 2/week @ 2024-08-10 275/week @ 2024-08-17 26/week @ 2024-08-24 4/week @ 2024-08-31 142/week @ 2024-09-14 149/week @ 2024-09-21 67/week @ 2024-09-28 8/week @ 2024-10-05 11/week @ 2024-10-12 3/week @ 2024-10-19 146/week @ 2024-11-02 16/week @ 2024-11-09 5/week @ 2024-11-16 2/week @ 2024-11-23

169 downloads per month
Used in 2 crates

Custom license

66KB
1.5K SLoC

LCAx

The goal for LCAx is to make an open, machine and human-readable data format for exchanging LCA results, EPD's and assemblies.

We propose a simple three level data format with information on project, assembly and EPD level, written in an open data format and paired with a validator for a more robust and standardized format. We intend to create connections to existing tools and API’s.

Our goal is making LCA calculations more accessible, transparent, and open.

LCAx

Rust

Install Rust

Head over to Rust's installation page

Install Rust Dependencies

cargo update

Run Rust Tests

cargo test --package lcax --target x86_64-unknown-linux-gnu

Export JSON Schema

cargo run --target x86_64-unknown-linux-gnu --bin export-schema > lcax.schema.json

Python

Install Python Dependencies

pip install maturin venv

Run Python Tests

maturin develop --extras tests,codegen --target x86_64-unknown-linux-gnu
source .venv/bin/activate .

datamodel-codegen \
--input lcax.schema.json \
--output packages/python/src/lcax/pydantic.py
          
cd packages/python
pytest tests/

Build Documentation

maturin develop --extras doc --target x86_64-unknown-linux-gnu
mkdocs serve

JavaScript/TypeScript

Install wasm-pack

curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

Build JS Package

cd modules/lcax
wasm-pack build --features jsbindings
mv pkg/lcax* ../../packages/javascript/src

Run JS Tests

npm run test

Dependencies

~4–12MB
~170K SLoC