Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: turn food process category into a list #795

Merged
merged 15 commits into from
Oct 17, 2024
6 changes: 3 additions & 3 deletions data/common/import_.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import re
import sys
from os.path import dirname
from subprocess import call
from zipfile import ZipFile

Expand All @@ -13,7 +14,6 @@

from common.export import create_activity, delete_exchange, new_exchange, search

BIOSPHERE = "biosphere3"
vjousse marked this conversation as resolved.
Show resolved Hide resolved
AGRIBALYSE_PACKAGINGS = [
"PS",
"LDPE",
Expand Down Expand Up @@ -173,7 +173,7 @@ def add_variant_activity(activity_data, dbname):
def import_simapro_csv(
datapath,
dbname,
biosphere=BIOSPHERE,
biosphere="biosphere3",
migrations=[],
first_strategies=[],
excluded_strategies=[],
Expand All @@ -187,7 +187,7 @@ def import_simapro_csv(
# unzip
with ZipFile(datapath) as zf:
print("### Extracting the zip file...")
zf.extractall(path=os.path.dirname(datapath))
zf.extractall(path=dirname(datapath))
unzipped = datapath[0:-4]

if "AGB" in datapath:
Expand Down
Loading