Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Docs #995

Merged
merged 5 commits into from
Mar 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/_code/prepare_climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@
def example_plot_temp_ts():
d = xr.open_dataset(gdir.get_filepath('climate_monthly'))
temp = d.temp.resample(time='12MS').mean('time').to_series()
del temp.index.name
temp.index = temp.index.year
try:
temp = temp.rename_axis(None)
except AttributeError:
del temp.index.name
temp.plot(figsize=(8, 4), label='Annual temp')
tsm = temp.rolling(31, center=True, min_periods=15).mean()
tsm.plot(label='31-yr avg')
Expand Down
10 changes: 10 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,21 @@
print("netCDF4: %s, %s" % (netCDF4.__version__, netCDF4.__file__))
except ImportError:
print("no netCDF4")
try:
import cftime
print("cftime: %s, %s" % (cftime.__version__, cftime.__file__))
except ImportError:
print("no netCDF4")
try:
import skimage
print("skimage: %s, %s" % (skimage.__version__, skimage.__file__))
except ImportError:
print("no skimage")
try:
import salem
print("salem: %s, %s" % (salem.__version__, salem.__file__))
except ImportError:
print("no salem")

# Remove some warnings
try:
Expand Down
5 changes: 3 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,24 @@ scipy
pandas
shapely
matplotlib
pyproj
pyproj==2.5.0
rasterio
Pillow
geopandas
netcdf4==1.3.1
cftime
scikit-image
configobj
joblib
xarray
progressbar2
pytest
tables
motionless
dask
bottleneck
descartes
toolz
ipython
numpydoc
tables
git+https://github.com/fmaussion/salem.git
3 changes: 3 additions & 0 deletions oggm/utils/_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
pass
try:
import salem
except ImportError:
pass
try:
from salem import wgs84
from salem.gis import transform_proj
except ImportError:
Expand Down