-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
513 lines (410 loc) · 12.3 KB
/
Copy pathpyproject.toml
File metadata and controls
513 lines (410 loc) · 12.3 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
[project]
name = "custy"
dynamic = ["version"]
# version = "2.1.2"
# With this the version will be auto-generated from git tags using setuptools_scm
# When run
# pip install
# or
# python -m build
# it will extract the version from Git tag and use it automatically.
#
# To use the auto version inside code:
# ```python
# from importlib.metadata import version
# __version__ = version("currency-conversion-api")
# ✅ This will always return the version from Git tag if setuptools_scm is used properly.
description = "Configuration-driven developer CLI for project initialization, validation, versioning, changelog generation, Git release automation, reusable pipelines, backups, cleanup, and multi-remote synchronization."
readme = "README.md"
requires-python = ">=3.14"
license = { text = "MIT" }
authors = [
{ name = "Rizky Fernandes (devalltect00)", email = "devalltect00@gmail.com"},
]
maintainers = [
{ name = "Rizky Fernandes (devalltect00)", email = "devalltect00@gmail.com"},
]
keywords = [
"git",
"git-workflow",
"git-automation",
"git-tagging",
"release-automation",
"release-management",
"versioning",
"version-bump",
"conventional-commits",
"semantic-versioning",
"pep440",
"semver",
"commitizen",
"changelog",
"changelog-generator",
"project-initialization",
"project-validation",
"automation",
"developer-tools",
"devops",
"cli",
"cli-tool",
"typer",
"rich",
"release-pipeline",
"dry-run",
"github",
"gitlab",
"docker",
"multi-remote",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Environment :: Console",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.14",
"Topic :: Software Development",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Version Control",
"Topic :: System :: Software Distribution",
"Topic :: Utilities",
]
dependencies = [
# CLI Framework
"typer>=0.16.0",
# Terminal UI
"rich>=14.1.0",
"pyfiglet>=1.0.4",
"termcolor>=3.1.0",
"colorama>=0.4.6",
# Templates
"jinja2>=3.1.6",
# Configuration
"toml>=0.10.2",
"tomlkit>=0.15.0",
# Data Validation
"pydantic>=2.11.7",
# Version Parsing / PEP 440
"packaging>=25.0",
]
[project.optional-dependencies]
commitizen = [
# Optional commit-message validation and version strategy integration
"commitizen>=4.0.0",
]
hooks = [
# Optional direct execution for cross-platform pre-commit wrappers
"pre-commit>=3.7.0",
]
dev = [
# Test
"pytest>=8.0.0",
"pytest-cov>=5.0.0",
# Formatting
"black==26.5.1",
# Linting
"ruff==0.16.5",
# Packaging
"build>=1.2.0",
"packaging>=24.0",
"twine>=5.0.0",
# Git hooks
"pre-commit>=3.7.0",
# related to `AREPL for python` vscode extensions
"ipykernel",
# Commitizen
"commitizen>=4.0.0",
]
docs = [
"mkdocs>=1.6.0",
"mkdocs-material>=9.5.0",
]
[project.urls]
Homepage = "https://github.com/devalltect00/Custy"
Repository = "https://github.com/devalltect00/Custy"
Issues = "https://github.com/devalltect00/Custy/issues"
Documentation = "https://devalltect00.github.io/devalltect-docs/docs/custy"
Changelog = "https://github.com/devalltect00/Custy/blob/main/CHANGELOG.md"
Discussions = "https://github.com/devalltect00/Custy/discussions"
Releases = "https://github.com/devalltect00/Custy/releases"
"GitHub Actions" = "https://github.com/devalltect00/Custy/actions"
"GitLab CI" = "https://gitlab.com/devalltects-group/Custy/-/pipelines"
"Container Images" = "https://github.com/devalltect00/Custy/pkgs/container/custy"
[tool.devalltect.github]
# Curated GitHub repository topics are maintained separately from the broader
# Python package-discovery keywords under [project]. This table stores desired
# metadata only; applying it to GitHub requires an explicit synchronization.
topics = [
"custy",
"git",
"git-automation",
"release-automation",
"release-management",
"versioning",
"semantic-versioning",
"pep440",
"changelog",
"changelog-generator",
"conventional-commits",
"project-initialization",
"project-validation",
"release-pipeline",
"multi-remote",
"dry-run",
"developer-tools",
"cli",
"python",
"devops",
]
[tool.devalltect.gitlab]
# Curated GitLab project topics are maintained separately from GitHub topics
# and the broader Python package-discovery keywords under [project]. This table
# stores desired metadata only; applying it to GitLab requires explicit
# synchronization. Do not include credentials or other sensitive information.
topics = [
"custy",
"git",
"git-automation",
"release-automation",
"release-management",
"versioning",
"semantic-versioning",
"pep440",
"changelog",
"changelog-generator",
"conventional-commits",
"project-initialization",
"project-validation",
"release-pipeline",
"multi-remote",
"dry-run",
"developer-tools",
"cli",
"python",
"devops",
]
[project.scripts]
custy = "app.__main__:main"
git-credential-custy = "app.core.git_ops.credentials.helper:main"
# =========================================================
# TYPER
# =========================================================
[tool.typer]
pretty_exceptions_enable = true
# =========================================================
# SETUPTOOLS
# =========================================================
[tool.setuptools.packages.find]
include = [
"app*",
]
exclude = ["venv*"]
#####
# NOTE:
# Need this.
#
# Without it:
# - importlib.resources will FAIL ❌
# - your templates won’t exist after pip install ❌
# - your tool breaks outside dev ❌
#####
# It tells Python’s build system:
#
# “When someone installs my package, also include these non-Python files (templates).”
#####
[tool.setuptools.package-data]
app = [
"templates/**/*",
"templates/*.toml",
"templates/**/*.toml",
"templates/*.py",
"templates/**/*.py",
"templates/*.txt",
"templates/**/*.txt",
"templates/*.md",
"templates/**/*.md",
"templates/changelog/*.j2",
"templates/changelog/**/*.j2",
"templates/examples/*.md",
"templates/examples/**/*.md",
# "**/*",
]
# =========================================================
# SETUPTOOLS_SCM
# =========================================================
[tool.setuptools_scm]
version_scheme = "guess-next-dev"
local_scheme = "no-local-version"
fallback_version = "2.1.2"
# =========================================================
# PYTEST
# =========================================================
[tool.pytest.ini_options]
testpaths = [
"tests",
]
python_files = [
"test_*.py",
]
python_classes = [
"Test*",
]
python_functions = [
"test_*",
]
addopts = [
# -----------------------------------------------------
# Summary
# -----------------------------------------------------
"-ra", # Show extra test summary info for skipped, failed, xfailed, etc.
# -----------------------------------------------------
# Validation
# -----------------------------------------------------
"--strict-markers", # Fail on unknown pytest markers.
"--strict-config", # Fail on invalid or unknown pytest configuration.
# -----------------------------------------------------
# Output
# -----------------------------------------------------
"--tb=short", # Use shorter traceback output.
# -----------------------------------------------------
# COVERAGE
# -----------------------------------------------------
"--cov=app", # Enable coverage. Measure test coverage for the app package.
"--cov-report=term-missing", # Shows missing lines directly in terminal output.
# -----------------------------------------------------
# IMPORTS
# -----------------------------------------------------
"--import-mode=importlib", # Fixes import conflicts with same-named test files
]
filterwarnings = [
"ignore::DeprecationWarning",
]
# =========================================================
# BLACK
# =========================================================
[tool.black]
line-length = 88
target-version = ["py314"]
# Preserve inactive migration/reference files even when paths are supplied
# explicitly by pre-commit, an editor, or a developer command.
force-exclude = '''
(
/dev_venv/
| /prod_venv/
| /venv_dev/
| /venv_prod/
| /publish_venv/
| /venv_publish/
| /other_venv/
| /venv_other/
| /old/
| /example_before/
| \.deprecated\.py$
| \.old[^/]*\.py$
| \.dev\.py$
| [ _]copy\.py$
| _temp\.py$
| _temp_before\.py$
)
'''
# =========================================================
# RUFF
# =========================================================
[tool.ruff]
line-length = 88
target-version = "py314"
# Respect `exclude` even when pre-commit or another caller supplies file paths
# explicitly instead of relying on Ruff's recursive file discovery.
force-exclude = true
exclude = [
".git",
".venv",
"venv",
"dev_venv",
"prod_venv",
"venv_dev",
"venv_prod",
"publish_venv",
"venv_publish",
"other_venv",
"venv_other",
"__pycache__",
"build",
"dist",
"**/old/**",
"**/example_before/**",
"**/*.deprecated.py",
"**/*.old*.py",
"**/*.dev.py",
"**/* copy.py",
"**/*_copy.py",
"**/*_temp.py",
"**/*_temp_before.py",
]
# =========================================================
# RUFF LINT
# =========================================================
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle Warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
]
ignore = [
"E501", # Line too long
"INP001", # Implicit namespace package
"T201", # print() found
"UP045", # pyupgrade. Ignore checking for example: 'Optional[str]' -> 'str | None'
"UP042", # pyupgrade StrEnum suggestion
]
[tool.ruff.lint.isort]
# Custy is imported as the top-level ``app`` package. Declaring it explicitly
# keeps local, pre-commit, and hosted CI import grouping deterministic.
known-first-party = ["app"]
[tool.ruff.lint.per-file-ignores]
"app/cli/commands/**/*.py" = ["F403", "F405"]
# =========================================================
# RUFF FORMAT
# =========================================================
#
# Ruff formatter configuration.
#
# Ruff provides linting and optional formatting. Black remains supported,
# and both formatters share the same line-length and target-version policy.
#
# =========================================================
[tool.ruff.format]
# Normalize all strings to double quotes
quote-style = "double"
# Use spaces for indentation
indent-style = "space"
# Automatically detect line endings
# (LF on Linux/macOS, CRLF on Windows)
line-ending = "auto"
# Format Python examples embedded inside docstrings
docstring-code-format = true
# =========================================================
# BUILD SYSTEM
# =========================================================
[build-system]
requires = [
"setuptools>=80",
# "setuptools_scm[toml]>=8",
"setuptools-scm>=8",
"wheel",
]
build-backend = "setuptools.build_meta"
# =========================================================
# COVERAGE
# =========================================================
[tool.coverage.run]
source = ["app"]
[tool.coverage.report]
show_missing = true
skip_covered = false