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

obs_sequence object aware whether it has assimilation results or not #28

Merged
merged 4 commits into from
Dec 19, 2024

Conversation

hkershaw-brown
Copy link
Member

@hkershaw-brown hkershaw-brown commented Dec 19, 2024

  • Added two bits of information to the obs_sequence class:
    self.has_assimilation_info = False
    self.has_posterior = False

  • An obs_sequence object is then aware of whether it has assimilation info (prior only or prior and posterior)

  • Added decorator for class methods that require assimilation to check info is present.
    Select by qc and possible vs used functions now class methods and use the decorator (because they need assimilation info)

  • Now have a posterior bias and sq error column (note I've not renamed bias & sq error to prior_bias, prior sq error)

  • Added tests for requires assimilation_info, init method changed so you don’t need a file for testing the data frame routines.

  • Added an early exit if no file is given to obs_sequence::init. This is so you can test the data frame methods without worrying about having a file to give data.

fixes #25
fixes #27
fixes #19

@hkershaw-brown hkershaw-brown merged commit 9d2f70b into main Dec 19, 2024
1 check passed
@hkershaw-brown hkershaw-brown deleted the self_aware branch December 19, 2024 20:04
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 84.09091% with 7 lines in your changes missing coverage. Please review.

Project coverage is 74.38%. Comparing base (ea68901) to head (f8542cc).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/pydartdiags/obs_sequence/obs_sequence.py 84.09% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #28      +/-   ##
==========================================
+ Coverage   72.12%   74.38%   +2.26%     
==========================================
  Files           2        2              
  Lines         495      527      +32     
==========================================
+ Hits          357      392      +35     
+ Misses        138      135       -3     

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

hkershaw-brown added a commit that referenced this pull request Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants