Fix an output error for connections costs #691
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #647
Currently a connection costs file is written by
_adjust_capital_costs_using_connection_costs
which is called after simplifying links and when removing stubs. If there are no links in the network andremove_stubs: false
, a connection costs file is not written which leads to snakemakeMissingOutputException
error.Added an output of an empty data frame for connection costs to a short-cut of
simplify_links()
corresponding to a case without links in the network. In caseremove_stubs
is called, it happens aftersimplify_links()
and an empty connections costs file will simply be overwriten.Checklist
envs/environment.yaml
andenvs/environment.docs.yaml
.config.default.yaml
andconfig.tutorial.yaml
.test/
(note tests are changing the config.tutorial.yaml)doc/configtables/*.csv
and line references are adjusted indoc/configuration.rst
anddoc/tutorial.rst
.doc/release_notes.rst
is amended in the format of previous release notes, including reference to the requested PR.