-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
128 lines (114 loc) · 3.95 KB
/
Copy pathpyproject.toml
File metadata and controls
128 lines (114 loc) · 3.95 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
[build-system]
requires = ["setuptools>=68.0", "setuptools-scm>=8.0"]
build-backend = "setuptools.build_meta"
[project]
name = "minidb"
version = "1.0.0"
description = "A miniature in-memory database with SQL-like query support"
readme = "README.md"
license = "MIT"
requires-python = ">=3.11"
authors = [
{ name = "MiniDB Contributors" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Database",
"Typing :: Typed",
]
[project.urls]
Homepage = "https://github.com/sebtardif/MiniDB"
Repository = "https://github.com/sebtardif/MiniDB"
Issues = "https://github.com/sebtardif/MiniDB/issues"
Changelog = "https://github.com/sebtardif/MiniDB/blob/main/CHANGELOG.md"
# ---------------------------------------------------------------------------
# Setuptools
# ---------------------------------------------------------------------------
[tool.setuptools.packages.find]
include = ["minidb*"]
# ---------------------------------------------------------------------------
# Ruff – linting & formatting (replaces flake8 + black + isort)
# ---------------------------------------------------------------------------
[tool.ruff]
target-version = "py311"
line-length = 120
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"RUF", # ruff-specific rules
]
ignore = [
"E501", # line too long (handled by formatter)
"SIM108", # use ternary operator (can hurt readability)
"N801", # class name convention (TypeError_, SyntaxError_ avoid shadowing builtins)
"N818", # exception naming (same reason as N801)
"N999", # invalid module name
"UP031", # use f-string (allow % formatting in existing code)
"RUF012", # mutable class attribute (KEYWORDS dict is intentionally a class constant)
]
[tool.ruff.lint.isort]
known-first-party = ["minidb"]
[tool.ruff.format]
quote-style = "single"
indent-style = "space"
# ---------------------------------------------------------------------------
# Mypy – static type checking
# ---------------------------------------------------------------------------
[tool.mypy]
python_version = "3.11"
warn_return_any = false
warn_unused_configs = true
disallow_untyped_defs = false
check_untyped_defs = false
# ---------------------------------------------------------------------------
# Pytest
# ---------------------------------------------------------------------------
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "-v --tb=short"
# ---------------------------------------------------------------------------
# Coverage
# ---------------------------------------------------------------------------
[tool.coverage.run]
source = ["minidb"]
branch = true
[tool.coverage.report]
show_missing = true
fail_under = 70
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"if __name__ ==",
]
# ---------------------------------------------------------------------------
# Semantic Release – auto versioning from conventional commits
# ---------------------------------------------------------------------------
[tool.semantic_release]
version_toml = ["pyproject.toml:project.version"]
version_variables = ["minidb/__init__.py:__version__"]
branch = "main"
commit_message = "chore(release): v{version}"
build_command = "python -m build"
[tool.semantic_release.changelog]
changelog_file = "CHANGELOG.md"
[tool.semantic_release.commit_parser_options]
allowed_tags = [
"build", "chore", "ci", "docs", "feat", "fix",
"perf", "refactor", "style", "test",
]
minor_tags = ["feat"]
patch_tags = ["fix", "perf"]