forked from Wangmerlyn/KeepGPU
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
137 lines (113 loc) · 3.42 KB
/
pyproject.toml
File metadata and controls
137 lines (113 loc) · 3.42 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
129
130
131
132
133
134
135
136
137
[build-system]
requires = [
"setuptools>=61.0",
"argparse",
]
build-backend = "setuptools.build_meta"
[project]
name = "keep_gpu"
dynamic = ["version"] # Let setuptools read the version dynamically
description = "Keep GPU is a simple CLI app that keeps your GPUs running"
readme = {file = "README.md", content-type = "text/markdown"}
authors = [
{name = "Siyuan Wang", email = "sywang0227@gmail.com"},
{name = "Yaorui Shi", email = "yaoruishi@gmail.com"},
{name= "Yiduck Liu", email = "geodesicseiran@gmail.com"}
]
maintainers = [
{name = "Siyuan Wang", email = "sywang0227@gmail.com"},
{name = "Yaorui Shi", email = "yaoruishi@gmail.com"},
{name= "Yiduck Liu", email = "geodesicseiran@gmail.com"}
]
classifiers = [
]
license = {text = "MIT license"}
dependencies = [
"typer",
"torch",
"colorlog",
]
[project.scripts]
keep-gpu = "keep_gpu.cli:main"
[project.optional-dependencies]
dev = [
"coverage", # Testing
"mypy", # Type checking
"pytest", # Testing
"ruff", # Linting
"black", # Formatting
"pre-commit", # Git hooks
"bump-my-version", # Version management
]
[project.urls]
bugs = "https://github.com/Wangmerlyn/KeepGPU/issues"
changelog = "https://github.com/Wangmerlyn/KeepGPU/blob/master/changelog.md"
homepage = "https://github.com/Wangmerlyn/KeepGPU"
[tool.setuptools]
package-dir = {"" = "src"}
[tool.setuptools.package-data]
"*" = ["*.*"]
# Dynamic version source: reads __version__ from keep_gpu package
[tool.setuptools.dynamic]
version = {attr = "keep_gpu.__version__"}
# -----------------------------
# bump-my-version configuration
[tool.bumpversion]
current_version = "0.2.0"
commit = true
tag = true
tag_name = "v{new_version}"
allow_dirty = true
# Either 0.1.0 or 0.1.0.post3
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)(?:\\.post(?P<post>\\d+))?"
# 1) default – no suffix 2) when bumping `post`
serialize = [
"{major}.{minor}.{patch}",
"{major}.{minor}.{patch}.post{post}"
]
# Tell bump-my-version what to change
search = "{current_version}"
replace = "{new_version}"
ignore_missing_version = false
regex = false # use literal search unless you need RegEx
# --- files that hold the version ---------------------------------
[[tool.bumpversion.files]]
filename = "src/keep_gpu/__init__.py"
[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = 'current_version = "{current_version}"'
replace = 'current_version = "{new_version}"'
# --- version-part specific behaviour -----------------------------
# numeric by default for major/minor/patch – nothing to override
[tool.bumpversion.parts.post]
first_value = "0" # when the suffix first appears
optional_value = "" # omit `.postN` unless we’re bumping `post`
# -----------------------------
# Mypy type checking
[tool.mypy]
files = "."
# Use strict defaults
strict = true
warn_unreachable = true
warn_no_return = true
[[tool.mypy.overrides]]
module = "tests.*"
allow_untyped_defs = true
disable_error_code = "attr-defined"
# Black formatter
[tool.black]
line-length = 88
target-version = ['py38']
skip-string-normalization = false
# Ruff linter
[tool.ruff]
line-length = 88
target-version = "py38"
[tool.ruff.lint]
select = ["E", "F", "I", "W"]
ignore = ["E501"]
exclude = ["build", "dist", ".venv"]
[tool.ruff.lint.isort]
known-first-party = ["keep_gpu"]
combine-as-imports = true
force-single-line = false