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 ModelEntry #1391

Merged
merged 27 commits into from
Nov 11, 2024
Merged

Pydantic ModelEntry #1391

merged 27 commits into from
Nov 11, 2024

Conversation

lewisblake
Copy link
Member

@lewisblake lewisblake commented Oct 31, 2024

Change Summary

Implements ModelEntry in terms of pydantic. Removes classes DictStrKeysListVals and DictType from _lowlevel_helpers.py in pyaerocom. There were a few attributes which, while not declared in ModelEntry, where given as kwargs and were critical to the functionality of the class in downstream processing. These have been added as attributes to ModelEntry. You may notice that many of these attributes are also given as attributes in ColocationSetup. This is because the current functionality copies these attributes from the instance of ModelEntry and assigns them to the corresponding attribute in ColocationSetup which is specific to a (obs, model) tuple in HasColocator.get_colocator(). This should be redesigned in the future to minimize confusion.

Related issue number

Part of #1085
Needed for work in CAMS2_82 to clean up reading of colocated data sets created by project partners

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 CAMS2_82 Issues related to the CAMS2_82 contract code-health 🏥 labels Nov 10, 2024
@lewisblake lewisblake added this to the m2024-12 milestone Nov 10, 2024
Copy link

codecov bot commented Nov 10, 2024

Codecov Report

Attention: Patch coverage is 93.65079% with 4 lines in your changes missing coverage. Please review.

Project coverage is 78.54%. Comparing base (28a7cab) to head (c322808).
Report is 58 commits behind head on main-dev.

Files with missing lines Patch % Lines
pyaerocom/io/mscw_ctm/additional_variables.py 90.00% 2 Missing ⚠️
pyaerocom/colocation/colocator.py 50.00% 1 Missing ⚠️
pyaerocom/ungriddeddata.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           main-dev    #1391      +/-   ##
============================================
+ Coverage     78.50%   78.54%   +0.04%     
============================================
  Files           136      137       +1     
  Lines         20860    20895      +35     
============================================
+ Hits          16377    16413      +36     
+ Misses         4483     4482       -1     
Flag Coverage Δ
unittests 78.54% <93.65%> (+0.04%) ⬆️

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.

@lewisblake lewisblake changed the title Pydantic modelentry Pydantic ModelEntry Nov 10, 2024
@lewisblake lewisblake marked this pull request as ready for review November 10, 2024 10:56
Copy link
Member

@jgriesfeller jgriesfeller left a comment

Choose a reason for hiding this comment

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

all good

@lewisblake lewisblake merged commit 38da577 into main-dev Nov 11, 2024
8 checks passed
@lewisblake lewisblake deleted the pydantic-modelentry branch November 11, 2024 09:50
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 code-health 🏥
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants