equinor / equinor/ert

Warn when the config file has two GEN_KW with the same output file

Open
#5,808 0 comments 0 reactions 0 assignees View on GitHub

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:

  1. 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.

  2. Run esmda

  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.