[build-system]
requires = ["hatchling", 'hatch-vcs']
build-backend = 'hatchling.build'

[project]
name = 'cirrocumulus'
description = 'Bring your single-cell data to life'
readme = 'README.rst'
authors = [
    { name = 'Joshua Gould', email = 'cirrocumulus@googlegroups.com' },
]
urls.Source = 'https://github.com/lilab-bcb/cirrocumulus'
urls.Documentation = "https://cirrocumulus.readthedocs.io/"

license = { file = 'LICENSE' }
dynamic = ['version']

classifiers = [
    "Development Status :: 5 - Production/Stable",
    "Intended Audience :: Developers",
    'Intended Audience :: Science/Research',
    "License :: OSI Approved :: BSD License",
    "Natural Language :: English",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3.7",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: Implementation :: PyPy",
    'Topic :: Scientific/Engineering :: Bio-Informatics',
    'Topic :: Scientific/Engineering :: Visualization'
]

requires-python = '>=3.7'
dependencies = [
    "anndata",
    "CacheControl",
    "flask",
    "flask-compress",
    "fsspec",
    "gunicorn",
    "numpy",
    "pandas",
    "pymongo",
    "requests",
    "scipy",
    "zarr"
]

[project.optional-dependencies]
parquet = [
    'pyarrow',
]
test = [
    'pytest',
    'scanpy',
    'mongomock',
]


[tool.hatch.build.force-include]
"build" = "cirrocumulus/client"

[tool.hatch.build.targets.sdist]
exclude = [
    "/.github",
    "/docs",
    "/test-data",
    "/e2e",
    "/src",
    "/Dockerfile",
    "tests"
]

[tool.hatch.build.targets.wheel]

[tool.hatch.version]
source = 'vcs'

dev = ['pre-commit', 'isort', 'black']

[tool.black]
line-length = 100
include = '\.pyi?$'

[tool.docformatter]
include = '\.pyi?$'

[tool.isort]
profile = 'black'
length_sort_straight = true
line_length = 100
lines_after_imports = 2

[tool.flake8]
max-line-length = 100
include = '\.pyi?$'
ignore = [
    'E731', # Do not assign a lambda expression, use a def
    'E203', # whitespace before ':'
    'W503', # line break before binary operator ==
    'E501', # Line too long (82 > 79 characters)
    'E722', # Do not use bare except, specify exception instead
]

[tool.pytest.ini_options]
python_files = 'test_*.py'
testpaths = 'tests/'
xfail_strict = true
log_format = '%(asctime)s %(levelname)s %(message)s'
log_date_format = '%Y-%m-%d %H:%M:%S'
log_cli = true
log_cli_level = 'INFO'

[project.scripts]
cirro = 'cirrocumulus.__main__:main'
