crackerjack 0.34.2__py3-none-any.whl → 0.35.0__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 CHANGED
@@ -11,7 +11,6 @@ from crackerjack.services.git import GitService
11
11
 
12
12
  from .cli import (
13
13
  CLI_OPTIONS,
14
- BumpOption,
15
14
  create_options,
16
15
  handle_interactive_mode,
17
16
  handle_standard_mode,
@@ -1220,9 +1219,9 @@ def main(
1220
1219
  update_precommit: bool = CLI_OPTIONS["update_precommit"],
1221
1220
  verbose: bool = CLI_OPTIONS["verbose"],
1222
1221
  debug: bool = CLI_OPTIONS["debug"],
1223
- publish: BumpOption | None = CLI_OPTIONS["publish"],
1224
- all: BumpOption | None = CLI_OPTIONS["all"],
1225
- bump: BumpOption | None = CLI_OPTIONS["bump"],
1222
+ publish: str | None = CLI_OPTIONS["publish"],
1223
+ all: str | None = CLI_OPTIONS["all"],
1224
+ bump: str | None = CLI_OPTIONS["bump"],
1226
1225
  strip_code: bool = CLI_OPTIONS["strip_code"],
1227
1226
  run_tests: bool = CLI_OPTIONS["run_tests"],
1228
1227
  benchmark: bool = CLI_OPTIONS["benchmark"],
@@ -325,8 +325,8 @@ class DocumentationAgent(SubAgent):
325
325
 
326
326
  All notable changes to this project will be documented in this file.
327
327
 
328
- The format is based on [Keep a Changelog](https: //keepachangelog.com/en/1.0.0/),
329
- and this project adheres to [Semantic Versioning](https: //semver.org/spec/v2.0.0.html).
328
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
329
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
330
330
 
331
331
  {entry}
332
332
  """
@@ -2,15 +2,36 @@ import typing as t
2
2
  import warnings
3
3
  from enum import Enum
4
4
 
5
+ import click
5
6
  import typer
6
7
  from pydantic import BaseModel, field_validator, model_validator
7
8
 
8
9
 
10
+ def parse_bump_option_with_flag_support(
11
+ ctx: click.Context, param: click.Parameter, value: str | None
12
+ ) -> str | None:
13
+ """Parse bump option that supports both flag usage (-p) and value usage (-p patch)."""
14
+ if value is None:
15
+ return None
16
+
17
+ # If the value starts with a dash, it's likely another flag that typer mistakenly captured
18
+ if value.startswith("-"):
19
+ # Put the value back into the arguments for typer to process
20
+ if hasattr(ctx, "protected_args"):
21
+ ctx.protected_args.insert(0, value)
22
+ elif hasattr(ctx, "args"):
23
+ ctx.args.insert(0, value)
24
+ return "interactive"
25
+
26
+ return value
27
+
28
+
9
29
  class BumpOption(str, Enum):
10
30
  patch = "patch"
11
31
  minor = "minor"
12
32
  major = "major"
13
33
  interactive = "interactive"
34
+ auto = "auto"
14
35
 
15
36
  def __str__(self) -> str:
16
37
  return str(self.value)
@@ -91,7 +112,7 @@ class Options(BaseModel):
91
112
  strip_code: bool | None = None # Replaces clean
92
113
  run_tests: bool = False # Replaces test
93
114
  ai_fix: bool | None = None # Replaces ai_agent
94
- full_release: BumpOption | None = None # Replaces all
115
+ full_release: str | None = None # Replaces all
95
116
  show_progress: bool | None = None # Replaces track_progress
96
117
  advanced_monitor: bool | None = None # Replaces enhanced_monitor
97
118
  coverage_report: bool | None = None # Replaces coverage_status
@@ -223,6 +244,11 @@ class Options(BaseModel):
223
244
  return None
224
245
  if value == "":
225
246
  return BumpOption.interactive
247
+
248
+ # Handle case where typer parsed a flag as the value (e.g., -p -c becomes value="-c")
249
+ if isinstance(value, str) and value.startswith("-"):
250
+ return BumpOption.interactive
251
+
226
252
  try:
227
253
  return BumpOption(value.lower())
228
254
  except ValueError:
@@ -275,9 +301,12 @@ CLI_OPTIONS = {
275
301
  None,
276
302
  "-p",
277
303
  "--publish",
304
+ callback=parse_bump_option_with_flag_support,
278
305
  help=(
279
- "Bump version and publish to PyPI (patch, minor, major). "
280
- "Use 'interactive' to be prompted for version selection."
306
+ "Bump version and publish to PyPI (patch, minor, major, auto). "
307
+ "Use 'interactive' to be prompted for version selection. "
308
+ "Use 'auto' to automatically use AI recommendations. "
309
+ "When used as a flag (-p), defaults to 'interactive'."
281
310
  ),
282
311
  case_sensitive=False,
283
312
  ),
@@ -285,14 +314,16 @@ CLI_OPTIONS = {
285
314
  None,
286
315
  "-a",
287
316
  "--all",
288
- help="Full release workflow: bump version, run quality checks, and publish (patch, minor, major).",
317
+ callback=parse_bump_option_with_flag_support,
318
+ help="Full release workflow: bump version, run quality checks, and publish (patch, minor, major, auto). When used as a flag (-a), defaults to 'interactive'.",
289
319
  case_sensitive=False,
290
320
  ),
291
321
  "bump": typer.Option(
292
322
  None,
293
323
  "-b",
294
324
  "--bump",
295
- help="Bump version (patch, minor, major).",
325
+ callback=parse_bump_option_with_flag_support,
326
+ help="Bump version (patch, minor, major, auto). When used as a flag (-b), defaults to 'interactive'.",
296
327
  case_sensitive=False,
297
328
  ),
298
329
  "benchmark": typer.Option(
@@ -644,7 +675,8 @@ CLI_OPTIONS = {
644
675
  None,
645
676
  "-a",
646
677
  "--full-release",
647
- help="Complete release workflow: strip code, run tests, bump version, and publish. Equivalent to `-x -t -p <version> -c`.",
678
+ callback=parse_bump_option_with_flag_support,
679
+ help="Complete release workflow: strip code, run tests, bump version, and publish (patch, minor, major, auto). Equivalent to `-x -t -p <version> -c`. When used as a flag (-a), defaults to 'interactive'.",
648
680
  case_sensitive=False,
649
681
  ),
650
682
  "show_progress": typer.Option(
@@ -869,8 +901,8 @@ def create_options(
869
901
  update_precommit: bool,
870
902
  verbose: bool,
871
903
  debug: bool,
872
- publish: BumpOption | None,
873
- bump: BumpOption | None,
904
+ publish: str | None,
905
+ bump: str | None,
874
906
  benchmark: bool,
875
907
  test_workers: int,
876
908
  test_timeout: int,
@@ -953,7 +985,7 @@ def create_options(
953
985
  strip_code: bool | None = None,
954
986
  run_tests: bool = False,
955
987
  ai_fix: bool | None = None,
956
- full_release: BumpOption | None = None,
988
+ full_release: str | None = None,
957
989
  show_progress: bool | None = None,
958
990
  advanced_monitor: bool | None = None,
959
991
  coverage_report: bool | None = None,
@@ -284,7 +284,7 @@ class PublishManagerImpl:
284
284
  [
285
285
  "keyring",
286
286
  "get",
287
- "https: //upload.pypi.org/legacy/",
287
+ "https://upload.pypi.org/legacy/",
288
288
  "__token__",
289
289
  ],
290
290
  )
@@ -315,7 +315,7 @@ class PublishManagerImpl:
315
315
  " 1. Set environment variable: export UV_PUBLISH_TOKEN=<your-pypi-token>",
316
316
  )
317
317
  self.console.print(
318
- " 2. Use keyring: keyring set[t.Any] https: //upload.pypi.org/legacy/ __token__",
318
+ " 2. Use keyring: keyring set[t.Any] https://upload.pypi.org/legacy/ __token__",
319
319
  )
320
320
  self.console.print(
321
321
  " 3. Ensure token starts with 'pypi-' and is properly formatted",
@@ -434,7 +434,7 @@ class PublishManagerImpl:
434
434
  package_name = self._get_package_name()
435
435
 
436
436
  if package_name and current_version:
437
- url = f"https: //pypi.org/project/{package_name}/{current_version}/"
437
+ url = f"https://pypi.org/project/{package_name}/{current_version}/"
438
438
  self.console.print(f"[cyan]🔗[/ cyan] Package URL: {url}")
439
439
 
440
440
  def _get_package_name(self) -> str | None:
@@ -157,11 +157,9 @@ class JobDataCollector:
157
157
  "network_operations",
158
158
  timeout=5.0,
159
159
  ):
160
- websocket_base = self.websocket_url.replace(
161
- "ws: //", "http: //"
162
- ).replace(
163
- "wss: //",
164
- "https: //",
160
+ websocket_base = self.websocket_url.replace("ws://", "http://").replace(
161
+ "wss://",
162
+ "https://",
165
163
  )
166
164
 
167
165
  async with (
@@ -452,13 +452,13 @@ class DependencyMonitorService:
452
452
 
453
453
  import requests
454
454
 
455
- url = f"https: //pypi.org/pypi/{package}/json"
455
+ url = f"https://pypi.org/pypi/{package}/json"
456
456
  self._validate_pypi_url(url)
457
457
 
458
458
  parsed = urlparse(url)
459
459
 
460
460
  if parsed.scheme != "https" or parsed.netloc != "pypi.org":
461
- msg = f"Invalid URL: only https: //pypi.org URLs are allowed, got {url}"
461
+ msg = f"Invalid URL: only https://pypi.org URLs are allowed, got {url}"
462
462
  raise ValueError(msg)
463
463
 
464
464
  response = requests.get(url, timeout=10, verify=True)
@@ -347,11 +347,11 @@ class HealthMetricsService:
347
347
  try:
348
348
  from urllib.parse import urlparse
349
349
 
350
- url = f"https: //pypi.org/pypi/{package_name}/json"
350
+ url = f"https://pypi.org/pypi/{package_name}/json"
351
351
 
352
352
  parsed = urlparse(url)
353
353
  if parsed.scheme != "https" or parsed.netloc != "pypi.org":
354
- msg = f"Invalid URL: only https: //pypi.org URLs are allowed, got {url}"
354
+ msg = f"Invalid URL: only https://pypi.org URLs are allowed, got {url}"
355
355
  raise ValueError(msg)
356
356
 
357
357
  if not parsed.path.startswith("/pypi/") or not parsed.path.endswith(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crackerjack
3
- Version: 0.34.2
3
+ Version: 0.35.0
4
4
  Summary: Crackerjack Python project management tool
5
5
  Project-URL: documentation, https://github.com/lesleslie/crackerjack
6
6
  Project-URL: homepage, https://github.com/lesleslie/crackerjack
@@ -1,5 +1,5 @@
1
1
  crackerjack/__init__.py,sha256=k8_Ev_3fWdjFtGNSJdSOvyaSLW54y3j484d3a8k_Ob4,1396
2
- crackerjack/__main__.py,sha256=zSZyImAZrHvOvGQT7-QHXqJPW8IQLH2c6QU5Awvy1eU,52552
2
+ crackerjack/__main__.py,sha256=lE5ZDbAzI9TLCzMTxFGw23Dk1hP-MEhd1i_nNbi_Mag,52515
3
3
  crackerjack/api.py,sha256=hXWqk9qLxYley6NiIIz9RemYhxC67cwwbktQdV1IPPY,21550
4
4
  crackerjack/code_cleaner.py,sha256=M1zVaq31uW0nOkPneKR8kfR3892gyyVx0VhFgRaxsj4,44338
5
5
  crackerjack/dynamic_config.py,sha256=DOfq5Qjkfcww7qW9Q-MDOCn-TSUu6sZWMpZ4rbaFn40,21564
@@ -15,7 +15,7 @@ crackerjack/agents/__init__.py,sha256=OkL6WdzTk1_EnhJpIPsHV2qCrw6tqKegu_zTpZXnJi
15
15
  crackerjack/agents/architect_agent.py,sha256=Gq9eAy1_pl-1iEYC28xn4rdIPi9AVynZ7Sd5FnBrNn8,8130
16
16
  crackerjack/agents/base.py,sha256=XRF0VKrkIB-QJ_izuM33EPKL26gBABrDKKgMNJy9lJQ,4888
17
17
  crackerjack/agents/coordinator.py,sha256=uLh-9aTJedqmTSDmwV2dx42_aeIIOCEFbcdj9wcIR4w,22470
18
- crackerjack/agents/documentation_agent.py,sha256=tPtNO-2K1f4LELDtC4xnM6m8tet5HPr-PEb9j020908,17180
18
+ crackerjack/agents/documentation_agent.py,sha256=bI9qPJ5rTZrjimythO_N27zpJFrFcP6i1N2hYZMr_u4,17178
19
19
  crackerjack/agents/dry_agent.py,sha256=OP386uTOEQEQZCetCIHV6j7_cl7BKrhK3BmAmRqdgYI,13302
20
20
  crackerjack/agents/formatting_agent.py,sha256=eDkLABvpkc3vkYLBjsjib9_AtqsdjxyPIddIvD293L8,6821
21
21
  crackerjack/agents/import_optimization_agent.py,sha256=DoDaN7Pb0Z6Nt6YkkKeWMu3Paffy5eOb6ao4khtL3ko,40578
@@ -34,7 +34,7 @@ crackerjack/cli/cache_handlers_enhanced.py,sha256=6X5rYSo1l-rj9eb7eB8mpA-6BlUagy
34
34
  crackerjack/cli/facade.py,sha256=e4_oB04awqEijI3yqiYAZGc6x09uMBa4ih0SsXpgMuY,3751
35
35
  crackerjack/cli/handlers.py,sha256=mYhwMLUKid6mQLff0ScpcnhP0yUS9IzOIMdM7VLkUCc,17178
36
36
  crackerjack/cli/interactive.py,sha256=bGOMXHYyuselHh2b4khbDGJ4tX9yI2rVN3SZ1oSDOaM,16988
37
- crackerjack/cli/options.py,sha256=g1OcUXA6a59dLQfNw-84HQt66zQR9QRBGnVvlbrbVwI,34010
37
+ crackerjack/cli/options.py,sha256=tpvOMQHrL7-j9wuo2_NwvzJTAWF3XcyeOEonQPbepa4,35433
38
38
  crackerjack/cli/utils.py,sha256=XC7dT8GNidhORjUe2p2hQOpZgCi2KvVCNu6g3azzgqY,584
39
39
  crackerjack/config/__init__.py,sha256=b0481N2f_JvGufMPcbo5IXu2VjYd111r1BHw0oD3x7o,330
40
40
  crackerjack/config/global_lock_config.py,sha256=PyonoA2__HKEEvn6SD-gEYh9iD7xIAdts2C3lNoTWhw,1996
@@ -84,7 +84,7 @@ crackerjack/intelligence/integration.py,sha256=vVaC2Fp5RbbABpaohCePzGw1XANuRztGl
84
84
  crackerjack/managers/__init__.py,sha256=PFWccXx4hDQA76T02idAViOLVD-aPeVpgjdfSkh_Dmk,298
85
85
  crackerjack/managers/async_hook_manager.py,sha256=c0HFR98sFwfk0uZ3NmAe_6OVZpBrq9I570V8A2DoIxw,5129
86
86
  crackerjack/managers/hook_manager.py,sha256=_FT0ngwPwujqg0KZGpLz-pP07mwDmptJ5pVkiy5yS8k,7820
87
- crackerjack/managers/publish_manager.py,sha256=Jn0XqGjZNfLNiq3-XaQWGU950TRbDWW-5WMEn7jJ6ag,21373
87
+ crackerjack/managers/publish_manager.py,sha256=-sHzSVMF6fSUXuPdWA47gBFkFCT8sIb4cPj3GJB-uX4,21370
88
88
  crackerjack/managers/test_command_builder.py,sha256=1TlPzddNcDDxRORH6UvAudcbRc6hKwFyknSEVLkiWAo,3459
89
89
  crackerjack/managers/test_executor.py,sha256=2837Ti4OaNsmLxnmELjbQ18hmfL0-Z2EW-W2UeFSDcE,13871
90
90
  crackerjack/managers/test_manager.py,sha256=BRPBWXx4flPDK0w96xyHhg-9dmUca1vpKQRM2VofSlI,13158
@@ -97,7 +97,7 @@ crackerjack/mcp/context.py,sha256=T1rhScFxbqi0Kaf6o8NusVUIwc8o7YGxcsLdmlWVsPI,28
97
97
  crackerjack/mcp/dashboard.py,sha256=eApQekZe1DfKBrlDW5yobyqaN_gdh17ZQlqGmut5TCs,19602
98
98
  crackerjack/mcp/enhanced_progress_monitor.py,sha256=xhACaEjreDw1cLObJmhr5ttowl5mRqeohmMzQfRQj3w,16448
99
99
  crackerjack/mcp/file_monitor.py,sha256=4OR-nxqH0ettiGInIY6MckFoflwX5VP9bgxXcAZZzfE,12824
100
- crackerjack/mcp/progress_components.py,sha256=OzD6jccwQOk2-pAcq2-D7f9E_VKsnhZ7AYBGBcT59-g,20577
100
+ crackerjack/mcp/progress_components.py,sha256=URtnrNv1QQzUKY3msO_cBrYHjPlzVDqFbZa_trfZHXY,20535
101
101
  crackerjack/mcp/progress_monitor.py,sha256=3TxQ_Og1md8zuNrH9cltOa8RQf_5lHNiVh9DiBkvbBM,37546
102
102
  crackerjack/mcp/rate_limiter.py,sha256=oM29wHyvoR9Q9cMBAEqWquHoiBBS1ylrZkUhhFnDkVo,12309
103
103
  crackerjack/mcp/server.py,sha256=-AdHHoFNAtoPM1A3_M2giZbIbggUhhvv16uIXk2xqNo,403
@@ -166,7 +166,7 @@ crackerjack/services/coverage_badge_service.py,sha256=gzC3LEyVLt4rpf378APsFVRGgN
166
166
  crackerjack/services/coverage_ratchet.py,sha256=eKxmFyg-7Rnctnk--6P-yNNOFhoKwzTxd4iCJ52dtZE,13439
167
167
  crackerjack/services/debug.py,sha256=kTy2vy6JjjNReNn4z7xmhXDVIj8xImaE67kYi-Pfb3o,23227
168
168
  crackerjack/services/dependency_analyzer.py,sha256=4MxexuyQ3wyPHVsHr77N22EsAqZTDGOVcSBSm1mOXFQ,16322
169
- crackerjack/services/dependency_monitor.py,sha256=g2XocjAs5UJmgUfAFFbKc0__cYDMAZqvNVgFufswi6E,20562
169
+ crackerjack/services/dependency_monitor.py,sha256=x_PpRUt-LbzHlTyoSt2kiXTQn2fqAiqouiwFSAU9SGg,20560
170
170
  crackerjack/services/documentation_generator.py,sha256=xDJ2dv3Q_HTGCPJADKPVtYzcIpSOhuH5qUxPU2ttICE,16482
171
171
  crackerjack/services/documentation_service.py,sha256=V2fY01u_tP_ep87KMGxIocgP6hfpwbf-YyVqssLQSns,24792
172
172
  crackerjack/services/enhanced_filesystem.py,sha256=IT-obfj2U2Sfy0iJOq0ZAiczEN6LdHf6VAhnugQe1mQ,15487
@@ -175,7 +175,7 @@ crackerjack/services/error_pattern_analyzer.py,sha256=bTMwhAMAjVPSUXrNkrtm1KDqfx
175
175
  crackerjack/services/file_hasher.py,sha256=eReytwwK-_-B8JBnpwytDC52cKKgg4qpaxaZKcQjD-0,5211
176
176
  crackerjack/services/filesystem.py,sha256=nmL3mYqylS_BSQpwFbC7EMHoA44K5qUxa9CPg1QFZvc,17480
177
177
  crackerjack/services/git.py,sha256=g0D9K7PFGWiv_-CbPXEhGtxJVJccEsshYNEmGstjXss,12716
178
- crackerjack/services/health_metrics.py,sha256=KmwFlvcB-Pb8DnDI0IRV9ETDdp_vJTaGlhJ_HmBL2YY,21538
178
+ crackerjack/services/health_metrics.py,sha256=nDuKEC2a5csOhMpy6zXJkls1Y4Vfrr62-4cFcWCr8ow,21536
179
179
  crackerjack/services/heatmap_generator.py,sha256=zz5V-zXPfoCGNXoj7iuyOeFuDRRUhFpxuENUnd0X75g,26200
180
180
  crackerjack/services/initialization.py,sha256=_ZjGpIG5eGHzrVXCxlhlouhY-E-4OITEln1GDTswZ6s,26049
181
181
  crackerjack/services/input_validator.py,sha256=Botr3ottp9InSw163QaFrNfy0kM_STsJdWBbjsCX96M,22262
@@ -222,8 +222,8 @@ crackerjack/slash_commands/status.md,sha256=U3qqppVLtIIm2lEiMYaKagaHYLI9UplL7OH1
222
222
  crackerjack/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
223
223
  crackerjack/tools/validate_input_validator_patterns.py,sha256=NN7smYlXWrHLQXTb-81gRam2vjW-cJav92f1klPA0qA,8234
224
224
  crackerjack/tools/validate_regex_patterns.py,sha256=9ejFb7Tw1js_oydzuEeeeXvrU5ipHUEX9ATBfkLCCE8,5811
225
- crackerjack-0.34.2.dist-info/METADATA,sha256=lHdu1Cejg0Jvt5xvQfc1oyFpQ7zX2fpNZnFjmGOoLro,37942
226
- crackerjack-0.34.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
227
- crackerjack-0.34.2.dist-info/entry_points.txt,sha256=AJKNft0WXm9xoGUJ3Trl-iXHOWxRAYbagQiza3AILr4,57
228
- crackerjack-0.34.2.dist-info/licenses/LICENSE,sha256=fDt371P6_6sCu7RyqiZH_AhT1LdN3sN1zjBtqEhDYCk,1531
229
- crackerjack-0.34.2.dist-info/RECORD,,
225
+ crackerjack-0.35.0.dist-info/METADATA,sha256=oX8q8fSrssEUsiGO6fkHjuTfDDsj6jw3aYRauYM4qpM,37942
226
+ crackerjack-0.35.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
227
+ crackerjack-0.35.0.dist-info/entry_points.txt,sha256=AJKNft0WXm9xoGUJ3Trl-iXHOWxRAYbagQiza3AILr4,57
228
+ crackerjack-0.35.0.dist-info/licenses/LICENSE,sha256=fDt371P6_6sCu7RyqiZH_AhT1LdN3sN1zjBtqEhDYCk,1531
229
+ crackerjack-0.35.0.dist-info/RECORD,,