Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Log files for all rules #1367

Open
2 tasks done
toniseibold opened this issue Oct 16, 2024 · 0 comments
Open
2 tasks done

Create Log files for all rules #1367

toniseibold opened this issue Oct 16, 2024 · 0 comments
Labels

Comments

@toniseibold
Copy link
Contributor

toniseibold commented Oct 16, 2024

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 via conda 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant