Skip to content

Commit

Permalink
Merge pull request #227 from brightway-lca/ecoinvent-import
Browse files Browse the repository at this point in the history
Add `import_ecoinvent_release` utility
  • Loading branch information
cmutel authored Nov 9, 2023
2 parents 7e605cb + b596c21 commit 244f471
Show file tree
Hide file tree
Showing 9 changed files with 414 additions and 44 deletions.
12 changes: 6 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
matrix:
Python310:
python.version: '3.10'
Python37:
python.version: '3.9'
Python311:
python.version: '3.11'

timeoutInMinutes: 20
steps:
Expand Down Expand Up @@ -43,8 +43,8 @@ jobs:
vmImage: 'macOS-latest'
strategy:
matrix:
Python310:
python.version: '3.10'
Python311:
python.version: '3.11'

timeoutInMinutes: 20
steps:
Expand Down Expand Up @@ -73,8 +73,8 @@ jobs:
vmImage: 'windows-latest'
strategy:
matrix:
Python310:
python.version: '3.10'
Python311:
python.version: '3.11'

timeoutInMinutes: 60
steps:
Expand Down
12 changes: 11 additions & 1 deletion bw2io/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"exiobase_monetary",
"get_csv_example_filepath",
"get_xlsx_example_filepath",
"import_ecoinvent_release",
"install_project",
"lci_matrices_to_excel",
"lci_matrices_to_matlab",
Expand All @@ -41,9 +42,9 @@
"SimaProLCIACSVImporter",
"SingleOutputEcospold1Importer",
"SingleOutputEcospold2Importer",
"useeio11",
"unlinked_data",
"UnlinkedData",
"useeio11",
]

from .version import version as __version__
Expand Down Expand Up @@ -94,6 +95,15 @@
from .utils import activity_hash, es2_activity_hash, load_json_data_file
from .remote import install_project

try:
from .ecoinvent import import_ecoinvent_release
except ImportError:
import warnings

def import_ecoinvent_release(*args, **kwargs):
warnings.warn("Please install `ecoinvent_interface` to use this function")


from bw2data import config, databases

config.metadata.extend(
Expand Down
Loading

0 comments on commit 244f471

Please sign in to comment.