Merge pull request #197 from PyPSA/cp-env

Snakefile: export conda environment
This commit is contained in:
Fabian Neumann 2022-11-15 14:49:52 +01:00 committed by GitHub
commit d35d3c3c21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -532,6 +532,14 @@ rule copy_config:
script: "scripts/copy_config.py" script: "scripts/copy_config.py"
rule copy_conda_env:
output: SDIR + '/configs/environment.yaml'
threads: 1
resources: mem_mb=500
benchmark: SDIR + "/benchmarks/copy_conda_env"
shell: "conda env export -f {output} --no-builds"
rule make_summary: rule make_summary:
input: input:
overrides="data/override_component_attrs", overrides="data/override_component_attrs",
@ -591,6 +599,7 @@ if config["foresight"] == "overnight":
network=RDIR + "/prenetworks/elec_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}.nc", network=RDIR + "/prenetworks/elec_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}.nc",
costs=CDIR + "costs_{}.csv".format(config['costs']['year']), costs=CDIR + "costs_{}.csv".format(config['costs']['year']),
config=SDIR + '/configs/config.yaml' config=SDIR + '/configs/config.yaml'
env=SDIR + '/configs/environment.yaml'
output: RDIR + "/postnetworks/elec_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}.nc" output: RDIR + "/postnetworks/elec_s{simpl}_{clusters}_lv{lv}_{opts}_{sector_opts}_{planning_horizons}.nc"
shadow: "shallow" shadow: "shallow"
log: log: