Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
romainsacchi committed Oct 15, 2023
2 parents 6f35f40 + f5208b5 commit 3a8bcf9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
10 changes: 6 additions & 4 deletions unfold/brightway25_export.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
from bw2data import databases, Database
from bw2io.importers.base_lci import LCIImporter
from copy import copy
import itertools
from copy import copy

from bw2data import Database, databases
from bw2io.importers.base_lci import LCIImporter


def write_brightway_database(data, name):
# Restore parameters to Brightway2 format
# which allows for uncertainty and comments
BW25UnfoldExporter(name, data).write_database()


class BW25UnfoldExporter(LCIImporter):
"""
Inherits from `LCIImporter` to
Expand All @@ -27,7 +30,6 @@ def __init__(self, db_name, data):
# to allow existing databases
# to be overwritten
def write_database(self):

def no_exchange_generator(data):
for ds in data:
cp = copy(ds)
Expand Down
1 change: 1 addition & 0 deletions unfold/unfold.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

try:
import bw_processing

from .brightway25_export import write_brightway_database

except ImportError:
Expand Down

0 comments on commit 3a8bcf9

Please sign in to comment.