Skip to content

Commit

Permalink
add package info to RTD
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaussion committed Nov 27, 2016
1 parent 605620d commit 54a3e04
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 3 deletions.
67 changes: 66 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,85 @@
# serve to show the default.

import os
import sys
import shutil

# see if matplotlib is there
# see if packages are here
print("python exec:", sys.executable)
print("sys.path:", sys.path)
try:
import numpy
print("numpy: %s, %s" % (numpy.__version__, numpy.__file__))
except ImportError:
print("no numpy")
try:
import scipy
print("scipy: %s, %s" % (scipy.__version__, scipy.__file__))
except ImportError:
print("no scipy")
try:
import pandas
print("pandas: %s, %s" % (pandas.__version__, pandas.__file__))
except ImportError:
print("no pandas")
try:
import xarray
print("xarray: %s, %s" % (xarray.__version__, xarray.__file__))
except ImportError:
print("no xarray")
try:
import pyproj
print("pyproj: %s, %s" % (pyproj.__version__, pyproj.__file__))
except ImportError:
print("no pyproj")
try:
import joblib
print("joblib: %s, %s" % (joblib.__version__, joblib.__file__))
except ImportError:
print("no joblib")
try:
import rasterio
print("rasterio: %s, %s" % (rasterio.__version__, rasterio.__file__))
except ImportError:
print("no rasterio")
try:
import geopandas
print("geopandas: %s, %s" % (geopandas.__version__, geopandas.__file__))
except ImportError:
print("no geopandas")
try:
import matplotlib
matplotlib.use('Agg')
print("matplotlib: %s, %s" % (matplotlib.__version__, matplotlib.__file__))
except ImportError:
print("no matplotlib")
try:
import dask
print("dask: %s, %s" % (dask.__version__, dask.__file__))
except ImportError:
print("no dask")
try:
import IPython
print("ipython: %s, %s" % (IPython.__version__, IPython.__file__))
except ImportError:
print("no ipython")
try:
import cartopy
print("cartopy: %s, %s" % (cartopy.__version__, cartopy.__file__))
except ImportError:
print("no cartopy")
try:
import netCDF4
print("netCDF4: %s, %s" % (netCDF4.__version__, netCDF4.__file__))
except ImportError:
print("no netCDF4")

# If we are on a proper salem install, we should be able to import all modules
import salem
import salem.version

print("Python version: %s" % salem.python_version)

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
Expand Down
4 changes: 2 additions & 2 deletions docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: salem
channels:
- conda-forge
dependencies:
- python
- python=3.5
- six
- numpy
- scipy
Expand All @@ -22,5 +22,5 @@ dependencies:
- ipython=4.0.1
- sphinx
- pip:
- git+https://github.com/fmaussion/motionless.git
- motionless
- sphinx-gallery

0 comments on commit 54a3e04

Please sign in to comment.