Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logging of duplicate gen_kw parameter names #9086

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

larsevj
Copy link
Contributor

@larsevj larsevj commented Oct 29, 2024

Issue
Resolves #my_issue

Approach
Short description of the approach

(Screenshot of new behavior in GUI if applicable)

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure unit tests pass locally after every commit (git rebase -i main --exec 'pytest tests/ert/unit_tests -n logical -m "not integration_test"')

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Create Backport PR to latest release

@larsevj larsevj force-pushed the add_logging_of_duplicate_gen_kw_param_names branch 2 times, most recently from 96725a3 to 3ddbdd1 Compare October 31, 2024 14:44
@larsevj larsevj force-pushed the add_logging_of_duplicate_gen_kw_param_names branch from 3ddbdd1 to ff287d2 Compare November 12, 2024 13:40
keyword
for p in self.parameter_configs.values()
if isinstance(p, GenKwConfig)
for keyword in p.getKeyWords()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about just using dict:

gen_kw_params = {}
for p in self.parameter_configs.values():
    if isinstance(p, GenKwConfig):
        for keyword in p.getKeyWords():
            gen_kw_params[keyword] = gen_kw_params.get(keyword, 0) + 1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was mainly trying to keep it in the same way as it was done in self._check_for_duplicate_names function.

@larsevj larsevj self-assigned this Jan 15, 2025
@larsevj larsevj force-pushed the add_logging_of_duplicate_gen_kw_param_names branch from ff287d2 to f8b9f20 Compare January 23, 2025 14:56
Copy link

codspeed-hq bot commented Jan 23, 2025

CodSpeed Performance Report

Merging #9086 will not alter performance

Comparing larsevj:add_logging_of_duplicate_gen_kw_param_names (f8b9f20) with main (02df6ee)

Summary

✅ 24 untouched benchmarks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for Review
Development

Successfully merging this pull request may close these issues.

4 participants