-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
168 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[run] | ||
branch = True | ||
source = klusta | ||
|
||
[report] | ||
exclude_lines = | ||
pragma: no cover | ||
raise AssertionError | ||
raise NotImplementedError | ||
pass | ||
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
language: python | ||
sudo: false | ||
python: | ||
- "2.7" | ||
- "3.4" | ||
- "3.5" | ||
before_install: | ||
- pip install codecov | ||
install: | ||
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then | ||
wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh; | ||
else | ||
wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh; | ||
fi | ||
- bash miniconda.sh -b -p $HOME/miniconda | ||
- export PATH="$HOME/miniconda/bin:$PATH" | ||
- hash -r | ||
- conda config --set always_yes yes --set changeps1 no | ||
- conda update -q conda | ||
- conda info -a | ||
# Create the environment. | ||
- conda env create python=$TRAVIS_PYTHON_VERSION | ||
- source activate klusta | ||
- pip install klustakwik2 | ||
# Dev requirements | ||
- pip install -r requirements-dev.txt | ||
- pip install -e . | ||
script: | ||
- make test | ||
after_success: | ||
- codecov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
include LICENSE | ||
include README.md | ||
|
||
recursive-include tests * | ||
recursive-exclude * __pycache__ | ||
recursive-exclude * *.py[co] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
clean-build: | ||
rm -fr build/ | ||
rm -fr dist/ | ||
rm -fr *.egg-info | ||
|
||
clean-pyc: | ||
find . -name '*.pyc' -exec rm -f {} + | ||
find . -name '*.pyo' -exec rm -f {} + | ||
find . -name '*~' -exec rm -f {} + | ||
find . -name '__pycache__' -exec rm -fr {} + | ||
|
||
clean: clean-build clean-pyc | ||
|
||
lint: | ||
flake8 klusta | ||
|
||
test: lint | ||
py.test --cov-report term-missing --cov=klusta klusta | ||
|
||
coverage: | ||
coverage --html | ||
|
||
apidoc: | ||
python tools/api.py | ||
|
||
build: | ||
python setup.py sdist --formats=zip | ||
|
||
upload: | ||
python setup.py sdist --formats=zip upload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Need development version of pytest for py35 compat | ||
# https://github.com/pytest-dev/pytest/issues/744 | ||
git+https://github.com/pytest-dev/pytest.git | ||
|
||
flake8 | ||
coverage==3.7.1 | ||
coveralls | ||
responses | ||
pytest-cov | ||
nose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[wheel] | ||
universal = 1 | ||
|
||
[pytest] | ||
norecursedirs = experimental _* | ||
|
||
[flake8] | ||
ignore=E265,E731 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# -*- coding: utf-8 -*- | ||
# flake8: noqa | ||
|
||
"""Installation script.""" | ||
|
||
|
||
#------------------------------------------------------------------------------ | ||
# Imports | ||
#------------------------------------------------------------------------------ | ||
|
||
import os | ||
import os.path as op | ||
import re | ||
|
||
from setuptools import setup | ||
|
||
|
||
#------------------------------------------------------------------------------ | ||
# Setup | ||
#------------------------------------------------------------------------------ | ||
|
||
def _package_tree(pkgroot): | ||
path = op.dirname(__file__) | ||
subdirs = [op.relpath(i[0], path).replace(op.sep, '.') | ||
for i in os.walk(op.join(path, pkgroot)) | ||
if '__init__.py' in i[2]] | ||
return subdirs | ||
|
||
|
||
curdir = op.dirname(op.realpath(__file__)) | ||
readme = open(op.join(curdir, 'README.md')).read() | ||
|
||
|
||
# Find version number from `__init__.py` without executing it. | ||
filename = op.join(curdir, 'klusta/__init__.py') | ||
with open(filename, 'r') as f: | ||
version = re.search(r"__version__ = '([^']+)'", f.read()).group(1) | ||
|
||
|
||
setup( | ||
name='klusta', | ||
version=version, | ||
license="BSD", | ||
description='Spike detection and automatic clustering for spike sorting', | ||
long_description=readme, | ||
author='Kwik Team', | ||
author_email='cyrille.rossant at gmail.com', | ||
url='https://klusta.cortexlab.net', | ||
packages=_package_tree('klusta'), | ||
package_dir={'klusta': 'klusta'}, | ||
package_data={ | ||
'klusta': ['*.txt', '*.prb'], | ||
}, | ||
entry_points={ | ||
'console_scripts': [ | ||
'klusta = klusta.utils.cli:klusta' | ||
], | ||
}, | ||
include_package_data=True, | ||
keywords='klusta,neuroscience,spike sorting,klustakwik', | ||
classifiers=[ | ||
'Development Status :: 3 - Alpha', | ||
'Intended Audience :: Science/Research', | ||
'License :: OSI Approved :: BSD License', | ||
'Natural Language :: English', | ||
"Programming Language :: Python :: 2", | ||
'Programming Language :: Python :: 2.7', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.4', | ||
'Programming Language :: Python :: 3.5', | ||
], | ||
) |