File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,3 +127,4 @@ dmypy.json
127127
128128# Pyre type checker
129129.pyre /
130+ pyrightconfig.json
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ dependencies = [
3737 " pyecospold" ,
3838 " randonneur>=0.6" ,
3939 " randonneur_data" ,
40+ " structlog" ,
4041 " tqdm" ,
4142 " typer" ,
4243 " xmltodict" ,
Original file line number Diff line number Diff line change 22from pathlib import Path
33
44import bw_simapro_csv
5- from loguru import logger
5+ import structlog
6+
7+ logger = structlog .get_logger ("filemapper" )
68
79
810def is_simapro_csv_file (fp : Path ) -> bool :
@@ -14,7 +16,7 @@ def is_simapro_csv_file(fp: Path) -> bool:
1416 ].project
1517 return True
1618 except :
17- logger .critical ("Skipping {a} as we can't read it as a SimaPro file" , a = fp .name )
19+ logger .critical ("Skipping file %s as we can't read it as a SimaPro file" , fp .name )
1820 return False
1921
2022
Original file line number Diff line number Diff line change 22from pathlib import Path
33
44import pyecospold
5- from loguru import logger
6-
7- # def is_simapro_csv_file(fp: Path) -> bool:
8- # if not fp.is_file() or not fp.suffix.lower() == ".csv":
9- # return False
10- # try:
11- # bw_simapro_csv.header.parse_header(open(fp, encoding="sloppy-windows-1252"))[0].project
12- # return True
13- # except:
14- # logger.critical("Skipping {a} as we can't read it as a SimaPro file", a=fp.name)
15- # return False
165
176
187def simapro_ecospold1_biosphere_extractor (dirpath : Path , output_fp : Path ) -> None :
You can’t perform that action at this time.
0 commit comments