conform to pypsa-eur logging level definition
This commit is contained in:
parent
29af354883
commit
ee5a0c4e73
@ -9,8 +9,6 @@ logging:
|
|||||||
level: INFO
|
level: INFO
|
||||||
format: '%(levelname)s:%(name)s:%(message)s'
|
format: '%(levelname)s:%(name)s:%(message)s'
|
||||||
|
|
||||||
logging_level: INFO
|
|
||||||
|
|
||||||
run:
|
run:
|
||||||
name: "" # use this to keep track of runs with different settings
|
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
|
shared_cutouts: false # set to true to share the default cutout(s) across runs
|
||||||
|
@ -134,7 +134,7 @@ if __name__ == "__main__":
|
|||||||
planning_horizons=2030,
|
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)
|
update_config_with_sector_opts(snakemake.config, snakemake.wildcards.sector_opts)
|
||||||
|
|
||||||
|
@ -612,7 +612,7 @@ if __name__ == "__main__":
|
|||||||
planning_horizons=2020,
|
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)
|
update_config_with_sector_opts(snakemake.config, snakemake.wildcards.sector_opts)
|
||||||
|
|
||||||
|
@ -751,7 +751,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
snakemake = mock_snakemake("build_energy_totals")
|
snakemake = mock_snakemake("build_energy_totals")
|
||||||
|
|
||||||
logging.basicConfig(level=snakemake.config["logging_level"])
|
logging.basicConfig(level=snakemake.config["logging"]["level"])
|
||||||
|
|
||||||
config = snakemake.config["energy"]
|
config = snakemake.config["energy"]
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ if __name__ == "__main__":
|
|||||||
clusters="37",
|
clusters="37",
|
||||||
)
|
)
|
||||||
|
|
||||||
logging.basicConfig(level=snakemake.config["logging_level"])
|
logging.basicConfig(level=snakemake.config["logging"]["level"])
|
||||||
|
|
||||||
regions = load_bus_regions(
|
regions = load_bus_regions(
|
||||||
snakemake.input.regions_onshore, snakemake.input.regions_offshore
|
snakemake.input.regions_onshore, snakemake.input.regions_offshore
|
||||||
|
@ -144,7 +144,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
snakemake = mock_snakemake("build_gas_network")
|
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)
|
gas_network = load_dataset(snakemake.input.gas_network)
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ if __name__ == "__main__":
|
|||||||
clusters=48,
|
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")
|
regions = gpd.read_file(snakemake.input.regions_onshore).set_index("name")
|
||||||
|
|
||||||
|
@ -294,7 +294,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
snakemake = mock_snakemake("build_industrial_production_per_country")
|
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
|
countries = non_EU + eu28
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
snakemake = mock_snakemake("build_population_layouts")
|
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"])
|
cutout = atlite.Cutout(snakemake.config["atlite"]["cutout"])
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
snakemake = mock_snakemake("cluster_gas_network", simpl="", clusters="37")
|
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
|
fn = snakemake.input.cleaned_gas_network
|
||||||
df = pd.read_csv(fn, index_col=0)
|
df = pd.read_csv(fn, index_col=0)
|
||||||
|
@ -673,7 +673,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
snakemake = mock_snakemake("make_summary")
|
snakemake = mock_snakemake("make_summary")
|
||||||
|
|
||||||
logging.basicConfig(level=snakemake.config["logging_level"])
|
logging.basicConfig(level=snakemake.config["logging"]["level"])
|
||||||
|
|
||||||
networks_dict = {
|
networks_dict = {
|
||||||
(cluster, lv, opt + sector_opt, planning_horizon): snakemake.config[
|
(cluster, lv, opt + sector_opt, planning_horizon): snakemake.config[
|
||||||
|
@ -919,7 +919,7 @@ if __name__ == "__main__":
|
|||||||
planning_horizons="2050",
|
planning_horizons="2050",
|
||||||
)
|
)
|
||||||
|
|
||||||
logging.basicConfig(level=snakemake.config["logging_level"])
|
logging.basicConfig(level=snakemake.config["logging"]["level"])
|
||||||
|
|
||||||
overrides = override_component_attrs(snakemake.input.overrides)
|
overrides = override_component_attrs(snakemake.input.overrides)
|
||||||
n = pypsa.Network(snakemake.input.network, override_component_attrs=overrides)
|
n = pypsa.Network(snakemake.input.network, override_component_attrs=overrides)
|
||||||
|
@ -543,7 +543,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
snakemake = mock_snakemake("plot_summary")
|
snakemake = mock_snakemake("plot_summary")
|
||||||
|
|
||||||
logging.basicConfig(level=snakemake.config["logging_level"])
|
logging.basicConfig(level=snakemake.config["logging"]["level"])
|
||||||
|
|
||||||
n_header = 4
|
n_header = 4
|
||||||
|
|
||||||
|
@ -3248,7 +3248,7 @@ if __name__ == "__main__":
|
|||||||
planning_horizons="2020",
|
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)
|
update_config_with_sector_opts(snakemake.config, snakemake.wildcards.sector_opts)
|
||||||
|
|
||||||
|
@ -328,7 +328,7 @@ if __name__ == "__main__":
|
|||||||
)
|
)
|
||||||
|
|
||||||
logging.basicConfig(
|
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)
|
update_config_with_sector_opts(snakemake.config, snakemake.wildcards.sector_opts)
|
||||||
|
Loading…
Reference in New Issue
Block a user