[project]
name = "wags_tails"
authors = [
    {name = "Kori Kuzma"},
    {name = "James S Stevenson"},
    {name = "Alex H Wagner"}
]
readme = "README.md"
classifiers = [
    "Development Status :: 3 - Alpha",
    "Framework :: Pydantic",
    "Framework :: Pydantic :: 2",
    "Intended Audience :: Science/Research",
    "Intended Audience :: Developers",
    "Topic :: Scientific/Engineering :: Bio-Informatics",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
]
requires-python = ">=3.11"
description = "Data acquisition tools for Wagnerds"
license = {file = "LICENSE"}
dependencies = [
    "requests",
    "tqdm",
]
dynamic = ["version"]

[project.optional-dependencies]
test = ["pytest>=6.0", "pytest-cov", "requests-mock"]
dev = ["pre-commit>=3.7.1", "ruff==0.5.0"]
docs = [
    "sphinx==6.1.3",
    "sphinx-autodoc-typehints==1.22.0",
    "sphinx-autobuild==2021.3.14",
    "sphinx-copybutton==0.5.2",
    "sphinxext-opengraph==0.8.2",
    "furo==2023.3.27",
    "gravis==0.1.0",
    "sphinx-github-changelog==1.2.1"
]

[project.urls]
Homepage = "https://github.com/GenomicMedLab/wags-tails/"
Documentation = "https://wags-tails.readthedocs.io/"
Changelog = "https://github.com/GenomicMedLab/wags-tails/releases"
Source = "https://github.com/GenomicMedLab/wags-tails/"
"Bug Tracker" = "https://github.com/GenomicMedLab/wags-tails/issues"

[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools_scm]

[tool.pytest.ini_options]
addopts = "--cov=src --cov-report term-missing"
testpaths = ["tests"]

[tool.coverage.run]
branch = true

[tool.ruff]
src = ["src"]
exclude = ["docs/source/conf.py"]

[tool.ruff.lint]
select = [
    "F",  # https://docs.astral.sh/ruff/rules/#pyflakes-f
    "E", "W",  # https://docs.astral.sh/ruff/rules/#pycodestyle-e-w
    "I",  # https://docs.astral.sh/ruff/rules/#isort-i
    "N",  # https://docs.astral.sh/ruff/rules/#pep8-naming-n
    "D",  # https://docs.astral.sh/ruff/rules/#pydocstyle-d
    "UP",  # https://docs.astral.sh/ruff/rules/#pyupgrade-up
    "ANN",  # https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
    "ASYNC",  # https://docs.astral.sh/ruff/rules/#flake8-async-async
    "S",  # https://docs.astral.sh/ruff/rules/#flake8-bandit-s
    "B",  # https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
    "A",  # https://docs.astral.sh/ruff/rules/#flake8-builtins-a
    "C4",  # https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
    "DTZ",  # https://docs.astral.sh/ruff/rules/#flake8-datetimez-dtz
    "T10",  # https://docs.astral.sh/ruff/rules/#flake8-datetimez-dtz
    "EM",  # https://docs.astral.sh/ruff/rules/#flake8-errmsg-em
    "LOG",  # https://docs.astral.sh/ruff/rules/#flake8-logging-log
    "G",  # https://docs.astral.sh/ruff/rules/#flake8-logging-format-g
    "INP",  # https://docs.astral.sh/ruff/rules/#flake8-no-pep420-inp
    "PIE",  # https://docs.astral.sh/ruff/rules/#flake8-pie-pie
    "T20",  # https://docs.astral.sh/ruff/rules/#flake8-print-t20
    "PT",  # https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
    "Q",  # https://docs.astral.sh/ruff/rules/#flake8-quotes-q
    "RSE",  # https://docs.astral.sh/ruff/rules/#flake8-raise-rse
    "RET",  # https://docs.astral.sh/ruff/rules/#flake8-return-ret
    "SLF",  # https://docs.astral.sh/ruff/rules/#flake8-self-slf
    "SIM",  # https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
    "ARG",  # https://docs.astral.sh/ruff/rules/#flake8-unused-arguments-arg
    "PTH",  # https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
    "PGH",  # https://docs.astral.sh/ruff/rules/#pygrep-hooks-pgh
    "PERF",  # https://docs.astral.sh/ruff/rules/#perflint-perf
    "FURB",  # https://docs.astral.sh/ruff/rules/#refurb-furb
    "RUF",  # https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
]
fixable = [
    "I",
    "F401",
    "D",
    "UP",
    "ANN",
    "B",
    "C4",
    "LOG",
    "G",
    "PIE",
    "PT",
    "RSE",
    "SIM",
    "PERF",
    "FURB",
    "RUF"
]

# ANN003 - missing-type-kwargs
# ANN101 - missing-type-self
# ANN102 - missing-type-cls
# D203 - one-blank-line-before-class
# D205 - blank-line-after-summary
# D206 - indent-with-spaces*
# D213 - multi-line-summary-second-line
# D300 - triple-single-quotes*
# D400 - ends-in-period
# D415 - ends-in-punctuation
# E111 - indentation-with-invalid-multiple*
# E114 - indentation-with-invalid-multiple-comment*
# E117 - over-indented*
# E501 - line-too-long*
# W191 - tab-indentation*
# S321 - suspicious-ftp-lib-usage
# *ignored for compatibility with formatter
ignore = [
    "ANN003", "ANN101", "ANN102",
    "D203", "D205", "D206", "D213", "D300", "D400", "D415",
    "E111", "E114", "E117", "E501",
    "W191",
    "S321",
]

[tool.ruff.lint.per-file-ignores]
# ANN001 - missing-type-function-argument
# ANN2 - missing-return-type
# D100 - undocumented-public-module
# D102 - undocumented-public-class
# S101 - assert
# B011 - assert-false
# INP001 - implicit-namespace-package
# PT018 - pytest-composite-assertion
# ARG001 - unused-function-argument
# ARG005 - unused-lambda-argument
# T201 - print
"tests/*" = ["ANN001", "ANN2", "D100", "D102", "S101", "B011", "INP001"]
"tests/test_hemonc.py" = ["PT018"]
"tests/test_gtop.py" = ["PT018"]
"tests/test_do.py" = ["PT018"]
"tests/test_custom.py" = ["ARG001", "ARG005"]
"src/wags_tails/utils/downloads.py" = ["T201"]

[tool.ruff.lint.flake8-annotations]
mypy-init-return = true

[tool.ruff.format]
docstring-code-format = true
