Skip to content

Commit

Permalink
✅ Document and test data catalog loading functionality
Browse files Browse the repository at this point in the history
Ensure that the ATLAS intake catalog is able to be loaded, and secretly document it's usage a little bit.
  • Loading branch information
weiji14 committed May 28, 2020
1 parent 02904bb commit ea8e8c6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions atl06_play.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1043,6 +1043,7 @@
"\n",
"# open the local intake data catalog file containing ICESat-2 stuff\n",
"# data download will depend on having a .netrc file in home folder\n",
"# dataset = intake.cat.atlas_cat.icesat2atl06.to_dask().unify_chunks()\n",
"dataset = deepicedrain.catalog.icesat2atl06.to_dask().unify_chunks()\n",
"dataset"
]
Expand Down
1 change: 1 addition & 0 deletions atl06_play.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@

# open the local intake data catalog file containing ICESat-2 stuff
# data download will depend on having a .netrc file in home folder
# dataset = intake.cat.atlas_cat.icesat2atl06.to_dask().unify_chunks()
dataset = deepicedrain.catalog.icesat2atl06.to_dask().unify_chunks()
dataset

Expand Down
14 changes: 13 additions & 1 deletion deepicedrain/tests/test_deepicedrain.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
from deepicedrain import __version__
import intake

from deepicedrain import __version__, catalog


def test_version():
assert __version__ == "0.1.0"


def test_deepicedrain_catalog():
"""
Test that the intake ATLAS data catalog can be loaded via both
`deepicedrain.catalog` and `intake.cat.atlas_cat`
"""
catalog_entries = ["icesat2atlasdownloader", "icesat2atl06", "test_data"]
assert list(catalog) == catalog_entries
assert list(intake.cat.atlas_cat) == catalog_entries

0 comments on commit ea8e8c6

Please sign in to comment.