diff --git a/Snakefile b/Snakefile index a78360a..230713c 100644 --- a/Snakefile +++ b/Snakefile @@ -4,8 +4,10 @@ import pathlib + configfile: "config.yaml" + rule compile_cost_assumptions: input: inflation_rate="inputs/prc_hicp_aind__custom_9928419_spreadsheet.xlsx", diff --git a/scripts/_helpers.py b/scripts/_helpers.py index 264ff8a..4c46817 100644 --- a/scripts/_helpers.py +++ b/scripts/_helpers.py @@ -4,15 +4,14 @@ # coding: utf-8 +import logging import re +import sys from pathlib import Path import numpy as np import pandas as pd -import logging -import sys - class Dict(dict): """ diff --git a/scripts/compile_cost_assumptions_usa.py b/scripts/compile_cost_assumptions_usa.py index 63c81b7..ecdc969 100644 --- a/scripts/compile_cost_assumptions_usa.py +++ b/scripts/compile_cost_assumptions_usa.py @@ -9,8 +9,9 @@ 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 """ -import pathlib import logging +import pathlib + import numpy as np import pandas as pd 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 else: raise Exception(f"{year_val} is not a considered year") - logger.info("The file {} is used for year {}".format(input_atb_path, year_val)) + logger.info(f"The file {input_atb_path} is used for year {year_val}") manual_input_usa_df = pre_process_manual_input_usa( input_file_manual_input_usa, @@ -1072,7 +1073,9 @@ def duplicate_fuel_cost(input_file_path: str, list_of_years: list) -> pd.DataFra if len(output_cost_path_list) == 1: output_cost_path = output_cost_path_list[0] updated_cost_df.to_csv(output_cost_path, index=False) - logger.info("The cost assumptions file for the US has been compiled for year {}".format(year_val)) + logger.info( + f"The cost assumptions file for the US has been compiled for year {year_val}" + ) else: raise Exception( "Please verify the list of cost files. It may contain duplicates."