Create Log files for all rules
Opened this issue · 0 comments
toniseibold commented
There are multiple log files that are empty most likely because there are some things missing.
To ensure a log file is created correctly follow these instructions:
- add this to the Snakefile
log:
logs("rule_name_{wildcards}.log"),
note that it's only working if you add every wildcard that is in the input and output files. Otherwise snakemake
doesn't know where to save the log and you will get the following error
RuleException in file Snakefile, line xxx:
Not all output, log and benchmark files of rule modify_district_heat_share contain the same wildcards. This is crucial though, in order to avoid that two or more jobs write to the same file.
- in your script
import logging
logger = logging.getLogger(__name__)
from _helpers import configure_logging
- in main
if __name__ == "__main__":
...
configure_logging(snakemake)
Checklist
- I am using the current
master
branch or the latest release. Please indicate. - I am running on an up-to-date
pypsa-eur
environment. Update viaconda env update -f envs/environment.yaml
.
Describe the Bug
Missing log files include (might be incomplete):
- build_ammonia_production
- build_industrial_energy_demand_per_country_today
- build_biomass_transport_costs
- build_heat_totals
- build_population_layouts
- build_ship_raster
- build_clustered_population_layouts
- build_cop_profiles
- build_daily_heat_demand_total
- build_existing_heating_distribution
- build_hourly_heat_demand_total
- build_industrial_distribution_key
- build_industrial_energy_demand_per_node
- build_industrial_energy_demand_per_node_today
- build_industrial_production_per_country_tomorrow
- build_industrial_production_per_node
- build_industry_sector_ratios
- build_population_weighted_energy_totals
- build_population_weighted_heat_totals
- build_salt_cavern_potentials
- build_shipping_demand
- build_temperature_profiles_total
- build_transport_demand
- cluster_gas_network