crackerjack 0.22.4__py3-none-any.whl → 0.22.6__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/.pre-commit-config.yaml +5 -5
- crackerjack/.ruff_cache/0.12.1/5056746222905752453 +0 -0
- crackerjack/.ruff_cache/0.12.2/5056746222905752453 +0 -0
- crackerjack/crackerjack.py +18 -20
- crackerjack/errors.py +3 -3
- crackerjack/interactive.py +14 -14
- crackerjack/pyproject.toml +1 -1
- {crackerjack-0.22.4.dist-info → crackerjack-0.22.6.dist-info}/METADATA +1 -1
- {crackerjack-0.22.4.dist-info → crackerjack-0.22.6.dist-info}/RECORD +12 -11
- {crackerjack-0.22.4.dist-info → crackerjack-0.22.6.dist-info}/WHEEL +0 -0
- {crackerjack-0.22.4.dist-info → crackerjack-0.22.6.dist-info}/entry_points.txt +0 -0
- {crackerjack-0.22.4.dist-info → crackerjack-0.22.6.dist-info}/licenses/LICENSE +0 -0
|
@@ -21,7 +21,7 @@ repos:
|
|
|
21
21
|
|
|
22
22
|
# Package management - once structure is valid
|
|
23
23
|
- repo: https://github.com/pdm-project/pdm
|
|
24
|
-
rev: 2.25.
|
|
24
|
+
rev: 2.25.4
|
|
25
25
|
hooks:
|
|
26
26
|
- id: pdm-lock-check
|
|
27
27
|
- id: pdm-sync
|
|
@@ -29,7 +29,7 @@ repos:
|
|
|
29
29
|
- keyring
|
|
30
30
|
|
|
31
31
|
- repo: https://github.com/astral-sh/uv-pre-commit
|
|
32
|
-
rev: 0.7.
|
|
32
|
+
rev: 0.7.20
|
|
33
33
|
hooks:
|
|
34
34
|
- id: uv-lock
|
|
35
35
|
files: ^pyproject\.toml$
|
|
@@ -50,7 +50,7 @@ repos:
|
|
|
50
50
|
- tomli
|
|
51
51
|
|
|
52
52
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
53
|
-
rev: v0.12.
|
|
53
|
+
rev: v0.12.2
|
|
54
54
|
hooks:
|
|
55
55
|
- id: ruff-check
|
|
56
56
|
- id: ruff-format
|
|
@@ -96,12 +96,12 @@ repos:
|
|
|
96
96
|
- libcst>=1.1.0
|
|
97
97
|
|
|
98
98
|
- repo: https://github.com/PyCQA/bandit
|
|
99
|
-
rev: '1.8.
|
|
99
|
+
rev: '1.8.6'
|
|
100
100
|
hooks:
|
|
101
101
|
- id: bandit
|
|
102
102
|
args: ["-c", "pyproject.toml"]
|
|
103
103
|
|
|
104
104
|
- repo: https://github.com/RobertCraigie/pyright-python
|
|
105
|
-
rev: v1.1.
|
|
105
|
+
rev: v1.1.403
|
|
106
106
|
hooks:
|
|
107
107
|
- id: pyright
|
|
Binary file
|
|
Binary file
|
crackerjack/crackerjack.py
CHANGED
|
@@ -84,7 +84,7 @@ class CodeCleaner(BaseModel, arbitrary_types_allowed=True):
|
|
|
84
84
|
code = self.remove_line_comments(code)
|
|
85
85
|
except Exception as e:
|
|
86
86
|
self.console.print(
|
|
87
|
-
f"[
|
|
87
|
+
f"[yellow]Warning: Failed to remove line comments from {file_path}: {e}[/yellow]"
|
|
88
88
|
)
|
|
89
89
|
code = original_code
|
|
90
90
|
cleaning_failed = True
|
|
@@ -92,7 +92,7 @@ class CodeCleaner(BaseModel, arbitrary_types_allowed=True):
|
|
|
92
92
|
code = self.remove_docstrings(code)
|
|
93
93
|
except Exception as e:
|
|
94
94
|
self.console.print(
|
|
95
|
-
f"[
|
|
95
|
+
f"[yellow]Warning: Failed to remove docstrings from {file_path}: {e}[/yellow]"
|
|
96
96
|
)
|
|
97
97
|
code = original_code
|
|
98
98
|
cleaning_failed = True
|
|
@@ -822,7 +822,7 @@ class ConfigManager(BaseModel, arbitrary_types_allowed=True):
|
|
|
822
822
|
self, cmd: list[str], **kwargs: t.Any
|
|
823
823
|
) -> subprocess.CompletedProcess[str]:
|
|
824
824
|
if self.dry_run:
|
|
825
|
-
self.console.print(f"[dim
|
|
825
|
+
self.console.print(f"[dim white]→ {' '.join(cmd)}[/dim white]")
|
|
826
826
|
return CompletedProcess(cmd, 0, "", "")
|
|
827
827
|
return execute(cmd, **kwargs)
|
|
828
828
|
|
|
@@ -844,7 +844,7 @@ class ProjectManager(BaseModel, arbitrary_types_allowed=True):
|
|
|
844
844
|
["pdm", "list", "--freeze"], capture_output=True, text=True
|
|
845
845
|
).stdout.splitlines()
|
|
846
846
|
if not len([pkg for pkg in installed_pkgs if "pre-commit" in pkg]):
|
|
847
|
-
self.console.print("[
|
|
847
|
+
self.console.print("[dim cyan]Initializing project...[/dim cyan]")
|
|
848
848
|
self.execute_command(["pdm", "self", "add", "keyring"])
|
|
849
849
|
self.execute_command(["pdm", "config", "python.use_uv", "true"])
|
|
850
850
|
self.execute_command(["git", "init"])
|
|
@@ -867,10 +867,12 @@ class ProjectManager(BaseModel, arbitrary_types_allowed=True):
|
|
|
867
867
|
cmd.extend(["-c", ".pre-commit-config-ai.yaml"])
|
|
868
868
|
check_all = self.execute_command(cmd)
|
|
869
869
|
if check_all.returncode > 0:
|
|
870
|
+
self.execute_command(["pdm", "lock"])
|
|
871
|
+
self.console.print("\n[green]Lock file updated[/green]\n")
|
|
870
872
|
check_all = self.execute_command(cmd)
|
|
871
873
|
if check_all.returncode > 0:
|
|
872
874
|
self.console.print(
|
|
873
|
-
"\n\n[
|
|
875
|
+
"\n\n[red]Pre-commit failed. Please fix errors.[/red]\n"
|
|
874
876
|
)
|
|
875
877
|
raise SystemExit(1)
|
|
876
878
|
|
|
@@ -878,7 +880,7 @@ class ProjectManager(BaseModel, arbitrary_types_allowed=True):
|
|
|
878
880
|
self, cmd: list[str], **kwargs: t.Any
|
|
879
881
|
) -> subprocess.CompletedProcess[str]:
|
|
880
882
|
if self.dry_run:
|
|
881
|
-
self.console.print(f"[dim
|
|
883
|
+
self.console.print(f"[dim white]→ {' '.join(cmd)}[/dim white]")
|
|
882
884
|
return CompletedProcess(cmd, 0, "", "")
|
|
883
885
|
return execute(cmd, **kwargs)
|
|
884
886
|
|
|
@@ -921,7 +923,7 @@ class Crackerjack(BaseModel, arbitrary_types_allowed=True):
|
|
|
921
923
|
self.pkg_name = self.pkg_path.stem.lower().replace("-", "_")
|
|
922
924
|
self.pkg_dir = self.pkg_path / self.pkg_name
|
|
923
925
|
self.pkg_dir.mkdir(exist_ok=True)
|
|
924
|
-
self.console.print("\n[
|
|
926
|
+
self.console.print("\n[magenta]Crackerjacking...[/magenta]\n")
|
|
925
927
|
self.config_manager.pkg_name = self.pkg_name
|
|
926
928
|
self.project_manager.pkg_name = self.pkg_name
|
|
927
929
|
self.project_manager.pkg_dir = self.pkg_dir
|
|
@@ -933,14 +935,10 @@ class Crackerjack(BaseModel, arbitrary_types_allowed=True):
|
|
|
933
935
|
["pdm", "install"], capture_output=True, text=True
|
|
934
936
|
)
|
|
935
937
|
if result.returncode == 0:
|
|
936
|
-
self.console.print("[
|
|
937
|
-
self.execute_command(["pdm", "lock"])
|
|
938
|
-
self.console.print(
|
|
939
|
-
"[bright_green]✅ Lock file updated[/bright_green]\n"
|
|
940
|
-
)
|
|
938
|
+
self.console.print("[green]PDM installed[/green]\n")
|
|
941
939
|
else:
|
|
942
940
|
self.console.print(
|
|
943
|
-
"\n\n
|
|
941
|
+
"\n\n[red]PDM installation failed. Is PDM is installed? Run `pipx install pdm` and try again.[/red]\n\n"
|
|
944
942
|
)
|
|
945
943
|
|
|
946
944
|
def _update_precommit(self, options: t.Any) -> None:
|
|
@@ -1057,12 +1055,12 @@ class Crackerjack(BaseModel, arbitrary_types_allowed=True):
|
|
|
1057
1055
|
def _print_ai_agent_files(self, options: t.Any) -> None:
|
|
1058
1056
|
if getattr(options, "ai_agent", False):
|
|
1059
1057
|
self.console.print(
|
|
1060
|
-
"[dim
|
|
1058
|
+
"[dim white]Structured test results: test-results.xml[/dim white]"
|
|
1061
1059
|
)
|
|
1062
|
-
self.console.print("[dim
|
|
1060
|
+
self.console.print("[dim white]Coverage report: coverage.json[/dim white]")
|
|
1063
1061
|
if options.benchmark or options.benchmark_regression:
|
|
1064
1062
|
self.console.print(
|
|
1065
|
-
"[dim
|
|
1063
|
+
"[dim white]Benchmark results: benchmark.json[/dim white]"
|
|
1066
1064
|
)
|
|
1067
1065
|
|
|
1068
1066
|
def _handle_test_failure(self, result: t.Any, options: t.Any) -> None:
|
|
@@ -1083,7 +1081,7 @@ class Crackerjack(BaseModel, arbitrary_types_allowed=True):
|
|
|
1083
1081
|
def _run_tests(self, options: t.Any) -> None:
|
|
1084
1082
|
if not options.test:
|
|
1085
1083
|
return
|
|
1086
|
-
self.console.print("\n\n[
|
|
1084
|
+
self.console.print("\n\n[blue]Running tests...[/blue]\n")
|
|
1087
1085
|
test_command = self._prepare_pytest_command(options)
|
|
1088
1086
|
result = self.execute_command(test_command, capture_output=True, text=True)
|
|
1089
1087
|
if result.stdout:
|
|
@@ -1136,7 +1134,7 @@ class Crackerjack(BaseModel, arbitrary_types_allowed=True):
|
|
|
1136
1134
|
self, cmd: list[str], **kwargs: t.Any
|
|
1137
1135
|
) -> subprocess.CompletedProcess[str]:
|
|
1138
1136
|
if self.dry_run:
|
|
1139
|
-
self.console.print(f"[dim
|
|
1137
|
+
self.console.print(f"[dim white]→ {' '.join(cmd)}[/dim white]")
|
|
1140
1138
|
return CompletedProcess(cmd, 0, "", "")
|
|
1141
1139
|
return execute(cmd, **kwargs)
|
|
1142
1140
|
|
|
@@ -1154,12 +1152,12 @@ class Crackerjack(BaseModel, arbitrary_types_allowed=True):
|
|
|
1154
1152
|
if not options.skip_hooks:
|
|
1155
1153
|
self.project_manager.run_pre_commit()
|
|
1156
1154
|
else:
|
|
1157
|
-
self.console.print("[
|
|
1155
|
+
self.console.print("[yellow]Skipping pre-commit hooks[/yellow]")
|
|
1158
1156
|
self._run_tests(options)
|
|
1159
1157
|
self._bump_version(options)
|
|
1160
1158
|
self._publish_project(options)
|
|
1161
1159
|
self._commit_and_push(options)
|
|
1162
|
-
self.console.print("\n[
|
|
1160
|
+
self.console.print("\n[green]Crackerjack complete![/green]\n")
|
|
1163
1161
|
|
|
1164
1162
|
|
|
1165
1163
|
crackerjack_it = Crackerjack().process
|
crackerjack/errors.py
CHANGED
|
@@ -106,13 +106,13 @@ def handle_error(
|
|
|
106
106
|
formatted_json = json.dumps(error_data)
|
|
107
107
|
console.print(f"[json]{formatted_json}[/json]")
|
|
108
108
|
else:
|
|
109
|
-
title = f"
|
|
109
|
+
title = f"Error {error.error_code.value}: {error.error_code.name}"
|
|
110
110
|
content = [error.message]
|
|
111
111
|
if verbose and error.details:
|
|
112
|
-
content.extend(("\n[
|
|
112
|
+
content.extend(("\n[white]Details:[/white]", str(error.details)))
|
|
113
113
|
if error.recovery:
|
|
114
114
|
content.extend(
|
|
115
|
-
("\n[
|
|
115
|
+
("\n[green]Recovery suggestion:[/green]", str(error.recovery))
|
|
116
116
|
)
|
|
117
117
|
console.print(
|
|
118
118
|
Panel(
|
crackerjack/interactive.py
CHANGED
|
@@ -205,19 +205,19 @@ class InteractiveCLI:
|
|
|
205
205
|
|
|
206
206
|
def show_task_status(self, task: Task) -> Panel:
|
|
207
207
|
if task.status == TaskStatus.RUNNING:
|
|
208
|
-
status = "[yellow]
|
|
208
|
+
status = "[yellow]Running[/yellow]"
|
|
209
209
|
style = "yellow"
|
|
210
210
|
elif task.status == TaskStatus.SUCCESS:
|
|
211
|
-
status = "[green]
|
|
211
|
+
status = "[green]Success[/green]"
|
|
212
212
|
style = "green"
|
|
213
213
|
elif task.status == TaskStatus.FAILED:
|
|
214
|
-
status = "[red]
|
|
214
|
+
status = "[red]Failed[/red]"
|
|
215
215
|
style = "red"
|
|
216
216
|
elif task.status == TaskStatus.SKIPPED:
|
|
217
|
-
status = "[blue]
|
|
217
|
+
status = "[blue]Skipped[/blue]"
|
|
218
218
|
style = "blue"
|
|
219
219
|
else:
|
|
220
|
-
status = "[
|
|
220
|
+
status = "[dim white]Pending[/dim white]"
|
|
221
221
|
style = "dim"
|
|
222
222
|
duration = task.duration
|
|
223
223
|
duration_text = f"Duration: {duration:.2f}s" if duration else ""
|
|
@@ -235,23 +235,23 @@ class InteractiveCLI:
|
|
|
235
235
|
title="Workflow Tasks",
|
|
236
236
|
box=ROUNDED,
|
|
237
237
|
show_header=True,
|
|
238
|
-
header_style="bold
|
|
238
|
+
header_style="bold white",
|
|
239
239
|
)
|
|
240
|
-
table.add_column("Task", style="
|
|
240
|
+
table.add_column("Task", style="white")
|
|
241
241
|
table.add_column("Status")
|
|
242
242
|
table.add_column("Duration")
|
|
243
243
|
table.add_column("Dependencies")
|
|
244
244
|
for task in self.workflow.tasks.values():
|
|
245
245
|
if task.status == TaskStatus.RUNNING:
|
|
246
|
-
status = "[yellow]
|
|
246
|
+
status = "[yellow]Running[/yellow]"
|
|
247
247
|
elif task.status == TaskStatus.SUCCESS:
|
|
248
|
-
status = "[green]
|
|
248
|
+
status = "[green]Success[/green]"
|
|
249
249
|
elif task.status == TaskStatus.FAILED:
|
|
250
|
-
status = "[red]
|
|
250
|
+
status = "[red]Failed[/red]"
|
|
251
251
|
elif task.status == TaskStatus.SKIPPED:
|
|
252
|
-
status = "[blue]
|
|
252
|
+
status = "[blue]Skipped[/blue]"
|
|
253
253
|
else:
|
|
254
|
-
status = "[
|
|
254
|
+
status = "[dim white]Pending[/dim white]"
|
|
255
255
|
duration = task.duration
|
|
256
256
|
duration_text = f"{duration:.2f}s" if duration else "-"
|
|
257
257
|
deps = ", ".join(dep.name for dep in task.dependencies) or "-"
|
|
@@ -274,7 +274,7 @@ class InteractiveCLI:
|
|
|
274
274
|
def _setup_interactive_layout(self) -> Layout:
|
|
275
275
|
layout = self.setup_layout()
|
|
276
276
|
layout["header"].update(
|
|
277
|
-
Panel("Crackerjack Interactive Mode", style="bold
|
|
277
|
+
Panel("Crackerjack Interactive Mode", style="bold white", box=ROUNDED)
|
|
278
278
|
)
|
|
279
279
|
layout["footer"].update(Panel("Press Ctrl+C to exit", style="dim", box=ROUNDED))
|
|
280
280
|
return layout
|
|
@@ -282,7 +282,7 @@ class InteractiveCLI:
|
|
|
282
282
|
def _create_progress_tracker(self) -> dict[str, t.Any]:
|
|
283
283
|
progress = Progress(
|
|
284
284
|
SpinnerColumn(),
|
|
285
|
-
TextColumn("[
|
|
285
|
+
TextColumn("[white]{task.description}"),
|
|
286
286
|
BarColumn(),
|
|
287
287
|
TextColumn("[progress.percentage]{task.percentage:>3.0f}%"),
|
|
288
288
|
TimeElapsedColumn(),
|
crackerjack/pyproject.toml
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
crackerjack-0.22.
|
|
2
|
-
crackerjack-0.22.
|
|
3
|
-
crackerjack-0.22.
|
|
4
|
-
crackerjack-0.22.
|
|
1
|
+
crackerjack-0.22.6.dist-info/METADATA,sha256=1YAl0koqXlCEOIZ0JjvQTowffHa4eyQaronFhxY8XAo,26251
|
|
2
|
+
crackerjack-0.22.6.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
|
|
3
|
+
crackerjack-0.22.6.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
|
4
|
+
crackerjack-0.22.6.dist-info/licenses/LICENSE,sha256=fDt371P6_6sCu7RyqiZH_AhT1LdN3sN1zjBtqEhDYCk,1531
|
|
5
5
|
crackerjack/.gitignore,sha256=n8cD6U16L3XZn__PvhYm_F7-YeFHFucHCyxWj2NZCGs,259
|
|
6
6
|
crackerjack/.libcst.codemod.yaml,sha256=a8DlErRAIPV1nE6QlyXPAzTOgkB24_spl2E9hphuf5s,772
|
|
7
7
|
crackerjack/.pdm.toml,sha256=dZe44HRcuxxCFESGG8SZIjmc-cGzSoyK3Hs6t4NYA8w,23
|
|
8
8
|
crackerjack/.pre-commit-config-ai.yaml,sha256=K8xXKMJcdhfXOk24L4XpK7H8YlvnZfOh4NVA6qvOz8I,3319
|
|
9
|
-
crackerjack/.pre-commit-config.yaml,sha256=
|
|
9
|
+
crackerjack/.pre-commit-config.yaml,sha256=_GTHSBIDUlTh01Uyc5eFhRztjmijazgtLBmUR9F7tbw,2643
|
|
10
10
|
crackerjack/.pytest_cache/.gitignore,sha256=Ptcxtl0GFQwTji2tsL4Gl1UIiKa0frjEXsya26i46b0,37
|
|
11
11
|
crackerjack/.pytest_cache/CACHEDIR.TAG,sha256=N9yI75oKvt2-gQU6bdj9-xOvthMEXqHrSlyBWnSjveQ,191
|
|
12
12
|
crackerjack/.pytest_cache/README.md,sha256=c_1vzN2ALEGaay2YPWwxc7fal1WKxLWJ7ewt_kQ9ua0,302
|
|
@@ -34,7 +34,8 @@ crackerjack/.ruff_cache/0.11.7/10386934055395314831,sha256=lBNwN5zAgM4OzbkXIOzCc
|
|
|
34
34
|
crackerjack/.ruff_cache/0.11.7/3557596832929915217,sha256=fKlwUbsvT3YIKV6UR-aA_i64lLignWeVfVu-MMmVbU0,207
|
|
35
35
|
crackerjack/.ruff_cache/0.11.8/530407680854991027,sha256=xAMAL3Vu_HR6M-h5ojCTaak0By5ii8u-14pXULLgLqw,224
|
|
36
36
|
crackerjack/.ruff_cache/0.12.0/5056746222905752453,sha256=MqrIT5qymJcgAOBZyn-TvYoGCFfDFCgN9IwSULq8n14,256
|
|
37
|
-
crackerjack/.ruff_cache/0.12.1/5056746222905752453,sha256=
|
|
37
|
+
crackerjack/.ruff_cache/0.12.1/5056746222905752453,sha256=wAqh3Of2ic9vKSBf4_apPp6o3hcJkngOtFCoPsN-er8,256
|
|
38
|
+
crackerjack/.ruff_cache/0.12.2/5056746222905752453,sha256=Yrzt9xBJaL_dZPRvf27JhnzjOZ4toH_t9Ka75LBcbrw,256
|
|
38
39
|
crackerjack/.ruff_cache/0.2.0/10047773857155985907,sha256=j9LNa_RQ4Plor7go1uTYgz17cEENKvZQ-dP6b9MX0ik,248
|
|
39
40
|
crackerjack/.ruff_cache/0.2.1/8522267973936635051,sha256=u_aPBMibtAp_iYvLwR88GMAECMcIgHezxMyuapmU2P4,248
|
|
40
41
|
crackerjack/.ruff_cache/0.2.2/18053836298936336950,sha256=Xb_ebP0pVuUfSqPEZKlhQ70so_vqkEfMYpuHQ06iR5U,248
|
|
@@ -64,9 +65,9 @@ crackerjack/.ruff_cache/0.9.9/8843823720003377982,sha256=e4ymkXfQsUg5e_mtO34xTsa
|
|
|
64
65
|
crackerjack/.ruff_cache/CACHEDIR.TAG,sha256=WVMVbX4MVkpCclExbq8m-IcOZIOuIZf5FrYw5Pk-Ma4,43
|
|
65
66
|
crackerjack/__init__.py,sha256=8tBSPAru_YDuPpjz05cL7pNbZjYFoRT_agGd_FWa3gY,839
|
|
66
67
|
crackerjack/__main__.py,sha256=lEyi83ChuehqEJgUQ6Ib4ByOofvmhi_0M7oFamMC_1I,6407
|
|
67
|
-
crackerjack/crackerjack.py,sha256=
|
|
68
|
-
crackerjack/errors.py,sha256=
|
|
69
|
-
crackerjack/interactive.py,sha256=
|
|
68
|
+
crackerjack/crackerjack.py,sha256=k0ZCkFd4ZCRhXynJeXWZzFgrdZvOVoBBYZ0fOWCdkIw,44869
|
|
69
|
+
crackerjack/errors.py,sha256=Wcv0rXfzV9pHOoXYrhQEjyJd4kUUBbdiY-5M9nI8pDw,4050
|
|
70
|
+
crackerjack/interactive.py,sha256=pFItgRUyjOakABLCRz6nIp6_Ycx2LBSeojpYNiTelv0,16126
|
|
70
71
|
crackerjack/py313.py,sha256=buYE7LO11Q64ffowEhTZRFQoAGj_8sg3DTlZuv8M9eo,5890
|
|
71
|
-
crackerjack/pyproject.toml,sha256=
|
|
72
|
-
crackerjack-0.22.
|
|
72
|
+
crackerjack/pyproject.toml,sha256=tq_zElt5qjnRlCC9YzrnGEjBHYrLqbnDFlzCJzHDCHU,4988
|
|
73
|
+
crackerjack-0.22.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|