forked from alvarobartt/python-package-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
119 lines (104 loc) · 2.35 KB
/
Copy pathpyproject.toml
File metadata and controls
119 lines (104 loc) · 2.35 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
[build-system]
build-backend = "hatchling.build"
requires = ["hatchling", "hatch-vcs"]
[project]
authors = [{name = "REPLACE_NAME REPLACE_SURNAME"}]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]
dependencies = []
description = "REPLACE_PACKAGE_DESCRIPTION"
dynamic = ["version"]
keywords = []
license = "MIT"
name = "REPLACE_PACKAGE_NAME"
readme = "README.md"
requires-python = ">=3.10"
[project.urls]
Documentation = "https://REPLACE_GITHUB_USERNAME.github.io/REPLACE_PACKAGE_NAME"
Issues = "https://github.com/REPLACE_GITHUB_USERNAME/REPLACE_PACKAGE_NAME/issues"
Source = "https://github.com/REPLACE_GITHUB_USERNAME/REPLACE_PACKAGE_NAME"
[tool.hatch.version]
source = "vcs"
[project.optional-dependencies]
docs = [
"mkdocs~=1.4.0",
"mkdocs-material~=8.5.4",
"mkdocs-git-revision-date-localized-plugin~=1.1.0",
"mkdocstrings[python]~=0.19.0",
]
quality = [
"black~=22.10.0",
"ruff",
"pre-commit~=2.20.0",
]
tests = [
"pytest~=7.1.2",
]
[tool.hatch.envs.quality]
features = [
"quality",
]
[tool.hatch.envs.quality.scripts]
check = [
"ruff src tests",
"black --check --diff --preview src tests",
]
format = [
"ruff --fix src tests",
"black --preview src tests",
"check",
]
[tool.ruff]
ignore = [
"E501", # line too long, handled by black
"B008", # do not perform function calls in argument defaults
"C901", # too complex
]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
]
[tool.ruff.isort]
known-first-party = ["REPLACE_PACKAGE_NAME"]
[tool.hatch.envs.test]
features = [
"tests",
]
[tool.hatch.envs.test.scripts]
run = "pytest tests/ --durations 0 -s"
[[tool.hatch.envs.test.matrix]]
python = ["310", "311"]
[tool.hatch.envs.docs]
features = [
"docs",
]
[tool.hatch.envs.docs.scripts]
build = [
"mkdocs build",
]
serve = [
"mkdocs serve",
]
[tool.hatch.build.targets.sdist]
exclude = [
"/.github",
"/.vscode",
"/docs",
"/.devcontainer",
"/.pre-commit-config.yaml",
"/.gitignore",
"/tests",
"/Dockerfile",
"/.dockerignore",
]
[tool.hatch.build.hooks.vcs]
version-file = "src/REPLACE_PACKAGE_NAME/_version.py"