-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
provide aerosol data via pooch (#267)
* provide aerosol data via pooch * fix hash * fix correct docstring * changelog
- Loading branch information
Showing
8 changed files
with
61 additions
and
2,071 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# mesmer data | ||
|
||
This folder contains auxiliary data for mesmer. They are downloaded on demand using [pooch](https://www.fatiando.org/pooch/latest/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ dependencies: | |
- numpy | ||
- packaging | ||
- pandas<2.0 | ||
- pooch | ||
- regionmask>=0.8 | ||
- scikit-learn | ||
- sphinx | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import pooch | ||
|
||
import mesmer | ||
|
||
|
||
def fetch_remote_data(name): | ||
""" | ||
uses pooch to cache files | ||
""" | ||
|
||
cache_dir = pooch.os_cache("mesmer") | ||
|
||
REMOTE_RESSOURCE = pooch.create( | ||
path=cache_dir, | ||
# The remote data is on Github | ||
base_url="https://github.com/MESMER-group/mesmer/raw/{version}/data/", | ||
registry={ | ||
"isaod_gl_2022.dat": "3d26e78bf0ee96a02c99e2a7a448dafda0ac847a5c914a75c7d9745e95fe68ee", | ||
}, | ||
version=f"v{mesmer.__version__}", | ||
version_dev="main", | ||
) | ||
|
||
# the file will be downloaded automatically the first time this is run. | ||
return REMOTE_RESSOURCE.fetch(name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ install_requires = | |
numpy | ||
packaging | ||
pandas < 2.0 | ||
pooch | ||
regionmask | ||
scikit-learn | ||
statsmodels | ||
|
Oops, something went wrong.