[build-system]
requires = ["setuptools>=69", "wheel", "setuptools-scm[toml]>=8"]
build-backend = "setuptools.build_meta"

[project]
name = "openavmkit"
description = "Open-source automated valuation model (AVM) toolkit"
readme = "README.md"
requires-python = ">=3.11"
# Dual license (AGPLv3 OR commercial).
license = { file = "LICENSE-AGPLv3" }
authors = [{ name = "Lars A. Doucet", email = "lars.doucet+openavmkit@gmail.com" }]
dynamic = ["version", "dependencies"]
keywords = ["avm", "mass appraisal", "valuation", "gis", "real estate"]
classifiers = [
  "Programming Language :: Python :: 3",
  "Programming Language :: Python :: 3 :: Only",
  "Programming Language :: Python :: 3.11",
  "Programming Language :: Python :: 3.12",
  "Operating System :: OS Independent",
  "License :: OSI Approved :: GNU Affero General Public License v3",
  "License :: Other/Proprietary License",
  "Development Status :: 4 - Beta",
]

[project.optional-dependencies]
docs = [
  "mkdocs>=1.6",
  "mkdocs-material>=9.5",
  "mkdocstrings[python]>=0.25",
]
dev = ["pytest", "ruff"]

[project.urls]
Homepage = "https://www.openavmkit.com/"
Source = "https://github.com/larsiusprime/openavmkit"
Issues = "https://github.com/larsiusprime/openavmkit/issues"
Changelog = "https://github.com/larsiusprime/openavmkit/blob/master/CHANGELOG.md"

# NOTE: remove the version-from-attr; setuptools-scm supplies the version
[tool.setuptools.dynamic]
dependencies = { file = ["requirements.txt"] }

[tool.setuptools.packages.find]
where = ["."]
include = ["openavmkit*"]

[tool.setuptools.package-data]
openavmkit = [
  "resources/**/*.json",
  "resources/**/*.yaml",
  "resources/**/*.yml",
  "resources/**/*.txt",
]

# Ensure both license files land in sdists
[tool.setuptools]
license-files = ["LICENSE-AGPLv3", "LICENSE-COMMERCIAL"]
include-package-data = true

[tool.setuptools_scm]
# Derive version from your git tags, e.g. v0.3.0rc2 -> 0.3.0rc2
version_scheme = "no-guess-dev"
local_scheme = "node-and-date"
# (Optional) If you want a vendored version file for src checkouts, uncomment:
# write_to = "openavmkit/_version.py"
