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

Refactor config docs #9610

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

oyvindeide
Copy link
Collaborator

@oyvindeide oyvindeide commented Dec 20, 2024

Issue
Build keyword reference based on json schema instead of custom function. This allows us to support all levels of nesting as well as supported types.

NOTE: In this PR I remove the checked in created config, which means we will not get a diff if there are changes to the json schema. This could potentially mean that we miss breaking changes, though we should probably rely on the configuration tests for this, rather than the schema. We could of course check in the json schema and use the old test functions for that instead of the rst code. That implies that we would need to update the json schema when for example adding a new example.

Related to: #9486

Approach

Use a framework for creating the keyword reference from the json schema, which then looks like:

image

This has a number of benefits, for example it supports the full config, with arbitrary nesting, as well as examples:

image

Compared with the current:

image

  • 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

@oyvindeide oyvindeide self-assigned this Dec 20, 2024
Copy link

codspeed-hq bot commented Dec 20, 2024

CodSpeed Performance Report

Merging #9610 will improve performances by 10.93%

Comparing oyvindeide:refactor_config_docs (9b67b15) with main (ead6423)

Summary

⚡ 1 improvements
✅ 23 untouched benchmarks

Benchmarks breakdown

Benchmark main oyvindeide:refactor_config_docs Change
test_direct_dark_performance_with_storage[gen_x: 20, sum_x: 20 reals: 10-gen_data-get_record_observations] 1.7 ms 1.5 ms +10.93%

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.88%. Comparing base (1889e2a) to head (9b67b15).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9610      +/-   ##
==========================================
+ Coverage   91.85%   91.88%   +0.02%     
==========================================
  Files         433      430       -3     
  Lines       26813    26694     -119     
==========================================
- Hits        24630    24528     -102     
+ Misses       2183     2166      -17     
Flag Coverage Δ
cli-tests 39.74% <ø> (+<0.01%) ⬆️
everest-models-test 34.60% <100.00%> (+<0.01%) ⬆️
gui-tests 72.10% <ø> (+<0.01%) ⬆️
integration-test 38.51% <100.00%> (-0.23%) ⬇️
performance-tests 51.94% <ø> (+<0.01%) ⬆️
test 39.91% <100.00%> (-0.18%) ⬇️
unit-tests 74.34% <100.00%> (+0.20%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Successfully merging this pull request may close these issues.

2 participants