Skip to content

Commit

Permalink
Added MANIFEST.in
Browse files Browse the repository at this point in the history
  • Loading branch information
ocefpaf committed Dec 19, 2015
1 parent 15263a1 commit 0a141ca
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Expand Up @@ -13,6 +13,9 @@ before_install:
- travis_retry conda create --yes -n TEST $CONDA --file requirements.txt
- source activate TEST
- travis_retry conda install --yes pytest
# GUI
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"

script:
- python setup.py test
4 changes: 4 additions & 0 deletions MANIFEST.in
@@ -0,0 +1,4 @@
include README.rst
include *.txt
recursive-include cmocean *.txt
recursive-include cmocean *.py
19 changes: 8 additions & 11 deletions tests/test_cmocean.py
Expand Up @@ -12,17 +12,14 @@ def test_cmap_import():
'''

import cmocean

# find all methods in cmocean
methods = dir(cmocean)

# loop through all methods in cmocean
for method in methods:

# see if method is a colormap
if type(eval('cmocean.' + method)) == matplotlib.colors.LinearSegmentedColormap:
from cmocean import cm
# Loop through all methods in cmocean.
for name, cmap in vars(cm).items():
# See if it is a colormap.
if isinstance(cmap, matplotlib.colors.LinearSegmentedColormap):
print(name)
x = np.linspace(0, 10)
X, _ = np.meshgrid(x, x)
plt.figure()
plt.pcolor(X, cmap=eval('cmocean.' + method))
plt.pcolor(X, cmap=cmap)
plt.title(name)

0 comments on commit 0a141ca

Please sign in to comment.