[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "SWIIFT"
dynamic = ["version"]
description = "A numerical model to study wave-induced fracture of sea ice floes."
readme = "README.md"
requires-python = ">= 3.10"
license = "Apache-2.0"
authors = [{ name = "Nicolas Mokus", email = "nmks@tuta.io" }]
classifiers = [
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Science/Research",
    "License :: OSI Approved :: Apache Software License",
    "Natural Language :: English",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Programming Language :: Python :: Implementation :: CPython",
    "Topic :: Scientific/Engineering :: Mathematics",
    "Topic :: Scientific/Engineering :: Oceanography",
    "Topic :: Scientific/Engineering :: Physics",
]
dependencies = ["attrs", "scipy>=1.12", "numpy>=2", "matplotlib"]

[tool.hatch.version]
path = "src/swiift/__about__.py"

[tool.hatch.envs.hatch-test]
dependencies = [
    "pytest",
    "pytest-benchmark",
    "pytest-mock",
    "pytest-skip-slow",
    "pytest-xdist",
    "coverage",
    "hypothesis",
    "scipy-stubs",
]

[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.11", "3.12"]

[tool.hatch.envs.hatch-test.scripts]
run = "pytest{env:HATCH_TEST_ARGS:} {args}"
run-cov = "coverage run -m pytest{env:HATCH_TEST_ARGS:} {args}"
cov-combine = "coverage combine"
cov-report = "coverage html --show-contexts"

[tool.hatch.envs.types]
template = "hatch-test"
extra-dependencies = ["mypy>=1.0.0"]

[tool.hatch.envs.types.scripts]
check = "mypy --install-types --non-interactive {args:src/swiift tests}"

[tool.pytest.ini_options]
addopts = "--import-mode=importlib --benchmark-disable"
markers = ["slow: marks tests as slow (deselect with '-m \"not slow\"')"]

[tool.coverage.run]
branch = true
source = ["src", "tests"]
omit = ["src/swiift/__about__.py"]
dynamic_context = "test_function"

[tool.coverage.report]
exclude_also = ["if typing.TYPE_CHECKING:", "@typing.overload"]

[tool.isort]
profile = "black"
skip = [".gitignore"]
force_sort_within_sections = true
combine_as_imports = true
