From bf8aec2ed6b03dec831dfc3403d9696e83064249 Mon Sep 17 00:00:00 2001 From: Chris Mutel Date: Wed, 11 Dec 2024 07:50:03 +0100 Subject: [PATCH] 0.3.4 --- CHANGES.md | 4 ++++ bw_simapro_csv/__init__.py | 2 +- bw_simapro_csv/main.py | 9 +++++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index e8db7fa..1f29687 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # `bw_simapro_csv` Changelog +## [0.3.4] - 2024-12-05 + +* Fix missing input argument for name shortening in `SimaProCSV` class method + ## [0.3.3] - 2024-12-05 * Making name shortening in MFP name generation configurable diff --git a/bw_simapro_csv/__init__.py b/bw_simapro_csv/__init__.py index f862b1a..935c6e3 100644 --- a/bw_simapro_csv/__init__.py +++ b/bw_simapro_csv/__init__.py @@ -4,7 +4,7 @@ "SimaProCSVType", ) -__version__ = "0.3.3" +__version__ = "0.3.4" # Makes `sloppy-windows-1252` encoding available import ftfy diff --git a/bw_simapro_csv/main.py b/bw_simapro_csv/main.py index fa5a47a..b6ddb7a 100644 --- a/bw_simapro_csv/main.py +++ b/bw_simapro_csv/main.py @@ -183,12 +183,17 @@ def __iter__(self): return iter(self.blocks) def to_brightway( - self, filepath: Optional[Path] = None, separate_products: bool = True + self, + filepath: Optional[Path] = None, + separate_products: bool = True, + shorten_names: bool = True, ) -> Union[dict, Path]: if self.header["kind"] == SimaProCSVType.processes: from .brightway import lci_to_brightway - data = lci_to_brightway(self, separate_products=separate_products) + data = lci_to_brightway( + self, separate_products=separate_products, shorten_names=shorten_names + ) if filepath is not None: with open(filepath, "w") as f: json.dump(data, f, indent=2, ensure_ascii=False, default=json_serializer)