-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpyproject.toml
104 lines (96 loc) · 2.77 KB
/
pyproject.toml
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[project]
dynamic = ["version"] # determined from source control, see tool.pdm.version below
name = "confidence"
description = "Simple module to load and use configuration in a clean, 'pythonic' way."
keywords = ["configuration"]
readme = "README.md"
authors = [
{name = "Netherlands Forensic Institute", email = "[email protected]"},
]
dependencies = [
"pyyaml",
]
requires-python = ">=3.8"
license = {text = "Apache Software License 2.0"}
classifiers = [
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.8",
"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 :: Utilities",
]
[project.urls]
homepage = "https://github.com/NetherlandsForensicInstitute/confidence/"
[tool.pdm]
version = {source = "scm"}
[tool.pdm.dev-dependencies]
check = [
"bandit",
"darglint",
"flake8",
"flake8-annotations-complexity",
"flake8-bugbear",
"flake8-broken-line",
"flake8-commas",
"flake8-comprehensions",
"flake8-expression-complexity",
"flake8-import-order",
"flake8-pyproject",
"flake8-quotes",
"flake8-rst-docstrings",
"flake8-simplify",
"mypy",
"pep8-naming",
# dependency-specific typing information
"types-pyyaml",
]
test = [
"coverage",
"pytest",
]
[tool.pdm.scripts]
# pre_build hook: create README.md from README.md (omitting the badges) and CHANGES.md
pre_build = {shell ="""
mv README.md README.md.orig &&
tail --lines=+3 README.md.orig > README.md &&
cat CHANGES.md >> README.md
"""}
# post_build hook: reinstate original README.md
post_build = {shell = """
mv README.md.orig README.md
"""}
# development scripts
sec-check = {cmd = ["bandit", "--recursive", "confidence/"]}
lint = {cmd = ["flake8", "confidence/"]}
type-check = {cmd = ["mypy", "confidence/"]}
check = {composite = ["sec-check", "lint", "type-check"]}
test = {cmd = [
"coverage", "run",
"--branch",
"--source", "confidence",
"--module", "pytest",
"--strict-markers",
"tests/",
]}
all = {composite = ["check", "test"]}
[tool.flake8]
max-line-length = 120
import-order-style = "google"
application-import-names = "confidence"
docstring-style = "sphinx"
[tool.mypy]
# allow redefinition of inferred / assigned types
allow_redefinition = true
# require all defined functions to be fully typed
allow_incomplete_defs = false
allow_untyped_defs = false
# be strict about optional types
strict_optional = true
# warn about lines in this file that make no sense to mypy
warn_unused_configs = true