-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
82 lines (71 loc) · 3.04 KB
/
Copy pathpyproject.toml
File metadata and controls
82 lines (71 loc) · 3.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "docproof"
# DYNAMIC, and that is the fix rather than a preference. This read `version = "0.1.2"`
# while `src/docproof/__init__.py` said "0.1.0", so `docproof --version` and every
# report header printed 0.1.0 on an install pinned to v0.1.2. Two sources of truth for
# one number, disagreeing - which is the exact defect this tool exists to find, in this
# tool. Hatchling reads the package attribute now, so there is one literal and the
# build follows it. Correcting the number would have left the second copy in place.
dynamic = ["version"]
description = "Prove your documentation against your code. Deterministically, with receipts."
readme = "README.md"
requires-python = ">=3.10"
license = { file = "LICENSE" }
keywords = ["documentation", "linter", "ci", "readme", "drift", "testing"]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Documentation",
"Topic :: Software Development :: Quality Assurance",
]
# tomllib landed in 3.11. This is the only dependency and it disappears on any Python
# that does not need it, so a modern install pulls in nothing at all.
dependencies = ["tomli>=1.1.0; python_version < '3.11'"]
[project.optional-dependencies]
dev = [
"pytest>=8.0",
"ruff>=0.6",
"mypy>=1.10",
]
[project.scripts]
docproof = "docproof.cli:main"
[tool.hatch.version]
path = "src/docproof/__init__.py"
[tool.hatch.build.targets.wheel]
packages = ["src/docproof"]
# **Say what goes in the sdist rather than letting the working directory decide.**
# Hatchling's default is "everything git does not ignore", and `.gitignore` listed `.venv/`
# while the build ran in `.venv-build/`. The first sdist built here was 2.2 MB and 549
# files, of which 525 were pip, hatchling and colorama out of that virtualenv. Nothing
# was wrong with the code; the artifact was a photograph of my machine. An explicit list
# is the same on any machine, and cannot pick up a stray file that happens to be untracked.
[tool.hatch.build.targets.sdist]
include = ["src/", "tests/", "README.md", "LICENSE", "pyproject.toml"]
[tool.ruff]
line-length = 110
target-version = "py310"
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM"]
[tool.mypy]
python_version = "3.10"
files = ["src"]
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
# Only imported on 3.10, where it is a real dependency; on newer Pythons the guarded
# branch is never taken and the package is legitimately absent.
[[tool.mypy.overrides]]
module = ["tomli"]
ignore_missing_imports = true
[tool.pytest.ini_options]
# Fixtures build throwaway git repositories. Keeping the base temp directory inside the
# project means a test run never writes outside the tree it belongs to.
addopts = "--basetemp=.pytest-tmp -q"
testpaths = ["tests"]