Skip to content

Commit

Permalink
Merge pull request #158 from jarq6c/main
Browse files Browse the repository at this point in the history
NWM Client: Limit number of get calls for testing
  • Loading branch information
jarq6c authored Nov 15, 2021
2 parents b31e522 + fb2540f commit 55b19b5
Showing 1 changed file with 62 additions and 62 deletions.
124 changes: 62 additions & 62 deletions python/nwm_client/tests/test_gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,74 +146,74 @@ def test_get(setup_gcp):
)
assert df['value_time'].unique().size == 3

# Test Ext. ANA
df = setup_gcp.get(
configuration="analysis_assim_extend",
reference_time="20210101T16Z"
)
assert df['value_time'].unique().size == 28

# Test short range
df = setup_gcp.get(
configuration="short_range",
reference_time="20210101T01Z"
)
assert df['value_time'].unique().size == 18

# Test medium range
df = setup_gcp.get(
configuration="medium_range_mem1",
reference_time="20210101T06Z"
)
assert df['value_time'].unique().size == 80

# Test long range
df = setup_gcp.get(
configuration="long_range_mem1",
reference_time="20210101T06Z"
)
assert df['value_time'].unique().size == 120

# Test Hawaii ANA
df = setup_gcp.get(
configuration="analysis_assim_hawaii",
reference_time="20210101T01Z"
)
assert df['value_time'].unique().size == 3

# Test Hawaii Short Range
df = setup_gcp.get(
configuration="short_range_hawaii",
reference_time="20210101T00Z"
)
assert df['value_time'].unique().size == 60

# Test Puerto Rico ANA
df = setup_gcp.get(
configuration="analysis_assim_puertorico",
reference_time="20210501T00Z"
)
assert df['value_time'].unique().size == 3

# Test Puerto Rico Short Range
df = setup_gcp.get(
configuration="short_range_puertorico",
reference_time="20210501T06Z"
)
assert df['value_time'].unique().size == 48
# # Test Ext. ANA
# df = setup_gcp.get(
# configuration="analysis_assim_extend",
# reference_time="20210101T16Z"
# )
# assert df['value_time'].unique().size == 28

# # Test short range
# df = setup_gcp.get(
# configuration="short_range",
# reference_time="20210101T01Z"
# )
# assert df['value_time'].unique().size == 18

# # Test medium range
# df = setup_gcp.get(
# configuration="medium_range_mem1",
# reference_time="20210101T06Z"
# )
# assert df['value_time'].unique().size == 80

# # Test long range
# df = setup_gcp.get(
# configuration="long_range_mem1",
# reference_time="20210101T06Z"
# )
# assert df['value_time'].unique().size == 120

# # Test Hawaii ANA
# df = setup_gcp.get(
# configuration="analysis_assim_hawaii",
# reference_time="20210101T01Z"
# )
# assert df['value_time'].unique().size == 3

# # Test Hawaii Short Range
# df = setup_gcp.get(
# configuration="short_range_hawaii",
# reference_time="20210101T00Z"
# )
# assert df['value_time'].unique().size == 60

# # Test Puerto Rico ANA
# df = setup_gcp.get(
# configuration="analysis_assim_puertorico",
# reference_time="20210501T00Z"
# )
# assert df['value_time'].unique().size == 3

# # Test Puerto Rico Short Range
# df = setup_gcp.get(
# configuration="short_range_puertorico",
# reference_time="20210501T06Z"
# )
# assert df['value_time'].unique().size == 48

@pytest.mark.slow
def test_get_no_da(setup_gcp):
# No DA Cycles
cycles = [
('analysis_assim_no_da', "20210501T06Z", 3),
('analysis_assim_extend_no_da', "20210501T16Z", 28),
('analysis_assim_hawaii_no_da', "20210501T00Z", 12),
('analysis_assim_long_no_da', "20210501T00Z", 12),
('analysis_assim_puertorico_no_da', "20210501T00Z", 3),
('medium_range_no_da', "20210501T00Z", 80),
('short_range_hawaii_no_da', "20210501T00Z", 192),
('short_range_puertorico_no_da', "20210501T06Z", 48)
# ('analysis_assim_extend_no_da', "20210501T16Z", 28),
# ('analysis_assim_hawaii_no_da', "20210501T00Z", 12),
# ('analysis_assim_long_no_da', "20210501T00Z", 12),
# ('analysis_assim_puertorico_no_da', "20210501T00Z", 3),
# ('medium_range_no_da', "20210501T00Z", 80),
# ('short_range_hawaii_no_da', "20210501T00Z", 192),
# ('short_range_puertorico_no_da', "20210501T06Z", 48)
]
# Test
for cycle, ref_tm, validate in cycles:
Expand Down

0 comments on commit 55b19b5

Please sign in to comment.