|
10 | 10 |
|
11 | 11 |
|
12 | 12 | def get_change_report_filepath(version: str, release: EcoinventRelease) -> Path:
|
13 |
| - """Get the filepath to the Excel change report file""" |
| 13 | + """Get the filepath to the Excel change report file. |
| 14 | +
|
| 15 | + Download a list of extra files from ecoinvent and do pattern matching.""" |
14 | 16 | files = release.list_extra_files(version)
|
15 | 17 | candidates = [key for key in files if "change report" in key.lower() and "annex" in key.lower()]
|
16 | 18 | if not candidates:
|
@@ -59,6 +61,7 @@ def setup_project(
|
59 | 61 | ecoinvent_username: Optional[str] = None,
|
60 | 62 | ecoinvent_password: Optional[str] = None,
|
61 | 63 | ) -> None:
|
| 64 | + """Switch to or create a Brightway project, and install the source and target databases.""" |
62 | 65 | bd.projects.set_current(project_name)
|
63 | 66 |
|
64 | 67 | if f"ecoinvent-{source_version}-{system_model}" not in bd.databases:
|
@@ -90,6 +93,16 @@ def setup_project(
|
90 | 93 |
|
91 | 94 |
|
92 | 95 | def get_brightway_databases(source_version: str, target_version: str, system_model: str):
|
| 96 | + """Get database names and process caches for source and target databases. |
| 97 | +
|
| 98 | + Returns: |
| 99 | +
|
| 100 | + * `source_db_name`: str. Standardized name for ecoinvent based on `ecoinvent_interface` standard |
| 101 | + * `target_db_name`: str. Standardized name for ecoinvent based on `ecoinvent_interface` standard |
| 102 | + * `source_lookup`: dict. Dictionary from attribute tuple (name, location, reference product) to `Node` object. |
| 103 | + * `target_lookup`: dict. Dictionary from attribute tuple (name, location, reference product) to `Node` object. |
| 104 | +
|
| 105 | + """ |
93 | 106 | source_db_name = f"ecoinvent-{source_version}-{system_model}"
|
94 | 107 | target_db_name = f"ecoinvent-{target_version}-{system_model}"
|
95 | 108 | if source_db_name not in bd.databases:
|
|
0 commit comments