-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
99 lines (78 loc) · 2.5 KB
/
pyproject.toml
File metadata and controls
99 lines (78 loc) · 2.5 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
# pyproject.toml
# ====================================================================================
# Build System Configuration
# ====================================================================================
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
# ====================================================================================
# Project Metadata (PEP 621)
# ====================================================================================
[project]
name = "module_name"
version = "0.0.0"
authors = [
{ name="Your Name", email="your_email@example.com" },
]
description = "A modern Python module template."
readme = "README.md"
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: The Unlicense (Unlicense)",
"Operating System :: OS Independent",
]
# Project dependencies go here.
# Example: dependencies = ["requests", "numpy"]
dependencies = []
[project.optional-dependencies]
# Development dependencies: testing, linting, building, etc.
dev = [
"pip",
"bump-my-version", # The modern successor to bumpversion
"ruff",
"black",
"build",
"twine",
"pytest",
"pre-commit", # For pre-commit hooks
]
[project.urls]
"Homepage" = "https://github.com/your_username/your_project_name"
"Bug Tracker" = "https://github.com/your_username/your_project_name/issues"
# ====================================================================================
# Tool Configurations
# ====================================================================================
# --- Setuptools Configuration ---
[tool.setuptools.packages.find]
where = ["src"] # Find packages in the src directory
# --- Bump-my-version Configuration ---
[tool.bump-my-version]
commit = true
tag = true
# The version in [project] is updated automatically.
# Only other files to be updated are listed here.
[[tool.bump-my-version.files]]
filename = "VERSION.txt"
# --- Black Configuration ---
[tool.black]
line-length = 88
target-version = ['py38']
# --- Ruff Configuration ---
[tool.ruff]
line-length = 88
# Rules: Pyflakes (F), pycodestyle (E, W), isort (I)
select = ["E", "F", "W", "I"]
ignore = []
# Allow unused variables in __init__.py if necessary
[tool.ruff.per-file-ignores]
"src/module_name/__init__.py" = ["F401"] # Updated to the new path
[tool.ruff.format]
quote-style = "double"
# --- Pytest Configuration ---
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "-ra -q"
testpaths = [
"tests",
]