#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""The setup script."""

from setuptools import find_packages, setup

with open("README.md") as readme_file:
    readme = readme_file.read()

test_requirements = [
    "codecov",
    "flake8",
    "pytest",
    "pytest-cov",
    "pytest-raises",
]

setup_requirements = [
    "pytest-runner",
]

dev_requirements = [
    "bumpversion>=0.5.3",
    "coverage>=5.0a4",
    "flake8>=3.7.7",
    "ipython>=7.5.0",
    "m2r>=0.2.1",
    "pytest>=4.3.0",
    "pytest-cov==2.6.1",
    "pytest-raises>=0.10",
    "pytest-runner>=4.4",
    "Sphinx>=2.0.0b1",
    "sphinx_rtd_theme>=0.1.5",
    "tox>=3.5.2",
    "twine>=1.13.0",
    "wheel>=0.33.1",
]

interactive_requirements = [
    "altair",
    "jupyterlab",
    "matplotlib",
]

requirements = [
    "asyncssh",
    "asyncio",
    "aicsdaemon",
    "bokeh",
    "dask",
    "dask_cuda",
    "dask_jobqueue",
    "typing_extensions"
]

extra_requirements = {
    "test": test_requirements,
    "setup": setup_requirements,
    "dev": dev_requirements,
    "interactive": interactive_requirements,
    "all": [
        *requirements,
        *test_requirements,
        *setup_requirements,
        *dev_requirements,
        *interactive_requirements
    ]
}

setup(
    author="Gregory Johnson",
    author_email="gregj@alleninstitute.org",
    classifiers=[
        "Development Status :: 2 - Pre-Alpha",
        "Intended Audience :: Developers",
        "License :: Free for non-commercial use",
        "Natural Language :: English",
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
    ],
    description="Tools for composing interdependent tasks on a scheduler (i.e. SLURM)",
    entry_points={
        "console_scripts": [
            "spawn_dask_cluster=scheduler_tools.bin.spawn_dask_cluster:main",
            "shutdown_dask_cluster=scheduler_tools.bin.shutdown_dask_cluster:main",
            "spawn_adaptable_dask_cluster=scheduler_tools.bin.spawn_adaptable_dask_cluster:main",
            "stop_adaptable_dask_cluster=scheduler_tools.bin.stop_adaptable_dask_cluster:main",
        ],
    },
    install_requires=requirements,
    license="Allen Institute Software License",
    long_description=readme,
    long_description_content_type="text/markdown",
    include_package_data=True,
    keywords="scheduler_tools",
    name="scheduler_tools",
    packages=find_packages(),
    python_requires=">=3.6",
    scripts=[
        'scheduler_tools/bin/setup_and_spawn.bash'
    ],
    setup_requires=setup_requirements,
    test_suite="scheduler_tools/tests",
    tests_require=test_requirements,
    extras_require=extra_requirements,
    url="https://github.com/AllenCellModeling/scheduler_tools",
    # Do not edit this string manually, always use bumpversion
    # Details in CONTRIBUTING.rst
    version="0.1.5",
    zip_safe=False,
)
