Major overhaul:
- transition to `pyproject.toml` config - include license (Apache-2.0) - add dev tools - add documentation config (`mkdocs` based) - turn `README.md` into a symlink to docs `index.md` - add convenience scripts for testing and linting
This commit is contained in:
101
pyproject.toml
101
pyproject.toml
@ -1,6 +1,99 @@
|
||||
#####################
|
||||
# Python packaging: #
|
||||
|
||||
[build-system]
|
||||
requires = [
|
||||
"setuptools>=42",
|
||||
"wheel"
|
||||
requires = ["setuptools", "setuptools-scm"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "${REPO_NAME}"
|
||||
description = "${REPO_DESCRIPTION}"
|
||||
authors = [
|
||||
{ name = "${REPO_OWNER_TITLE}", email = "mail@PLACEHOLDER.to" },
|
||||
]
|
||||
maintainers = [
|
||||
{ name = "${REPO_OWNER_TITLE}", email = "mail@PLACEHOLDER.to" },
|
||||
]
|
||||
requires-python = ">=3.9, <4.0"
|
||||
keywords = [
|
||||
|
||||
]
|
||||
license = { text = "Apache Software License Version 2.0" }
|
||||
classifiers = [
|
||||
"Development Status :: 4 - Beta",
|
||||
"Programming Language :: Python :: 3 :: Only",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
"Operating System :: OS Independent",
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
# "Intended Audience :: Developers",
|
||||
# "Framework :: AsyncIO",
|
||||
# "Topic :: Internet",
|
||||
]
|
||||
dynamic = [
|
||||
"dependencies",
|
||||
"readme",
|
||||
"version",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
full = [
|
||||
|
||||
]
|
||||
dev = [
|
||||
"black",
|
||||
"build",
|
||||
"coverage",
|
||||
"flake8",
|
||||
"mkdocs-material",
|
||||
"mkdocstrings[python]",
|
||||
"mypy",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
repository = "https://github.com/${REPO_OWNER_LOWER}/${REPO_NAME_LOWER}"
|
||||
bug_tracker = "https://github.com/${REPO_OWNER_LOWER}/${REPO_NAME_LOWER}/issues"
|
||||
documentation = "http://${REPO_OWNER_LOWER}.github.io/${REPO_NAME_LOWER}"
|
||||
|
||||
[tool.setuptools.dynamic]
|
||||
dependencies = { file = "requirements/common.txt" }
|
||||
readme = { file = ["README.md"] }
|
||||
version = {attr = "PACKAGE_NAME_PLACEHOLDER.__version__"}
|
||||
|
||||
#########
|
||||
# Mypy: #
|
||||
|
||||
[tool.mypy]
|
||||
files = "src/"
|
||||
warn_unused_configs = true
|
||||
strict = true
|
||||
show_error_codes = true
|
||||
plugins = [
|
||||
|
||||
]
|
||||
|
||||
#############
|
||||
# Coverage: #
|
||||
|
||||
[tool.coverage.run]
|
||||
source = [
|
||||
"src/",
|
||||
]
|
||||
branch = true
|
||||
command_line = "-m tests"
|
||||
omit = [
|
||||
".venv*/*",
|
||||
]
|
||||
|
||||
[tool.coverage.report]
|
||||
show_missing = true
|
||||
skip_covered = false
|
||||
exclude_lines = [
|
||||
"if TYPE_CHECKING:",
|
||||
'''if __name__ == ['"]__main__['"]:''',
|
||||
"@overload",
|
||||
]
|
||||
omit = [
|
||||
"tests/*",
|
||||
]
|
||||
build-backend = "setuptools.build_meta"
|
Reference in New Issue
Block a user