Create config file from default if not found
Similarly to pypsa-eur, the config file is not found, we create it as a copy of `config.default.yaml`. This also makes it easier to include pypsa-eur-sec as a subworkflow in a snakemake workflow.
This commit is contained in:
parent
f93ec5a381
commit
04e62fd52e
@ -1,7 +1,13 @@
|
|||||||
|
|
||||||
|
from os.path import exists
|
||||||
|
from shutil import copyfile
|
||||||
|
|
||||||
from snakemake.remote.HTTP import RemoteProvider as HTTPRemoteProvider
|
from snakemake.remote.HTTP import RemoteProvider as HTTPRemoteProvider
|
||||||
HTTP = HTTPRemoteProvider()
|
HTTP = HTTPRemoteProvider()
|
||||||
|
|
||||||
|
if not exists("config.yaml"):
|
||||||
|
copyfile("config.default.yaml", "config.yaml")
|
||||||
|
|
||||||
configfile: "config.yaml"
|
configfile: "config.yaml"
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user