#open #format #results #human-readable #machine #standardized #lca

bin+lib lcax

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

25 releases (stable)

1.7.0 Apr 8, 2024
1.6.0 Mar 26, 2024
1.4.2 Jan 1, 2024
1.4.1 Dec 31, 2023
0.1.7 Jul 6, 2023

#249 in Development tools

Download history 7/week @ 2023-12-31 11/week @ 2024-02-25 5/week @ 2024-03-10 188/week @ 2024-03-24 29/week @ 2024-03-31 124/week @ 2024-04-07

342 downloads per month

Custom license

18MB
3.5K SLoC

Rust 2K SLoC // 0.0% comments Python 645 SLoC // 0.0% comments C# 383 SLoC JavaScript 275 SLoC // 0.0% comments TypeScript 257 SLoC // 0.1% comments TSX 11 SLoC

Contains (ELF lib, 18MB) packages/python/src/lcax/lcax.abi3.so

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 \
--input-file-type jsonschema \
--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

Build JS Package

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

Run JS Tests

npm run test

Dependencies

~20–28MB
~73K SLoC