From 379ed0da93d20c50f9f66c5779a661faa243aaf4 Mon Sep 17 00:00:00 2001 From: virio-andreyana Date: Fri, 24 Feb 2023 14:42:51 +0100 Subject: [PATCH] Sentence capitalized --- scripts/add_brownfield.py | 4 ++-- scripts/add_existing_baseyear.py | 4 ++-- scripts/make_summary.py | 2 +- scripts/plot_network.py | 4 ++-- scripts/plot_summary.py | 6 +++--- scripts/prepare_sector_network.py | 12 ++++++------ 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/scripts/add_brownfield.py b/scripts/add_brownfield.py index b68f5326..c25e13bd 100644 --- a/scripts/add_brownfield.py +++ b/scripts/add_brownfield.py @@ -16,7 +16,7 @@ from helper import override_component_attrs, update_config_with_sector_opts def add_brownfield(n, n_p, year): - logger.info(f"preparing brownfield for the year {year}") + logger.info(f"Preparing brownfield for the year {year}") # electric transmission grid set optimised capacities of previous as minimum n.lines.s_nom_min = n_p.lines.s_nom_opt @@ -126,7 +126,7 @@ if __name__ == "__main__": update_config_with_sector_opts(snakemake.config, snakemake.wildcards.sector_opts) - logger.info(f"preparing brownfield from the file {snakemake.input.network_p}") + logger.info(f"Preparing brownfield from the file {snakemake.input.network_p}") year = int(snakemake.wildcards.planning_horizons) diff --git a/scripts/add_existing_baseyear.py b/scripts/add_existing_baseyear.py index 7f21e8d1..6a975424 100644 --- a/scripts/add_existing_baseyear.py +++ b/scripts/add_existing_baseyear.py @@ -120,7 +120,7 @@ def add_power_capacities_installed_before_baseyear(n, grouping_years, costs, bas to read lifetime to estimate YearDecomissioning baseyear : int """ - logger.debug(f"adding power capacities installed before {baseyear} from powerplants.csv") + logger.debug(f"Adding power capacities installed before {baseyear} from powerplants.csv") df_agg = pd.read_csv(snakemake.input.powerplants, index_col=0) @@ -352,7 +352,7 @@ def add_heating_capacities_installed_before_baseyear(n, baseyear, grouping_years services proportional to heating load in both 50% capacities in rural busess 50% in urban buses """ - logger.debug(f"adding heating capacities installed before {baseyear}") + logger.debug(f"Adding heating capacities installed before {baseyear}") # Add existing heating capacities, data comes from the study # "Mapping and analyses of the current and future (2020 - 2030) diff --git a/scripts/make_summary.py b/scripts/make_summary.py index 599c5902..dcf5b801 100644 --- a/scripts/make_summary.py +++ b/scripts/make_summary.py @@ -540,7 +540,7 @@ def make_summaries(networks_dict): df[output] = pd.DataFrame(columns=columns, dtype=float) for label, filename in networks_dict.items(): - logger.info(f"make summary for scenario {label}, using {filename}") + logger.info(f"Make summary for scenario {label}, using {filename}") overrides = override_component_attrs(snakemake.input.overrides) n = pypsa.Network(filename, override_component_attrs=overrides) diff --git a/scripts/plot_network.py b/scripts/plot_network.py index 567cd9ba..dc420338 100644 --- a/scripts/plot_network.py +++ b/scripts/plot_network.py @@ -105,7 +105,7 @@ def plot_map(network, components=["links", "stores", "storage_units", "generator # drop non-bus to_drop = costs.index.levels[0].symmetric_difference(n.buses.index) if len(to_drop) != 0: - logger.info(f"dropping non-buses {to_drop.tolist()}") + logger.info(f"Dropping non-buses {to_drop.tolist()}") costs.drop(to_drop, level=0, inplace=True, axis=0, errors="ignore") # make sure they are removed from index @@ -754,7 +754,7 @@ def plot_series(network, carrier="AC", name="test"): to_drop = supply.columns[(abs(supply) < threshold).all()] if len(to_drop) != 0: - logger.info(f"dropping {to_drop.tolist()} from supply") + logger.info(f"Dropping {to_drop.tolist()} from supply") supply.drop(columns=to_drop, inplace=True) supply.index.name = None diff --git a/scripts/plot_summary.py b/scripts/plot_summary.py index 6f107e03..2b9e5534 100644 --- a/scripts/plot_summary.py +++ b/scripts/plot_summary.py @@ -136,7 +136,7 @@ def plot_costs(): to_drop = df.index[df.max(axis=1) < snakemake.config['plotting']['costs_threshold']] - logger.info(f"dropping technology with costs below {snakemake.config['plotting']['costs_threshold']} EUR billion per year") + logger.info(f"Dropping technology with costs below {snakemake.config['plotting']['costs_threshold']} EUR billion per year") logger.debug(df.loc[to_drop]) df = df.drop(to_drop) @@ -191,7 +191,7 @@ def plot_energy(): to_drop = df.index[df.abs().max(axis=1) < snakemake.config['plotting']['energy_threshold']] - logger.info(f"dropping all technology with energy consumption or production below {snakemake.config['plotting']['energy_threshold']} TWh/a") + logger.info(f"Dropping all technology with energy consumption or production below {snakemake.config['plotting']['energy_threshold']} TWh/a") logger.debug(df.loc[to_drop]) df = df.drop(to_drop) @@ -265,7 +265,7 @@ def plot_balances(): else: units = "TWh/a" - logger.info(f"dropping technology energy balance smaller than {snakemake.config['plotting']['energy_threshold']/10} {units}") + logger.info(f"Dropping technology energy balance smaller than {snakemake.config['plotting']['energy_threshold']/10} {units}") logger.debug(df.loc[to_drop]) df = df.drop(to_drop) diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index d0264c7d..a79961a4 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -706,7 +706,7 @@ def prepare_costs(cost_file, USD_to_EUR, discount_rate, Nyears, lifetime): def add_generation(n, costs): - logger.info("adding electricity generation") + logger.info("Adding electricity generation") nodes = pop_layout.index @@ -737,7 +737,7 @@ def add_generation(n, costs): def add_ammonia(n, costs): - logger.info("adding ammonia carrier with synthesis, cracking and storage") + logger.info("Adding ammonia carrier with synthesis, cracking and storage") nodes = pop_layout.index @@ -1495,7 +1495,7 @@ def add_heat(n, costs): # exogenously reduce space heat demand if options["reduce_space_heat_exogenously"]: dE = get(options["reduce_space_heat_exogenously_factor"], investment_year) - logger.info(f"assumed space heat reduction of {dE:.2%}") + logger.info(f"Assumed space heat reduction of {dE:.2%}") for sector in sectors: heat_demand[sector + " space"] = (1 - dE) * heat_demand[sector + " space"] @@ -2647,7 +2647,7 @@ def maybe_adjust_costs_and_potentials(n, opts): # TODO this should rather be a config no wildcard def limit_individual_line_extension(n, maxext): - logger.info(f"limiting new HVAC and HVDC extensions to {maxext} MW") + logger.info(f"Limiting new HVAC and HVDC extensions to {maxext} MW") n.lines['s_nom_max'] = n.lines['s_nom'] + maxext hvdc = n.links.index[n.links.carrier == 'DC'] n.links.loc[hvdc, 'p_nom_max'] = n.links.loc[hvdc, 'p_nom'] + maxext @@ -2814,7 +2814,7 @@ def set_temporal_aggregation(n, opts, solver_name): m = re.match(r"(^\d+)sn$", o, re.IGNORECASE) if m is not None: sn = int(m[1]) - logger.info(f"use every {sn} snapshot as representative") + logger.info(f"Use every {sn} snapshot as representative") n.set_snapshots(n.snapshots[::sn]) n.snapshot_weightings *= sn break @@ -2822,7 +2822,7 @@ def set_temporal_aggregation(n, opts, solver_name): m = re.match(r"^(\d+)seg$", o, re.IGNORECASE) if m is not None: segments = int(m[1]) - logger.info(f"use temporal segmentation with {segments} segments") + logger.info(f"Use temporal segmentation with {segments} segments") n = apply_time_segmentation(n, segments, solver_name=solver_name) break return n