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 event serialization testing #9573

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

Conversation

DanSava
Copy link
Contributor

@DanSava DanSava commented Dec 17, 2024

Issue
Resolves #9517

Approach
Add serialization roundtrip for all events generated by EverestRunModel

  • 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

@DanSava DanSava self-assigned this Dec 17, 2024
@codecov-commenter
Copy link

codecov-commenter commented Dec 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.84%. Comparing base (0e19012) to head (bdac9c6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9573      +/-   ##
==========================================
- Coverage   91.87%   91.84%   -0.04%     
==========================================
  Files         433      433              
  Lines       26770    26770              
==========================================
- Hits        24595    24586       -9     
- Misses       2175     2184       +9     
Flag Coverage Δ
cli-tests 39.76% <ø> (ø)
everest-models-test 34.58% <ø> (-0.08%) ⬇️
gui-tests 72.14% <ø> (+<0.01%) ⬆️
integration-test 37.19% <ø> (-0.01%) ⬇️
performance-tests 52.04% <ø> (+0.10%) ⬆️
test 40.44% <ø> (-0.01%) ⬇️
unit-tests 74.16% <ø> (-0.01%) ⬇️

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.

Copy link

codspeed-hq bot commented Dec 17, 2024

CodSpeed Performance Report

Merging #9573 will improve performances by 11.06%

Comparing DanSava:test-event-serialization (bdac9c6) with main (0e19012)

Summary

⚡ 1 improvements
✅ 21 untouched benchmarks

Benchmarks breakdown

Benchmark main DanSava:test-event-serialization Change
test_direct_dark_performance_with_storage[gen_x: 20, sum_x: 20 reals: 10-gen_data_with_obs-get_record_observations] 2.7 ms 2.4 ms +11.06%

@DanSava DanSava force-pushed the test-event-serialization branch from 261b703 to bdac9c6 Compare December 17, 2024 14:02
event, _ = args
event_json = event_to_json(event)
round_trip_event = event_from_json(str(event_json))
assert event == round_trip_event
Copy link
Collaborator

Choose a reason for hiding this comment

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

In this case, if we get a FullSnapshotEvent or a SnapshotUpdateEvent, are we able to differentiate them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point

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.

Make sure events can be serialized
3 participants