crackerjack 0.28.0__py3-none-any.whl → 0.30.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of crackerjack might be problematic. Click here for more details.
- crackerjack/__main__.py +56 -2
- crackerjack/code_cleaner.py +980 -0
- crackerjack/crackerjack.py +1552 -1288
- crackerjack/dynamic_config.py +586 -0
- crackerjack/interactive.py +7 -16
- crackerjack/pyproject.toml +4 -1
- {crackerjack-0.28.0.dist-info → crackerjack-0.30.3.dist-info}/METADATA +637 -52
- crackerjack-0.30.3.dist-info/RECORD +16 -0
- crackerjack/.pre-commit-config-ai.yaml +0 -149
- crackerjack/.pre-commit-config-fast.yaml +0 -69
- crackerjack/.pre-commit-config.yaml +0 -114
- crackerjack-0.28.0.dist-info/RECORD +0 -17
- {crackerjack-0.28.0.dist-info → crackerjack-0.30.3.dist-info}/WHEEL +0 -0
- {crackerjack-0.28.0.dist-info → crackerjack-0.30.3.dist-info}/licenses/LICENSE +0 -0
crackerjack/__main__.py
CHANGED
|
@@ -17,6 +17,7 @@ class BumpOption(str, Enum):
|
|
|
17
17
|
patch = "patch"
|
|
18
18
|
minor = "minor"
|
|
19
19
|
major = "major"
|
|
20
|
+
interactive = "interactive"
|
|
20
21
|
|
|
21
22
|
def __str__(self) -> str:
|
|
22
23
|
return self.value
|
|
@@ -32,6 +33,7 @@ class Options(BaseModel):
|
|
|
32
33
|
update_precommit: bool = False
|
|
33
34
|
update_docs: bool = False
|
|
34
35
|
force_update_docs: bool = False
|
|
36
|
+
compress_docs: bool = False
|
|
35
37
|
clean: bool = False
|
|
36
38
|
test: bool = False
|
|
37
39
|
benchmark: bool = False
|
|
@@ -48,12 +50,19 @@ class Options(BaseModel):
|
|
|
48
50
|
track_progress: bool = False
|
|
49
51
|
resume_from: str | None = None
|
|
50
52
|
progress_file: str | None = None
|
|
53
|
+
experimental_hooks: bool = False
|
|
54
|
+
enable_pyrefly: bool = False
|
|
55
|
+
enable_ty: bool = False
|
|
56
|
+
no_git_tags: bool = False
|
|
57
|
+
skip_version_check: bool = False
|
|
51
58
|
|
|
52
59
|
@classmethod
|
|
53
60
|
@field_validator("publish", "bump", mode="before")
|
|
54
61
|
def validate_bump_options(cls, value: str | None) -> BumpOption | None:
|
|
55
62
|
if value is None:
|
|
56
63
|
return None
|
|
64
|
+
if value == "":
|
|
65
|
+
return BumpOption.interactive
|
|
57
66
|
try:
|
|
58
67
|
return BumpOption(value.lower())
|
|
59
68
|
except ValueError:
|
|
@@ -75,7 +84,10 @@ cli_options = {
|
|
|
75
84
|
False, "-n", "--no-config-updates", help="Do not update configuration files."
|
|
76
85
|
),
|
|
77
86
|
"update_precommit": typer.Option(
|
|
78
|
-
False,
|
|
87
|
+
False,
|
|
88
|
+
"-u",
|
|
89
|
+
"--update-precommit",
|
|
90
|
+
help="[DEPRECATED] Pre-commit hooks are now updated automatically weekly.",
|
|
79
91
|
),
|
|
80
92
|
"update_docs": typer.Option(
|
|
81
93
|
False,
|
|
@@ -87,12 +99,17 @@ cli_options = {
|
|
|
87
99
|
"--force-update-docs",
|
|
88
100
|
help="Force update CLAUDE.md and RULES.md even if they exist.",
|
|
89
101
|
),
|
|
102
|
+
"compress_docs": typer.Option(
|
|
103
|
+
False,
|
|
104
|
+
"--compress-docs",
|
|
105
|
+
help="Automatically compress CLAUDE.md to optimize for Claude Code (enabled by default for other projects).",
|
|
106
|
+
),
|
|
90
107
|
"verbose": typer.Option(False, "-v", "--verbose", help="Enable verbose output."),
|
|
91
108
|
"publish": typer.Option(
|
|
92
109
|
None,
|
|
93
110
|
"-p",
|
|
94
111
|
"--publish",
|
|
95
|
-
help="Bump version and publish to PyPI (patch, minor, major).",
|
|
112
|
+
help="Bump version and publish to PyPI (patch, minor, major). Use 'interactive' to be prompted for version selection.",
|
|
96
113
|
case_sensitive=False,
|
|
97
114
|
),
|
|
98
115
|
"bump": typer.Option(
|
|
@@ -182,6 +199,31 @@ cli_options = {
|
|
|
182
199
|
"--progress-file",
|
|
183
200
|
help="Custom path for progress file (default: SESSION-PROGRESS-{timestamp}.md).",
|
|
184
201
|
),
|
|
202
|
+
"experimental_hooks": typer.Option(
|
|
203
|
+
False,
|
|
204
|
+
"--experimental-hooks",
|
|
205
|
+
help="Enable experimental pre-commit hooks (includes pyrefly and ty).",
|
|
206
|
+
),
|
|
207
|
+
"enable_pyrefly": typer.Option(
|
|
208
|
+
False,
|
|
209
|
+
"--enable-pyrefly",
|
|
210
|
+
help="Enable pyrefly experimental type checking (requires experimental hooks mode).",
|
|
211
|
+
),
|
|
212
|
+
"enable_ty": typer.Option(
|
|
213
|
+
False,
|
|
214
|
+
"--enable-ty",
|
|
215
|
+
help="Enable ty experimental type verification (requires experimental hooks mode).",
|
|
216
|
+
),
|
|
217
|
+
"no_git_tags": typer.Option(
|
|
218
|
+
False,
|
|
219
|
+
"--no-git-tags",
|
|
220
|
+
help="Skip creating git tags during version bumping (tags are created by default).",
|
|
221
|
+
),
|
|
222
|
+
"skip_version_check": typer.Option(
|
|
223
|
+
False,
|
|
224
|
+
"--skip-version-check",
|
|
225
|
+
help="Skip version consistency verification between pyproject.toml and git tags.",
|
|
226
|
+
),
|
|
185
227
|
}
|
|
186
228
|
|
|
187
229
|
|
|
@@ -193,6 +235,7 @@ def main(
|
|
|
193
235
|
update_precommit: bool = cli_options["update_precommit"],
|
|
194
236
|
update_docs: bool = cli_options["update_docs"],
|
|
195
237
|
force_update_docs: bool = cli_options["force_update_docs"],
|
|
238
|
+
compress_docs: bool = cli_options["compress_docs"],
|
|
196
239
|
verbose: bool = cli_options["verbose"],
|
|
197
240
|
publish: BumpOption | None = cli_options["publish"],
|
|
198
241
|
all: BumpOption | None = cli_options["all"],
|
|
@@ -214,6 +257,11 @@ def main(
|
|
|
214
257
|
track_progress: bool = cli_options["track_progress"],
|
|
215
258
|
resume_from: str | None = cli_options["resume_from"],
|
|
216
259
|
progress_file: str | None = cli_options["progress_file"],
|
|
260
|
+
experimental_hooks: bool = cli_options["experimental_hooks"],
|
|
261
|
+
enable_pyrefly: bool = cli_options["enable_pyrefly"],
|
|
262
|
+
enable_ty: bool = cli_options["enable_ty"],
|
|
263
|
+
no_git_tags: bool = cli_options["no_git_tags"],
|
|
264
|
+
skip_version_check: bool = cli_options["skip_version_check"],
|
|
217
265
|
) -> None:
|
|
218
266
|
options = Options(
|
|
219
267
|
commit=commit,
|
|
@@ -222,6 +270,7 @@ def main(
|
|
|
222
270
|
update_precommit=update_precommit,
|
|
223
271
|
update_docs=update_docs,
|
|
224
272
|
force_update_docs=force_update_docs,
|
|
273
|
+
compress_docs=compress_docs,
|
|
225
274
|
verbose=verbose,
|
|
226
275
|
publish=publish,
|
|
227
276
|
bump=bump,
|
|
@@ -241,6 +290,11 @@ def main(
|
|
|
241
290
|
track_progress=track_progress,
|
|
242
291
|
resume_from=resume_from,
|
|
243
292
|
progress_file=progress_file,
|
|
293
|
+
experimental_hooks=experimental_hooks,
|
|
294
|
+
enable_pyrefly=enable_pyrefly,
|
|
295
|
+
enable_ty=enable_ty,
|
|
296
|
+
no_git_tags=no_git_tags,
|
|
297
|
+
skip_version_check=skip_version_check,
|
|
244
298
|
)
|
|
245
299
|
if ai_agent:
|
|
246
300
|
import os
|