ert icon indicating copy to clipboard operation
ert copied to clipboard

Refactor gui node to use dataclasses

Open jonathan-eq opened this issue 9 months ago • 2 comments

Issue Resolves #7382

Approach The commit in this PR refactors the nodes in GUI (RootNode, IterNode, RealNode, ForwardModelNode) to use explicit dataclasses for each type instead of having the type as a field.

(Screenshot of new behavior in GUI if applicable)

  • [x] PR title captures the intent of the changes, and is fitting for release notes.
  • [x] Added appropriate release note label
  • [x] Commit history is consistent and clean, in line with the contribution guidelines.
  • [ ] Make sure tests pass locally (after every commit!)

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

jonathan-eq avatar May 08 '24 16:05 jonathan-eq

Codecov Report

Attention: Patch coverage is 88.81579% with 17 lines in your changes are missing coverage. Please review.

Project coverage is 85.35%. Comparing base (6aa3798) to head (da3164f). Report is 11 commits behind head on main.

Files Patch % Lines
src/ert/gui/model/node.py 89.41% 9 Missing :warning:
src/ert/gui/model/snapshot.py 87.30% 8 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7862      +/-   ##
==========================================
- Coverage   85.39%   85.35%   -0.05%     
==========================================
  Files         381      381              
  Lines       23593    23705     +112     
  Branches      883      879       -4     
==========================================
+ Hits        20147    20233      +86     
- Misses       3339     3365      +26     
  Partials      107      107              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar May 08 '24 17:05 codecov-commenter

Codecov Report

Attention: Patch coverage is 87.40741% with 17 lines in your changes are missing coverage. Please review.

Project coverage is 85.43%. Comparing base (5371acb) to head (e586eff). Report is 2 commits behind head on main.

Files Patch % Lines src/ert/gui/model/node.py 88.15% 9 Missing ⚠️ src/ert/gui/model/snapshot.py 86.44% 8 Missing ⚠️ Additional details and impacted files ☔ View full report in Codecov by Sentry. 📢 Have feedback on the report? Share it here.

I am not getting CodeCov to work. I cannot see what lines are not covered.

jonathan-eq avatar May 08 '24 20:05 jonathan-eq

Dataclasses do look nicer!

berland avatar May 14 '24 10:05 berland