snakefile: allow to share resources in directory
ci: use test.sh script which can be executed locally
This commit is contained in:
parent
0bb70b42ef
commit
d32789bd02
6
.github/workflows/ci.yaml
vendored
6
.github/workflows/ci.yaml
vendored
@ -81,11 +81,7 @@ jobs:
|
||||
key: data-cutouts-${{ env.WEEK }}-${{ env.DATA_CACHE_NUMBER }}
|
||||
|
||||
- name: Test snakemake workflow
|
||||
run: |
|
||||
snakemake -call solve_elec_networks --configfile config/test/config.electricity.yaml --rerun-triggers=mtime
|
||||
snakemake -call all --configfile config/test/config.overnight.yaml --rerun-triggers=mtime
|
||||
snakemake -call all --configfile config/test/config.myopic.yaml --rerun-triggers=mtime
|
||||
snakemake -call all --configfile config/test/config.perfect.yaml --rerun-triggers=mtime
|
||||
run: ./test.sh
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4.3.0
|
||||
|
@ -31,7 +31,12 @@ CDIR = RDIR if not run.get("shared_cutouts") else ""
|
||||
|
||||
LOGS = "logs/" + RDIR
|
||||
BENCHMARKS = "benchmarks/" + RDIR
|
||||
RESOURCES = "resources/" + RDIR if not run.get("shared_resources") else "resources/"
|
||||
if not (shared_resources := run.get("shared_resources")):
|
||||
RESOURCES = "resources/" + RDIR
|
||||
elif isinstance(shared_resources, str):
|
||||
RESOURCES = "resources/" + shared_resources + "/"
|
||||
else:
|
||||
RESOURCES = "resources/"
|
||||
RESULTS = "results/" + RDIR
|
||||
|
||||
|
||||
|
@ -8,14 +8,14 @@ tutorial: true
|
||||
run:
|
||||
name: "test-elec" # use this to keep track of runs with different settings
|
||||
disable_progressbar: true
|
||||
shared_resources: true
|
||||
shared_resources: "test"
|
||||
shared_cutouts: true
|
||||
|
||||
scenario:
|
||||
clusters:
|
||||
- 5
|
||||
opts:
|
||||
- Co2L-24H
|
||||
- Co2L-24h
|
||||
|
||||
countries: ['BE']
|
||||
|
||||
|
@ -7,7 +7,7 @@ tutorial: true
|
||||
run:
|
||||
name: "test-sector-myopic"
|
||||
disable_progressbar: true
|
||||
shared_resources: true
|
||||
shared_resources: "test"
|
||||
shared_cutouts: true
|
||||
|
||||
foresight: myopic
|
||||
@ -18,7 +18,7 @@ scenario:
|
||||
clusters:
|
||||
- 5
|
||||
sector_opts:
|
||||
- 24H-T-H-B-I-A-dist1
|
||||
- 24h-T-H-B-I-A-dist1
|
||||
planning_horizons:
|
||||
- 2030
|
||||
- 2040
|
||||
|
@ -7,7 +7,7 @@ tutorial: true
|
||||
run:
|
||||
name: "test-sector-overnight"
|
||||
disable_progressbar: true
|
||||
shared_resources: true
|
||||
shared_resources: "test"
|
||||
shared_cutouts: true
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ scenario:
|
||||
clusters:
|
||||
- 5
|
||||
sector_opts:
|
||||
- CO2L0-24H-T-H-B-I-A-dist1
|
||||
- CO2L0-24h-T-H-B-I-A-dist1
|
||||
planning_horizons:
|
||||
- 2030
|
||||
|
||||
|
@ -7,7 +7,7 @@ tutorial: true
|
||||
run:
|
||||
name: "test-sector-perfect"
|
||||
disable_progressbar: true
|
||||
shared_resources: true
|
||||
shared_resources: "test"
|
||||
shared_cutouts: true
|
||||
|
||||
foresight: perfect
|
||||
|
8
test.sh
Executable file
8
test.sh
Executable file
@ -0,0 +1,8 @@
|
||||
# SPDX-FileCopyrightText: : 2021-2024 The PyPSA-Eur Authors
|
||||
#
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
snakemake -call solve_elec_networks --configfile config/test/config.electricity.yaml --rerun-triggers=mtime && \
|
||||
snakemake -call all --configfile config/test/config.overnight.yaml --rerun-triggers=mtime && \
|
||||
snakemake -call all --configfile config/test/config.myopic.yaml --rerun-triggers=mtime && \
|
||||
snakemake -call all --configfile config/test/config.perfect.yaml --rerun-triggers=mtime
|
Loading…
Reference in New Issue
Block a user