Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
Fist commit to address #1 (cartopy)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Nov 9, 2019
1 parent 9f8a1cc commit d6db331
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 2 deletions.
2 changes: 2 additions & 0 deletions HISTORY.rst
@@ -0,0 +1,2 @@
HISTORY
=======
1 change: 0 additions & 1 deletion _doc/sphinxdoc/source/conf.py
Expand Up @@ -21,4 +21,3 @@
epkg_dictionary.update({
'cartopy': 'https://scitools.org.uk/cartopy/docs/latest/',
})

18 changes: 18 additions & 0 deletions _unittests/ut_checks/test_cartopy.py
@@ -0,0 +1,18 @@
"""
@brief test log(time=0s)
"""

import unittest
from pyquickhelper.pycode import ExtTestCase
from check_python_install.check_cartopy import check_cartopy


class TestCartopy(ExtTestCase):

def test_cartopy(self):
ax = check_cartopy()
self.assertNotEmpty(ax)


if __name__ == "__main__":
unittest.main()
22 changes: 22 additions & 0 deletions check_python_install/check_cartopy.py
@@ -0,0 +1,22 @@
"""
@file
@brief Test for :epkg:`cartopy`.
"""
import cartopy.crs as ccrs
import cartopy.feature as cfeature
import matplotlib.pyplot as plt


def check_cartopy():
"""
Runs a sample with :epkg:`cartopy`.
Returns a graph.
"""
fig = plt.figure(figsize=(7, 7))
ax = fig.add_subplot(1, 1, 1, projection=ccrs.PlateCarree())
ax.set_extent([-5, 10, 42, 52])
ax.add_feature(cfeature.OCEAN)
ax.add_feature(cfeature.COASTLINE)
ax.add_feature(cfeature.BORDERS, linestyle=':')
ax.set_title('France')
return ax
5 changes: 4 additions & 1 deletion requirements.txt
@@ -1,6 +1,9 @@
cartopy
coverage
jyquickhelper
matplotlib
git+https://github.com/sdpython/nbconvert.git@fixes
numpy
pandas
pyquickhelper
sphinx_rtd_theme
wheel
1 change: 1 addition & 0 deletions setup.py
Expand Up @@ -154,4 +154,5 @@ def write_version():
packages=packages,
package_dir=package_dir,
package_data=package_data,
requires=['cartopy'],
)

0 comments on commit d6db331

Please sign in to comment.