Skip to content

Commit b4ed23a

Browse files
committed
change from config.yaml to config.de.yaml
1 parent 14148d8 commit b4ed23a

File tree

8 files changed

+4
-60
lines changed

8 files changed

+4
-60
lines changed

.github/workflows/validate.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
step: run-self-hosted-validation
2525
env_file: envs/environment.yaml
26-
snakemake_config: config/config.yaml
26+
snakemake_config: config/config.de.yaml
2727
pre_command: "build_scenarios -f"
2828
main_command: "ariadne_all"
2929
env:
@@ -48,7 +48,7 @@ jobs:
4848
- uses: PyPSA/[email protected]
4949
with:
5050
step: create-comment
51-
snakemake_config: config/config.yaml
51+
snakemake_config: config/config.de.yaml
5252
# The path starting from prefix in config
5353
# For plot results/<prefix>/<scenario>/<plot_name>.png pass
5454
# <scenario>/<plot_name>.png

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,9 @@ doc/_build
3030
/scripts/create_scenarios.py
3131
/config/create_scenarios.py
3232

33-
config/config.yaml
3433
config/scenarios.yaml
3534
config/scenarios.automated.yaml
3635

37-
config/config.yaml
38-
3936
dconf
4037
/data/links_p_nom.csv
4138
/data/*totals.csv

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,12 @@ clean-tests:
7474

7575
# Removes all created files except for large cutout files (similar to fresh clone)
7676
reset:
77-
@echo "Do you really wanna continue? This will remove config/config.yaml, logs, resources, benchmarks, results, and .snakemake directories (y/n): " && \
77+
@echo "Do you really wanna continue? This will remove logs, resources, benchmarks, results, and .snakemake directories (y/n): " && \
7878
read ans && [ $${ans} = y ] && ( \
7979
rm -r ./logs || true; \
8080
rm -r ./resources || true; \
8181
rm -r ./benchmarks || true; \
8282
rm -r ./results || true; \
8383
rm -r ./.snakemake || true; \
84-
rm ./config/config.yaml || true; \
8584
echo "Reset completed." \
8685
) || echo "Reset cancelled."

Snakefile

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,15 @@ min_version("8.11")
1313

1414
from scripts._helpers import (
1515
path_provider,
16-
copy_default_files,
1716
get_scenarios,
1817
get_rdir,
1918
get_shadow,
2019
)
2120

2221

23-
copy_default_files(workflow)
24-
25-
2622
configfile: "config/config.default.yaml"
2723
configfile: "config/plotting.default.yaml"
28-
configfile: "config/config.yaml"
29-
configfile: "config/config.personal.yaml"
24+
configfile: "config/config.de.yaml"
3025

3126

3227
run = config["run"]

config/config.personal.yaml

Lines changed: 0 additions & 16 deletions
This file was deleted.

rules/postprocess.smk

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -158,23 +158,6 @@ if config["foresight"] == "perfect":
158158
"../scripts/plot_power_network_perfect.py"
159159

160160

161-
rule copy_config:
162-
params:
163-
RDIR=RDIR,
164-
config=lambda wildcards: (
165-
scenario_config(wildcards.run) if "run" in wildcards else config
166-
),
167-
output:
168-
RESULTS + "config.yaml",
169-
threads: 1
170-
resources:
171-
mem_mb=1000,
172-
conda:
173-
"../envs/environment.yaml"
174-
script:
175-
"../scripts/copy_config.py"
176-
177-
178161
rule make_summary:
179162
input:
180163
network=RESULTS

scripts/_helpers.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
import re
1111
import time
1212
from functools import partial, wraps
13-
from os.path import exists
1413
from pathlib import Path
15-
from shutil import copyfile
1614
from tempfile import NamedTemporaryFile
1715
from typing import Callable, Union
1816

@@ -32,18 +30,6 @@
3230
REGION_COLS = ["geometry", "name", "x", "y", "country"]
3331

3432

35-
def copy_default_files(workflow):
36-
default_files = {
37-
"config/config.default.yaml": "config/config.yaml",
38-
"config/scenarios.template.yaml": "config/scenarios.yaml",
39-
}
40-
for template, target in default_files.items():
41-
target = os.path.join(workflow.current_basedir, target)
42-
template = os.path.join(workflow.current_basedir, template)
43-
if not exists(target) and exists(template):
44-
copyfile(template, target)
45-
46-
4733
def get_scenarios(run):
4834
scenario_config = run.get("scenarios", {})
4935
if run["name"] and scenario_config.get("enable"):

0 commit comments

Comments
 (0)