Skip to content

Commit

Permalink
Add minimal test dependencies and a Travis CI config file
Browse files Browse the repository at this point in the history
  • Loading branch information
jpgill86 committed Jun 27, 2019
1 parent e26e59b commit 8027b07
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
dist: xenial # required for Python >= 3.7

language: python
python:
# We don't actually use the Travis Python, but this keeps it organized.
# - "3.4" # conda UnsatisfiableError: pandas -> numpy[version='>=1.14.6,<2.0a0'] -> python[version='>=2.7,<2.8.0a0']
# - "3.5" # conda never finishes solving environment
- "3.6"
- "3.7"

install:
- sudo apt-get update

# install conda
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- 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 python environment
- conda create -q -n test-environment -c conda-forge python=$TRAVIS_PYTHON_VERSION coveralls nose
- conda env update -q -n test-environment -f environment.yml
- source activate test-environment

# check version
- python -V

# install package
- python setup.py install

script:
# run tests
nosetests --with-coverage --cover-package=neurotic
8 changes: 8 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ neurotic
:target: https://github.com/jpgill86/neurotic
:alt: GitHub source code

.. image:: https://travis-ci.com/jpgill86/neurotic.svg?branch=master
:target: https://travis-ci.com/jpgill86/neurotic
:alt: Build status

.. image:: https://coveralls.io/repos/github/jpgill86/neurotic/badge.svg?branch=master
:target: https://coveralls.io/github/jpgill86/neurotic?branch=master
:alt: Coverage status

Installation
------------

Expand Down
18 changes: 18 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
channels:
- conda-forge
- defaults
dependencies:
- av
- ipywidgets
- numpy
- pandas
- pip
- pyqt
- pyyaml
- quantities
- tqdm
- pip:
- elephant>=0.6.2
- pylttb
- git+https://github.com/jpgill86/python-neo.git@axographrawio
- git+https://github.com/jpgill86/ephyviewer.git@experimental
4 changes: 4 additions & 0 deletions neurotic/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# -*- coding: utf-8 -*-
"""
Tests for the neurotic package
"""
2 changes: 2 additions & 0 deletions requirements-tests.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coveralls
nose
5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,18 @@
# with open('requirements.txt', 'r') as f:
# install_requires = f.read()

extras_require = {}
with open('requirements-tests.txt', 'r') as f:
extras_require['tests'] = f.read()

setup(
name = 'neurotic',
version = VERSION,
description = 'Curate, visualize, and annotate your behavioral ephys data using Python',
packages = find_packages(),
package_data = {'neurotic': ['example/metadata.yml']},
install_requires = install_requires,
extras_require = extras_require,
entry_points = {'console_scripts': ['neurotic=neurotic.scripts:launch_standalone']},
long_description = README,
author = 'Jeffrey Gill',
Expand Down

0 comments on commit 8027b07

Please sign in to comment.