Skip to content

Commit 4f9d2d1

Browse files
committed
Merge pull request #9 from mfeurer/master
Update for travis-ci and readthedocs
2 parents 44c4e3b + dcb305a commit 4f9d2d1

4 files changed

Lines changed: 28 additions & 8 deletions

File tree

tests/.travis.yml renamed to .travis.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ install:
2626
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION numpy scipy==0.13.3 matplotlib setuptools nose
2727
- source activate test-environment
2828
- python setup.py install
29-
- pip install xmltodict
30-
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
31-
pip install mock
32-
fi
33-
- python setup.py install
29+
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then pip install mock; fi
3430

3531
# command to run tests, e.g. python setup.py test
3632
script: python setup.py test

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
numpy>=1.6.2
2+
scipy>=0.13.3

setup.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
version="0.0.1dev",
1212
packages=setuptools.find_packages(),
1313
package_data={'': ['*.txt', '*.md']},
14-
install_requires=["liac-arff>=2.1.0",
14+
install_requires=["liac-arff>=2.1.1dev",
1515
"numpy>=1.6.2",
1616
"scipy>=0.13.3",
1717
"xmltodict",
@@ -31,4 +31,7 @@
3131
'Programming Language :: Python :: 3',
3232
'Programming Language :: Python :: 3.3',
3333
'Programming Language :: Python :: 3.4',
34-
])
34+
],
35+
dependency_links=[
36+
"http://github.com/mfeurer/liac-arff/archive/master.zip"
37+
"#egg=liac-arff-2.1.1dev"])

source/conf.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,25 @@
1212
# All configuration values have a default; values that are commented out
1313
# serve to show the default.
1414

15-
import sys
1615
import os
16+
import sys
17+
18+
if sys.version_info[0] >= 3:
19+
from unittest.mock import MagicMock
20+
else:
21+
from mock import MagicMock
22+
23+
24+
class Mock(MagicMock):
25+
@classmethod
26+
def __getattr__(cls, name):
27+
return Mock()
28+
29+
30+
MOCK_MODULES = ['pygtk', 'gtk', 'gobject', 'argparse', 'numpy', 'pandas',
31+
'scipy', 'scipy.sparse', 'scipy.io', 'scipy.io.arff']
32+
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
33+
1734

1835
# If extensions (or modules to document with autodoc) are in another directory,
1936
# add these directories to sys.path here. If the directory is relative to the
@@ -33,10 +50,12 @@
3350
# ones.
3451
extensions = [
3552
'sphinx.ext.autodoc',
53+
'sphinx.ext.autosummary',
3654
'sphinx.ext.doctest',
3755
'sphinx.ext.coverage',
3856
'sphinx.ext.mathjax',
3957
'sphinx.ext.ifconfig',
58+
'numpydoc'
4059
]
4160

4261
# Add any paths that contain templates here, relative to this directory.

0 commit comments

Comments
 (0)