Skip to content

Commit

Permalink
fixed project.impact_categories
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Kongsgaard committed Jul 6, 2023
1 parent 13807cf commit 29fcfb6
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "lcax"
description = "LCAx is an open, machine and human-readable data format for exchanging LCA results."
version = "0.1.6"
version = "0.1.7"
authors = ["Christian Kongsgaard <christian@kongsgaard.eu>"]
edition = "2018"
readme = "README.md"
Expand Down
1 change: 1 addition & 0 deletions docs/examples/basic_project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"format_version": "0.1.4",
"lcia_method": "EN15804",
"classification_system": "BIM7AA",
"life_span": 50,
"life_cycle_stages": [
"A1A3",
"C3",
Expand Down
33 changes: 31 additions & 2 deletions src/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ pub struct LCAxProject {
location: String,
format_version: String,
lcia_method: Option<String>,
meta_data: Option<HashMap<String, String>>,
classification_system: Option<String>,
life_span: Option<u8>,
life_cycle_stages: Vec<LifeCycleStage>,
impact_categories: Vec<ImpactCategory>,
impact_categories: Vec<ImpactCategoryKey>,
emission_parts: HashMap<String, Assembly>,
results: Option<Results>,
meta_data: Option<HashMap<String, String>>,
}

#[derive(Deserialize, Serialize, JsonSchema)]
Expand All @@ -40,6 +41,34 @@ enum LifeCycleStage {
D,
}

#[derive(Deserialize, Serialize, JsonSchema)]
enum ImpactCategoryKey {
GWP,
ODP,
AP,
EP,
POCP,
ADPE,
ADPF,
PENRE,
PERE,
PERM,
PERT,
PENRT,
PENRM,
SM,
RSF,
NRSF,
FW,
HWD,
NHWD,
RWD,
CRU,
MRF,
MER,
EEE,
EET
}

#[derive(Deserialize, Serialize, JsonSchema)]
pub struct Assembly {
Expand Down

0 comments on commit 29fcfb6

Please sign in to comment.