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

Pydantic ColocatedData #1134

Merged
merged 17 commits into from
Apr 25, 2024
Merged

Pydantic ColocatedData #1134

merged 17 commits into from
Apr 25, 2024

Conversation

lewisblake
Copy link
Member

@lewisblake lewisblake commented Apr 22, 2024

Change Summary

The ColocatedData class is now a derived class of pydantic's BaseModel. Doing so ensures data validation and defines an interface, part of which we will need to guarantee successful reading in colocated data objects created outside of pyaerocom, for example, in CAMS2_82.

Related issue number

Part of #857. Related work in #1120 deriving ColocationSetup from BaseModel

Checklist

  • Start with a draft-PR
  • The PR title is a good summary of the changes
  • PR is set to AeroTools and a tentative milestone
  • Documentation reflects the changes where applicable
  • Tests for the changes exist where applicable
  • Tests pass locally
  • Tests pass on CI
  • At least 1 reviewer is selected
  • Make PR ready to review

@lewisblake lewisblake added this to the m2024-05 milestone Apr 22, 2024
@lewisblake lewisblake added the CAMS2_82 Issues related to the CAMS2_82 contract label Apr 22, 2024
@lewisblake lewisblake marked this pull request as ready for review April 22, 2024 19:04
Copy link

codecov bot commented Apr 23, 2024

Codecov Report

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

Project coverage is 78.61%. Comparing base (9d2cc92) to head (91a486d).
Report is 44 commits behind head on main-dev.

Files Patch % Lines
pyaerocom/colocateddata.py 86.56% 9 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           main-dev    #1134      +/-   ##
============================================
+ Coverage     78.53%   78.61%   +0.07%     
============================================
  Files           120      125       +5     
  Lines         19939    19953      +14     
============================================
+ Hits          15660    15686      +26     
+ Misses         4279     4267      -12     
Flag Coverage Δ
unittests 78.61% <87.32%> (+0.07%) ⬆️

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.

pyaerocom/colocateddata.py Outdated Show resolved Hide resolved
pyaerocom/colocateddata.py Show resolved Hide resolved
pyaerocom/colocateddata.py Show resolved Hide resolved
pyaerocom/colocateddata.py Show resolved Hide resolved
tests/test_colocateddata.py Outdated Show resolved Hide resolved
thorbjoernl
thorbjoernl previously approved these changes Apr 24, 2024
Copy link
Collaborator

@thorbjoernl thorbjoernl left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@thorbjoernl thorbjoernl self-requested a review April 24, 2024 09:55
@thorbjoernl thorbjoernl dismissed their stale review April 24, 2024 11:00

PR not ready yet

Copy link
Collaborator

@thorbjoernl thorbjoernl left a comment

Choose a reason for hiding this comment

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

LGTM 🤖 🚀

@thorbjoernl thorbjoernl merged commit 8e09efc into main-dev Apr 25, 2024
8 checks passed
@thorbjoernl thorbjoernl deleted the pydantic-colocateddata branch April 25, 2024 09:54
@lewisblake lewisblake restored the pydantic-colocateddata branch May 7, 2024 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CAMS2_82 Issues related to the CAMS2_82 contract
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants