diff --git a/.pytest_cache/v/cache/lastfailed b/.pytest_cache/v/cache/lastfailed deleted file mode 100644 index 3523578..0000000 --- a/.pytest_cache/v/cache/lastfailed +++ /dev/null @@ -1,4 +0,0 @@ -{ - "tests/test_accuracy.py::test_acc_best_euclidean_3d_features_not_set": true, - "tests/test_recmat.py::test_exact": true -} \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 98a4915..5d45564 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ install: scipy matplotlib seaborn scikit-learn - source activate testenv - pip install -r requirements.txt -- python setup.py install +- pip install -e . [speech-decoding, efficient-learning] script: py.test notifications: slack: diff --git a/MANIFEST.in b/MANIFEST.in index 4076af8..a8353d0 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1,2 @@ include quail/data/* +include requirements.txt diff --git a/quail/load.py b/quail/load.py index 4bb666a..8084cd8 100644 --- a/quail/load.py +++ b/quail/load.py @@ -3,19 +3,22 @@ from builtins import zip from builtins import str from builtins import range -from sqlalchemy import create_engine, MetaData, Table import json import re import csv -import pandas as pd -import numpy as np -from .egg import Egg, FriedEgg -import dill import pickle import os +import pandas as pd +import numpy as np import deepdish as dd +from .egg import Egg, FriedEgg from .helpers import parse_egg, stack_eggs +try: + from sqlalchemy import create_engine, MetaData, Table +except: + pass + def load(filepath, update=True): """ Loads eggs, fried eggs ands example data diff --git a/requirements.txt b/requirements.txt index 4c3abff..6e0a547 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,16 +1,8 @@ -seaborn>=0.7.1 -matplotlib>=1.5.1 -scipy>=0.17.1 numpy>=1.10.4 -pandas -grpcio -sqlalchemy -dill -requests -pydub -google-cloud-speech -pathos +scipy>=0.17.1 +matplotlib>=1.5.1 +seaborn>=0.7.1 +pandas>=0.18.1 future six deepdish -joblib diff --git a/setup.py b/setup.py index b5df9f5..6d7fd9b 100755 --- a/setup.py +++ b/setup.py @@ -2,34 +2,40 @@ from setuptools import setup, find_packages +DESCRIPTION = 'A python toolbox for analyzing and plotting free recall data' +LONG_DESCRIPTION = """\ +Quail is a Python package that facilitates analyses of behavioral data from memory experiments. (The current focus is on free recall experiments.) Key features include: + +- Serial position curves (probability of recalling items presented at each presentation position) +Probability of Nth recall curves (probability of recalling items at each presentation position as the Nth recall in the recall sequence) +- Lag-Conditional Response Probability curves (probability of transitioning between items in the recall sequence, as a function of their relative presentation positions) +- Clustering metrics (e.g. single-number summaries of how often participants transition from recalling a word to another related word, where "related" can be user-defined.) +- Many nice plotting functions +- Convenience functions for loading in data +- Automatically parse speech data (audio files) using wrappers for the Google Cloud Speech to Text API + +The intended user of this toolbox is a memory researcher who seeks an easy way to analyze and visualize data from free recall psychology experiments. +""" + +with open('requirements.txt') as f: + REQUIREMENTS = f.read().splitlines() + +EXTRAS_REQUIRE={ + 'speech-decoding': ["pydub", "google-cloud-speech<0.31dev,>=0.30.0", "google-cloud>=0.32.0,<0.34.0"], + 'efficient-learning': ["sqlalchemy"], +} + setup( name='quail', version='0.2.0', - description='A python toolbox for analyzing and plotting free recall data', - long_description=' ', + description=DESCRIPTION, + long_description=LONG_DESCRIPTION, author='Contextual Dynamics Lab', author_email='contextualdynamics@gmail.com', url='https://github.com/ContextLab/quail', license='MIT', packages=find_packages(exclude=('tests', 'docs', 'paper')), include_package_data=True, - install_requires=[ - "seaborn>=0.7.1", - "matplotlib>=1.5.1", - "scipy>=0.17.1", - "numpy>=1.10.4", - "pandas", - "grpcio", - "sqlalchemy", - "dill", - "requests", - "pydub", - "google-cloud-speech<0.31dev,>=0.30.0", - "google-cloud>=0.32.0,<0.34.0", - "pathos", - "future", - "six", - "deepdish", - "joblib", - ] + install_requires=REQUIREMENTS, + extras_require=EXTRAS_REQUIRE, )