PyPSA / pypsa-usa

PyPSA-USA: An Open-Source Energy System Optimization Model for the United States
https://pypsa-usa.readthedocs.io
MIT License
35 stars 15 forks source link

Adds configuration file templates #270

Closed trevorb1 closed 2 months ago

trevorb1 commented 2 months ago

Closes #262

Changes proposed in this Pull Request

In this PR I have removed tracking of configuration files. Since (from what I saw) there is no option to have files in your repo that are not tracked when modified, I added template config files in the repo_data/ folder. When first installing pypsa-usa, the user must run the new init_pypa_usa.sh script to copy the template files to the config folder.

To summarize the changes:

Alternatively, we could probably use the onstart argument from snakemake to check for the files beforehand. However, this may be difficult cause we dont really need all the config files for a run (for example, the config.cluster.yaml is not required for local runs).

There are some git options (such as assume-unchanged or skip-worktree) that can be used to accomplish not tracking changes to git tracked files. However, this doesnt seem to be recommended practice.

Checklist

trevorb1 commented 2 months ago

@ktehranchi, what are your thoughts on the initialization step? It does add an extra step, but saves the headache of tracking config files. We will have to remember to add any config changes to the template config file, though.

ktehranchi commented 2 months ago

I think this is a great idea! I can modify my test config bash script so we can use it to double check if our changes match the template