Skip to content

Commit

Permalink
0.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
cmutel committed Dec 11, 2024
1 parent 45e7a6e commit bf8aec2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion bw_simapro_csv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"SimaProCSVType",
)

__version__ = "0.3.3"
__version__ = "0.3.4"

# Makes `sloppy-windows-1252` encoding available
import ftfy
Expand Down
9 changes: 7 additions & 2 deletions bw_simapro_csv/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bf8aec2

Please sign in to comment.