pyproject.toml (116 lines of code) (raw):
[build-system]
build-backend = "hatchling.build"
requires = [
"hatchling",
]
[project]
name = "basket-client"
description = "A Python client for Mozilla's basket service."
readme = "README.rst"
keywords = [
"basket",
"mozilla",
]
license = { text = "BSD-3-Clause" }
maintainers = [
{ name = "Paul McLanahan" },
{ name = "Rob Hudson" },
]
authors = [
{ name = "Michael Kelly" },
]
requires-python = ">=3.9"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Communications",
"Topic :: Software Development :: Libraries",
]
dynamic = [
"version",
]
dependencies = [
"requests<3",
]
urls.Documentation = "https://github.com/mozilla/basket-client#readme"
urls.Issues = "https://github.com/mozilla/basket-client/issues"
urls.Source = "https://github.com/mozilla/basket-client"
[tool.hatch.version]
path = "src/basket/__init__.py"
[tool.hatch.build.targets.sdist]
include = [
"docs/",
"src/",
"tests/",
"LICENSE",
"pyproject.toml",
"README.rst",
]
[tool.hatch.build.targets.wheel]
packages = [ "src/basket" ]
[tool.hatch.envs.test]
dependencies = [
"coverage[toml]>=6.5",
"pytest",
"pytest-cov",
]
[tool.hatch.envs.test.scripts]
test = "pytest {args:tests}"
cov = "pytest --cov-config=pyproject.toml --cov=src/basket/ --cov-report term-missing {args:tests}"
[[tool.hatch.envs.test.matrix]]
# Note: When changing these, also update the .github/workflows/test.yml file.
python = [ "3.9", "3.10", "3.11", "3.12", "3.13" ]
[tool.hatch.envs.lint]
detached = true
dependencies = [
"ruff",
]
[tool.hatch.envs.lint.scripts]
check = [
"ruff check {args:.}",
]
fix = [
"ruff --fix {args:.}",
"style",
]
all = [
"style",
]
[tool.ruff]
target-version = "py39"
line-length = 150 # To match black.
extend-exclude = [ "docs" ]
# See https://beta.ruff.rs/docs/rules/ for a list of rules.
lint.select = [
"A", # flake8-builtin errors.
# "B", # bugbear errors
"E", # pycodestyle errors
"F", # pyflakes errors
"I", # import sorting
"Q", # flake8-quotes errors
"W", # pycodestyle warnings
]
lint.isort.known-first-party = [ "basket" ]
[tool.coverage.run]
branch = true
parallel = true
source = [
"src/basket/",
]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]