Skip to content
Snippets Groups Projects
pyproject.toml 2.56 KiB
Newer Older
[project]
name = 'MVCM'
Paolo Veglio's avatar
Paolo Veglio committed
description = 'MODIS-VIIRS Cloud Mask algorithm for LEO/GEO'
readme = 'README.md'
Paolo Veglio's avatar
Paolo Veglio committed
requires-python = '>=3.9,<3.12'
# license = ''
authors = [
    { name = 'Paolo Veglio', email = 'paolo.veglio@ssec.wisc.edu'},
    ]
classifiers = [
    'Development Status :: 2 - Pre-Alpha',
    # 'License :: OSI Approved :: Apache Software License',
    'Programming Language :: Python :: 3.9',
    'Programming Language :: Python :: 3.10',
    'Programming Language :: Python :: 3.11',
    'Programming Language :: Python :: Implementation :: CPython',
    'Programming Language :: Cython',
    'Programming Language :: C',
    ]
dependencies = [
Paolo Veglio's avatar
Paolo Veglio committed
    'Cython',
    'wheel',
    'setuptools',
Paolo Veglio's avatar
Paolo Veglio committed
    'attrs',
    'pre-commit',
Paolo Veglio's avatar
Paolo Veglio committed
    ]
dynamic = ['version']

[project.scripts]
mvcm = "mvcm.cli_mvcm:mvcm"

Paolo Veglio's avatar
Paolo Veglio committed
[tool.hatch.version]
path = 'mvcm/__init__.py'

Paolo Veglio's avatar
Paolo Veglio committed
[tool.hatch.envs.test]
dependencies = [
    'pytest',
Paolo Veglio's avatar
Paolo Veglio committed
    'pytest-cov',
Paolo Veglio's avatar
Paolo Veglio committed
    ]

[build-system]
requires = ['hatchling']
build-backend = 'hatchling.build'
[tool.pytest.ini_options]
addopts = [
    '--import-mode=importlib',
Paolo Veglio's avatar
Paolo Veglio committed
    ]

[tool.hatch.envs.lint]
detached = true
dependencies = [
  "black>=23.1.0",
  "ruff>=0.0.243",
  "mypy>=1.0.0",
]


[tool.hatch.envs.lint.scripts]
typing = "mypy --install-types --non-interactive {args:mvcm tests}"
style = [
  "ruff {args:.}",
  "black --check --diff {args:.}",
]
fmt = [
  "black {args:.}",
  "ruff --fix {args:.}",
  "style",
]
all = [
  'style',
  'typing',
]

[tool.black]
target-version = ['py310']
# skip-string-normalization = true

[tool.ruff]
select = [
  "A",
  "ARG",
  "B",
  "C",
  "DTZ",
  "E",
  "EM",
  "F",
  "FBT",
  "I",
  "ICN",
  "ISC",
  "N",
  "PLC",
  "PLE",
  "PLR",
  "PLW",
  "Q",
  "RUF",
  "S",
  "T",
  "TID",
  "UP",
  "W",
  "YTT",
]
ignore = [
  # Avoid false positives on local modules. isort still sorts the imports properly
  # "I001",
  # Allow non-abstract empty methods in abstract base classes
  "B027",
  # Allow boolean positional values in function calls, like `dict.get(... True)`
  "FBT003",
  # Ignore checks for possible passwords
  "S105", "S106", "S107",
  # Prone to false positives
  "S603",
  # Ignore complexity
  "C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915",
]

[tool.ruff.isort]
known-first-party = ["mvcm"]

[tool.ruff.per-file-ignores]
# Tests can use magic values, assertions, and relative imports
"tests/**/*" = ["PLR2004", "S101", "TID252"]

[tool.mypy]
ignore_missing_imports = true