Skip to content

Commit

Permalink
A few more deprecs
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaussion committed Jul 10, 2024
1 parent 8a6779c commit 46b475f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
3 changes: 0 additions & 3 deletions oggm/graphics.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,6 @@ def plot_googlemap(gdirs, ax=None, figsize=None, key=None):
' or set the STATIC_MAP_API_KEY environment'
' variable.')

if 'o-Z' not in key:
raise ValueError(f'What is this key: {key}')

dofig = False
if ax is None:
fig = plt.figure(figsize=figsize)
Expand Down
2 changes: 1 addition & 1 deletion oggm/tests/test_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ def test_workflow(self):

df = utils.compile_glacier_statistics(gdirs)
df['inv_thickness_m'] = df['inv_volume_km3'] / df['rgi_area_km2'] * 1e3
assert df.inv_thickness_m[0] < 100
assert df.inv_thickness_m.iloc[0] < 100

df = utils.compile_fixed_geometry_mass_balance(gdirs)
assert len(df) > 100
Expand Down
2 changes: 1 addition & 1 deletion oggm/tests/test_prepro.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def test_compute_hypsometry_attributes(self):
dfh.index = ['oggm']
dft = dfh[bins].T
dft['ref'] = dfr[bins].T
assert dft.sum()[0] == 1000
assert dft.sum().iloc[0] == 1000
assert utils.rmsd(dft['ref'], dft['oggm']) < 5

@pytest.mark.skipif((Version(rasterio.__version__) <
Expand Down
4 changes: 2 additions & 2 deletions oggm/tests/test_shop.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ def test_all_at_once(self, class_case_dir):
dfp = pd.concat(dfp, axis=1, keys=exps)

# Common period
dfy = dft.resample('AS').mean().dropna().iloc[1:]
dfy = dft.resample('YS').mean().dropna().iloc[1:]
dfm = dft.groupby(dft.index.month).mean()
assert dfy.corr().min().min() > 0.44 # ERA5L and CERA do no correlate
assert dfm.corr().min().min() > 0.97
Expand All @@ -610,7 +610,7 @@ def test_all_at_once(self, class_case_dir):

# PRECIP
# Common period
dfy = dfp.resample('AS').mean().dropna().iloc[1:] * 12
dfy = dfp.resample('YS').mean().dropna().iloc[1:] * 12
dfm = dfp.groupby(dfp.index.month).mean()
assert dfy.corr().min().min() > 0.5
assert dfm.corr().min().min() > 0.8
Expand Down
2 changes: 1 addition & 1 deletion oggm/utils/_downloads.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ def _verified_download_helper(cache_obj_name, dl_func, reset=False):
data = data.loc[cache_path]
if data['size'] != size or bytes(data['sha256']) != sha256:
err = '%s failed to verify!\nis: %s %s\nexpected: %s %s' % (
path, size, sha256.hex(), data[0], data[1].hex())
path, size, sha256.hex(), data.iloc[0], data.iloc[1].hex())
raise DownloadVerificationFailedException(msg=err, path=path)
logger.info('%s verified successfully.' % path)
cfg.DL_VERIFIED[cache_obj_name] = True
Expand Down

0 comments on commit 46b475f

Please sign in to comment.