-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into OA_fix
- Loading branch information
Showing
7 changed files
with
71 additions
and
665 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,48 @@ | ||
import icepyx as ipx | ||
import icepyx.core.Earthdata as Earthdata | ||
import pytest | ||
import warnings | ||
|
||
|
||
# Misc notes and needed tests | ||
# test avail data and subsetting success for each input type (kml, shp, list of coords, bbox) | ||
# check that downloaded data is subset? or is this an NSIDC level test so long as we verify the right info is submitted? | ||
|
||
|
||
@pytest.fixture | ||
def reg(scope="module"): | ||
return ipx.Query("ATL06", [-55, 68, -48, 71], ["2019-02-22", "2019-02-28"]) | ||
|
||
|
||
@pytest.fixture | ||
def session(reg, scope="module"): | ||
return Earthdata._start_session( | ||
"icepyx_devteam", "icepyx.dev@gmail.com", os.getenv("NSIDC_LOGIN") | ||
) | ||
|
||
|
||
########## is2ref module ########## | ||
import icepyx.core.is2ref as is2ref | ||
import json | ||
|
||
|
||
def test_get_custom_options_output(session): | ||
obs = is2ref._get_custom_options(session, "ATL06", "004") | ||
with open("./ATL06v04_options.json", "r") as exp: | ||
assert all(keys in obs.keys() for keys in exp.keys()) | ||
assert all(obs[key] == exp[key] for key in exp.keys()) | ||
|
||
|
||
########## query module ########## | ||
# NOTE: best this test can do at the moment is a successful download with no errors... | ||
def test_download_granules_with_subsetting(reg, session): | ||
path = "./downloads_subset" | ||
reg.order_granules(session) | ||
reg.download_granules(session, path) | ||
|
||
|
||
# def test_download_granules_without_subsetting(reg_a, session): | ||
# path = './downloads' | ||
# reg_a.order_granules(session, subset=False) | ||
# reg_a.download_granules(session, path) | ||
# #check that the max extent of the downloaded granules isn't subsetted |
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