Skip to content

DatasetRestoring only via Metadata #486

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

Merged
merged 15 commits into from
Apr 28, 2025
Merged

Conversation

navidcy
Copy link
Collaborator

@navidcy navidcy commented Apr 27, 2025

Only allow DatasetRestoring to be constructed via providing Metadata.

Closes #485

@navidcy navidcy added the data wrangling We must feed the models so they don't get cranky label Apr 27, 2025
@navidcy navidcy requested a review from glwagner April 27, 2025 04:07
@navidcy navidcy marked this pull request as ready for review April 27, 2025 04:07
@simone-silvestri
Copy link
Collaborator

Isn't it convenient not to have to always build the metadata?
Do you think it is too much of a burden to maintain this constructor? I think it is very convenient to have because if we build only with the metadata we have to know exactly the frequency, start date and last date of the metadata.

I vote to keep the constructor with the variable name

@glwagner
Copy link
Member

glwagner commented Apr 27, 2025

Isn't it convenient not to have to always build the metadata? Do you think it is too much of a burden to maintain this constructor? I think it is very convenient to have because if we build only with the metadata we have to know exactly the frequency, start date and last date of the metadata.

I vote to keep the constructor with the variable name

I see this as important for the user interface. I think we may want users to have metadata explicitly available for any dataset being used during a simulation. I think we need to keep developing features for metadata. So it's not about the "burden of maintaining a constructor", but rather the detrimental effect / loss of clarity to user scripts. Too much convenience has the effect of obscuring how things work.

I could see us putting this back but the thing is that Metadata has been evolving very rapidly over the past few months. This indicates that we have not really figured out a good design for Metadata yet. So I feel we are not at the stage where we can clearly motivate conveniences like this.

@glwagner
Copy link
Member

Should the examples be updated, or do they already all use explicit metadata?

@navidcy
Copy link
Collaborator Author

navidcy commented Apr 27, 2025

All examples use explicit metadata. I checked.

Copy link

codecov bot commented Apr 27, 2025

Codecov Report

Attention: Patch coverage is 25.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 25.52%. Comparing base (09f492f) to head (caa08cb).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/DataWrangling/metadata.jl 40.00% 3 Missing ⚠️
src/DataWrangling/restoring.jl 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #486      +/-   ##
==========================================
+ Coverage   25.48%   25.52%   +0.03%     
==========================================
  Files          47       47              
  Lines        2586     2586              
==========================================
+ Hits          659      660       +1     
+ Misses       1927     1926       -1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@navidcy
Copy link
Collaborator Author

navidcy commented Apr 28, 2025

@simone-silvestri this PR deletes the extra DatasetRestoring constructor but adds convenience in Metadata constructor to provide start and end date as you suggested in #485.

@navidcy navidcy merged commit cdbe169 into main Apr 28, 2025
19 of 20 checks passed
@navidcy navidcy deleted the ncc/dataset-restoring-tweaks branch April 28, 2025 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data wrangling We must feed the models so they don't get cranky
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Strange behaviour in compute_native_date_range
3 participants