#!/usr/bin/env python
# -*- coding: utf-8 -*-
import io
import os
import re

from setuptools import setup, find_packages


classifiers = """\
    Development Status :: 4 - Beta
    Operating System :: OS Independent
    Programming Language :: Python
    Programming Language :: Python :: 2
    Programming Language :: Python :: 2.7
    Programming Language :: Python :: 3
    Programming Language :: Python :: 3.4
    Programming Language :: Python :: 3.5
    Programming Language :: Python :: 3.6
    Programming Language :: Python :: 3.7
"""


def _read(*parts, **kwargs):
    filepath = os.path.join(os.path.dirname(__file__), *parts)
    encoding = kwargs.pop('encoding', 'utf-8')
    with io.open(filepath, encoding=encoding) as fh:
        text = fh.read()
    return text


def get_version():
    version = re.search(
        r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
        _read('cooler', '_version.py'),
        re.MULTILINE).group(1)
    return version


def get_long_description():
    return _read('README.md')


def get_requirements(path):
    content = _read(path)
    return [
        req
        for req in content.split("\n")
        if req != '' and not req.startswith('#')
    ]


install_requires = get_requirements('requirements.txt')


tests_require = [
    'pytest',
    'mock'
]

extras_require = {
    'docs': [
        'Sphinx>=1.1',
        'numpydoc>=0.5'
    ],
    'pysam': ['pysam']
}


setup(
    name='cooler',
    author='Nezar Abdennur',
    author_email='nezar@mit.edu',
    version=get_version(),
    license='BSD',
    description='Sparse binary format for genomic interaction matrices',
    long_description=get_long_description(),
    long_description_content_type='text/markdown',
    keywords=['genomics', 'bioinformatics', 'Hi-C', 'contact', 'matrix', 'format', 'hdf5'],
    url='https://github.com/mirnylab/cooler',
    packages=find_packages(),
    zip_safe=False,
    classifiers=[s.strip() for s in classifiers.split('\n') if s],
    install_requires=install_requires,
    tests_require=tests_require,
    extras_require=extras_require,
    entry_points={
        'console_scripts': [
            'cooler = cooler.cli:cli',
        ]
    }
)

@@ -534,16 +534,58 @@
  :: 3.7%0A
+    Programming Language :: Python :: 3.8%0A
 %22%22%22%0A%0A%0Ade
@@ -1299,14 +1299,13 @@
 t')%0A
-%0A%0Atest
+extra
 s_re
@@ -1316,66 +1316,165 @@
 e = 
-%5B
+%7B
 %0A    '
-pytest',%0A    'mock'%0A%5D%0A%0Aextras_require = %7B
+tests': %5B'pytest', 'mock', 'pytest-flake8', 'pytest-cov', 'codecov'%5D,%0A    'docs': get_requirements(os.path.join('docs', 'requirements.txt')),
 %0A    '
-docs
+all
 ': %5B
@@ -1487,75 +1487,118 @@
    '
-Sphinx%3E=1.1',%0A        'numpydoc%3E=0.5'%0A    %5D
+biopython%3C1.77',%0A        'dask%5Barray,dataframe%5D',%0A        'ipytree'
 ,%0A    
+ 
-'pysam': %5B'pysam'%5D
+   'psutil',%0A        'pysam',%0A    %5D,
 %0A%7D%0A%0A
@@ -2200,41 +2200,8 @@
 es,%0A
-    tests_require=tests_require,%0A
     

Update extras_require