Merge pull request #196 from PyPSA/fix-cp-config

fix copying pypsa-eur config
This commit is contained in:
Fabian Neumann 2021-11-24 15:07:17 +01:00 committed by GitHub
commit 6a92eb9d74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,18 +1,18 @@
from shutil import copy from shutil import copy
files = [ files = {
"config.yaml", "config.yaml": "config.yaml",
"Snakefile", "Snakefile": "Snakefile",
"scripts/solve_network.py", "scripts/solve_network.py": "solve_network.py",
"scripts/prepare_sector_network.py", "scripts/prepare_sector_network.py": "prepare_sector_network.py",
"../pypsa-eur/config.yaml" "../pypsa-eur/config.yaml": "config.pypsaeur.yaml"
] }
if __name__ == '__main__': if __name__ == '__main__':
if 'snakemake' not in globals(): if 'snakemake' not in globals():
from helper import mock_snakemake from helper import mock_snakemake
snakemake = mock_snakemake('copy_config') snakemake = mock_snakemake('copy_config')
for f in files: for f, name in files.items():
copy(f,snakemake.config['summary_dir'] + '/' + snakemake.config['run'] + '/configs/') copy(f,snakemake.config['summary_dir'] + '/' + snakemake.config['run'] + '/configs/' + name)