Skip to content

Commit 518c616

Browse files
committed
code: pre-commit run --all
1 parent 9257fdc commit 518c616

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

Snakefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
import pathlib
66

7+
78
configfile: "config.yaml"
89

10+
911
rule compile_cost_assumptions:
1012
input:
1113
inflation_rate="inputs/prc_hicp_aind__custom_9928419_spreadsheet.xlsx",

scripts/_helpers.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44

55
# coding: utf-8
66

7+
import logging
78
import re
9+
import sys
810
from pathlib import Path
911

1012
import numpy as np
1113
import pandas as pd
1214

13-
import logging
14-
import sys
15-
1615

1716
class Dict(dict):
1817
"""

scripts/compile_cost_assumptions_usa.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
The input files are in parquet format and can be downloaded from https://data.openei.org/s3_viewer?bucket=oedi-data-lake&prefix=ATB%2Felectricity%2Fparquet%2F
1010
"""
1111

12-
import pathlib
1312
import logging
13+
import pathlib
14+
1415
import numpy as np
1516
import pandas as pd
1617
from _helpers import adjust_for_inflation, configure_logging, mock_snakemake
@@ -966,7 +967,7 @@ def duplicate_fuel_cost(input_file_path: str, list_of_years: list) -> pd.DataFra
966967
else:
967968
raise Exception(f"{year_val} is not a considered year")
968969

969-
logger.info("The file {} is used for year {}".format(input_atb_path, year_val))
970+
logger.info(f"The file {input_atb_path} is used for year {year_val}")
970971

971972
manual_input_usa_df = pre_process_manual_input_usa(
972973
input_file_manual_input_usa,
@@ -1072,7 +1073,9 @@ def duplicate_fuel_cost(input_file_path: str, list_of_years: list) -> pd.DataFra
10721073
if len(output_cost_path_list) == 1:
10731074
output_cost_path = output_cost_path_list[0]
10741075
updated_cost_df.to_csv(output_cost_path, index=False)
1075-
logger.info("The cost assumptions file for the US has been compiled for year {}".format(year_val))
1076+
logger.info(
1077+
f"The cost assumptions file for the US has been compiled for year {year_val}"
1078+
)
10761079
else:
10771080
raise Exception(
10781081
"Please verify the list of cost files. It may contain duplicates."

0 commit comments

Comments
 (0)