diff --git a/config.default.yaml b/config.default.yaml index 28b9e91b..1fbc4deb 100755 --- a/config.default.yaml +++ b/config.default.yaml @@ -9,8 +9,6 @@ logging: level: INFO format: '%(levelname)s:%(name)s:%(message)s' -logging_level: INFO - run: name: "" # use this to keep track of runs with different settings shared_cutouts: false # set to true to share the default cutout(s) across runs diff --git a/scripts/add_brownfield.py b/scripts/add_brownfield.py index 4bd13810..a25ea5d0 100644 --- a/scripts/add_brownfield.py +++ b/scripts/add_brownfield.py @@ -134,7 +134,7 @@ if __name__ == "__main__": planning_horizons=2030, ) - logging.basicConfig(level=snakemake.config["logging_level"]) + logging.basicConfig(level=snakemake.config["logging"]["level"]) update_config_with_sector_opts(snakemake.config, snakemake.wildcards.sector_opts) diff --git a/scripts/add_existing_baseyear.py b/scripts/add_existing_baseyear.py index 41c0fada..52f412ec 100644 --- a/scripts/add_existing_baseyear.py +++ b/scripts/add_existing_baseyear.py @@ -612,7 +612,7 @@ if __name__ == "__main__": planning_horizons=2020, ) - logging.basicConfig(level=snakemake.config["logging_level"]) + logging.basicConfig(level=snakemake.config["logging"]["level"]) update_config_with_sector_opts(snakemake.config, snakemake.wildcards.sector_opts) diff --git a/scripts/build_energy_totals.py b/scripts/build_energy_totals.py index 338cc232..9c5948cd 100644 --- a/scripts/build_energy_totals.py +++ b/scripts/build_energy_totals.py @@ -751,7 +751,7 @@ if __name__ == "__main__": snakemake = mock_snakemake("build_energy_totals") - logging.basicConfig(level=snakemake.config["logging_level"]) + logging.basicConfig(level=snakemake.config["logging"]["level"]) config = snakemake.config["energy"] diff --git a/scripts/build_gas_input_locations.py b/scripts/build_gas_input_locations.py index 9b1328e4..b6ffee06 100644 --- a/scripts/build_gas_input_locations.py +++ b/scripts/build_gas_input_locations.py @@ -84,7 +84,7 @@ if __name__ == "__main__": clusters="37", ) - logging.basicConfig(level=snakemake.config["logging_level"]) + logging.basicConfig(level=snakemake.config["logging"]["level"]) regions = load_bus_regions( snakemake.input.regions_onshore, snakemake.input.regions_offshore diff --git a/scripts/build_gas_network.py b/scripts/build_gas_network.py index 4a052174..72c2f93c 100644 --- a/scripts/build_gas_network.py +++ b/scripts/build_gas_network.py @@ -144,7 +144,7 @@ if __name__ == "__main__": snakemake = mock_snakemake("build_gas_network") - logging.basicConfig(level=snakemake.config["logging_level"]) + logging.basicConfig(level=snakemake.config["logging"]["level"]) gas_network = load_dataset(snakemake.input.gas_network) diff --git a/scripts/build_industrial_distribution_key.py b/scripts/build_industrial_distribution_key.py index 12cffe43..0502bf0f 100644 --- a/scripts/build_industrial_distribution_key.py +++ b/scripts/build_industrial_distribution_key.py @@ -142,7 +142,7 @@ if __name__ == "__main__": clusters=48, ) - logging.basicConfig(level=snakemake.config["logging_level"]) + logging.basicConfig(level=snakemake.config["logging"]["level"]) regions = gpd.read_file(snakemake.input.regions_onshore).set_index("name") diff --git a/scripts/build_industrial_production_per_country.py b/scripts/build_industrial_production_per_country.py index 80189321..b56956db 100644 --- a/scripts/build_industrial_production_per_country.py +++ b/scripts/build_industrial_production_per_country.py @@ -294,7 +294,7 @@ if __name__ == "__main__": snakemake = mock_snakemake("build_industrial_production_per_country") - logging.basicConfig(level=snakemake.config["logging_level"]) + logging.basicConfig(level=snakemake.config["logging"]["level"]) countries = non_EU + eu28 diff --git a/scripts/build_population_layouts.py b/scripts/build_population_layouts.py index d624349f..9b508ac5 100644 --- a/scripts/build_population_layouts.py +++ b/scripts/build_population_layouts.py @@ -21,7 +21,7 @@ if __name__ == "__main__": snakemake = mock_snakemake("build_population_layouts") - logging.basicConfig(level=snakemake.config["logging_level"]) + logging.basicConfig(level=snakemake.config["logging"]["level"]) cutout = atlite.Cutout(snakemake.config["atlite"]["cutout"]) diff --git a/scripts/cluster_gas_network.py b/scripts/cluster_gas_network.py index 95c10eac..ce0c79a2 100755 --- a/scripts/cluster_gas_network.py +++ b/scripts/cluster_gas_network.py @@ -108,7 +108,7 @@ if __name__ == "__main__": snakemake = mock_snakemake("cluster_gas_network", simpl="", clusters="37") - logging.basicConfig(level=snakemake.config["logging_level"]) + logging.basicConfig(level=snakemake.config["logging"]["level"]) fn = snakemake.input.cleaned_gas_network df = pd.read_csv(fn, index_col=0) diff --git a/scripts/make_summary.py b/scripts/make_summary.py index 1d7fe068..840af9ba 100644 --- a/scripts/make_summary.py +++ b/scripts/make_summary.py @@ -673,7 +673,7 @@ if __name__ == "__main__": snakemake = mock_snakemake("make_summary") - logging.basicConfig(level=snakemake.config["logging_level"]) + logging.basicConfig(level=snakemake.config["logging"]["level"]) networks_dict = { (cluster, lv, opt + sector_opt, planning_horizon): snakemake.config[ diff --git a/scripts/plot_network.py b/scripts/plot_network.py index 1941ab84..fed50b40 100644 --- a/scripts/plot_network.py +++ b/scripts/plot_network.py @@ -919,7 +919,7 @@ if __name__ == "__main__": planning_horizons="2050", ) - logging.basicConfig(level=snakemake.config["logging_level"]) + logging.basicConfig(level=snakemake.config["logging"]["level"]) overrides = override_component_attrs(snakemake.input.overrides) n = pypsa.Network(snakemake.input.network, override_component_attrs=overrides) diff --git a/scripts/plot_summary.py b/scripts/plot_summary.py index 1427e5cf..570f2d32 100644 --- a/scripts/plot_summary.py +++ b/scripts/plot_summary.py @@ -543,7 +543,7 @@ if __name__ == "__main__": snakemake = mock_snakemake("plot_summary") - logging.basicConfig(level=snakemake.config["logging_level"]) + logging.basicConfig(level=snakemake.config["logging"]["level"]) n_header = 4 diff --git a/scripts/prepare_sector_network.py b/scripts/prepare_sector_network.py index 062d598a..3c0ed11d 100644 --- a/scripts/prepare_sector_network.py +++ b/scripts/prepare_sector_network.py @@ -3248,7 +3248,7 @@ if __name__ == "__main__": planning_horizons="2020", ) - logging.basicConfig(level=snakemake.config["logging_level"]) + logging.basicConfig(level=snakemake.config["logging"]["level"]) update_config_with_sector_opts(snakemake.config, snakemake.wildcards.sector_opts) diff --git a/scripts/solve_sector_network.py b/scripts/solve_sector_network.py index 41725012..72eb7ac6 100644 --- a/scripts/solve_sector_network.py +++ b/scripts/solve_sector_network.py @@ -328,7 +328,7 @@ if __name__ == "__main__": ) logging.basicConfig( - filename=snakemake.log.python, level=snakemake.config["logging_level"] + filename=snakemake.log.python, level=snakemake.config["logging"]["level"] ) update_config_with_sector_opts(snakemake.config, snakemake.wildcards.sector_opts)