Warn when the config file has two GEN_KW with the same output file
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 161
- Forks
- 141
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 138
Description
Describe the bug
In a config file having twice the same output file, the output file from the first key will be overwritten by the output from the second key.
This should lead to a warning in the config file validation.
To reproduce
Steps to reproduce the behaviour:
-
Include
GEN_KW COEFFS coeff.tmpl coeffs.json coeff_priors
GEN_KW PRED coeff.tmpl coeffs.json coeff_priors
in the config file of the poly case. -
Run esmda
-
Check that the output coeffs.json is overwritten with the values in the PRED group.
Expected behaviour
A warning should be raised first, to be decided if the current behavior should not be allowed.
Additional context
This issue is based on a discussion raised with @oyvindeide and @sondreso in this Yammer post - internal link.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the two GEN_KW lines in the poly case configuration, then trace the configuration validation entry point that handles output filenames. Done means validation warns when multiple GEN_KW entries target coeffs.json, before the later output overwrites the earlier one; the issue leaves the relevant file and tests unspecified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100