brightway-lca / brightway2-data

Tools for the management of inventory databases and impact assessment methods. Part of the Brightway LCA framework.
https://docs.brightway.dev/
BSD 3-Clause "New" or "Revised" License
11 stars 24 forks source link

add warning when creating an edge of an "unexpected" type #132

Closed mfastudillo closed 12 months ago

mfastudillo commented 1 year ago

when creating a database it is perfectly possible to do something like this

iron_bike.new_edge(amount=12,type='technosphereeee',input=steel).save()

I think it would be helpful if it throws a warning, if the type is not one of the expected 'type'. Typos are common when we write strings

cmutel commented 12 months ago

https://github.com/brightway-lca/brightway2-data/blob/main/bw2data/backends/typos.py