-
Notifications
You must be signed in to change notification settings - Fork 43
Add an interface for adding new data sources and add support for intake-esgf as a first example #2765
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
base: main
Are you sure you want to change the base?
Conversation
|
I'll work with you on this one @bouweandela 🍺 |
e91e383 to
9d67ed5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
having a dive in this, bud - let me know how I can help!
esmvalcore/config/_data_sources.py
Outdated
| f"but your configuration for project '{project}' contains " | ||
| f"'{data_source}' of type '{type(data_source)}'." | ||
| ) | ||
| raise TypeError(msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we want to see if we can first convert it to a DataSource before we toss it out the window
| ------- | ||
| :obj:`typing.Iterable` of :obj:`esmvalcore.io.base.DataElement` | ||
| The data elements that have been found. | ||
| """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is an excellent addition - we are finally abstracting a data object that gets ingested by esmvalcore, and we generalize it: let's be careful how we implement this so it can be reused with little fuss for the future: I'd argue that "data that can be loaded" can be anything ie the most generic file object (not needing to be on disk, nor it needing it to be downloaded), so we can operate with object stores too
|
this one here ties in very well with this PR, bud #2785 - enjoy your time off 🏖️ |
|
hey @bouweandela hope you're enjoying your holiday time! I kept myself busy and we now have Zarr support (in |
196c6e4 to
8a7a935
Compare
5283ecb to
b98ab5d
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2765 +/- ##
==========================================
- Coverage 95.46% 95.37% -0.09%
==========================================
Files 260 264 +4
Lines 15519 15862 +343
==========================================
+ Hits 14815 15129 +314
- Misses 704 733 +29 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3bf06ad to
ef2e7cd
Compare
bea9cf8 to
bce7c5a
Compare
Move timerange extraction to DataElement Move tests/unit/test_provenance.py to tests/unit/provenance and add more tests
0b12c7b to
1794742
Compare
ca867c6 to
94287ab
Compare
Description
Add an interface for adding new data sources. Documentation of the new interface is available here:
esmvalcore.io.The existing
esmvalcore.localandesmvalcore.esgfmodules have been modified to make use of the new interface and as an example use case, support for using intake-esgf to find input data has been added.Several commands have been added:
esmvaltool config show: print the current configurationesmvaltool config list: list available example configuration filesesmvaltool config copy: copy an example configuration file to your configuration directory, i.e.~/.config/esmvaltoolor the path defined by theESMVALTOOL_CONFIG_DIRenvironment variable.To try the new intake-esgf data source, configure
esmvaltoolto use it by running the commandesmvalcore config copy intake-esgf-data.yml.Related to #2584
Contains changes to
esmvalcore.local.DataSourcethat are not backwards compatible.Link to documentation:
Follow up ideas:
esmvaltool config listesmvalcore.esgfandesmvalcore.localintoesmvalcore.io. To avoid introducing even more changes in the pull request, I will do this in a follow up pull request.siteconfiguration setting that selects defaults appropriate to that site, e.g.site: levantewould select data sources and dask settings appropriate to Levante,site: jasminfor Jasmin, to simplify configuration of the tool Add asiteoption to theget_config_usercommand #1706Before you get started
Checklist
It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.
Changes are backward compatibleTo help with the number pull requests: