crackerjack 0.37.9__py3-none-any.whl → 0.38.1__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/__init__.py +1 -1
- crackerjack/__main__.py +79 -2
- crackerjack/api.py +1 -2
- crackerjack/cli/options.py +2 -2
- crackerjack/core/workflow_orchestrator.py +295 -163
- crackerjack/documentation/reference_generator.py +104 -59
- crackerjack/dynamic_config.py +21 -9
- crackerjack/interactive.py +7 -5
- crackerjack/managers/publish_manager.py +3 -3
- crackerjack/managers/test_manager.py +81 -9
- crackerjack/mcp/file_monitor.py +12 -2
- crackerjack/mcp/rate_limiter.py +9 -5
- crackerjack/mcp/service_watchdog.py +7 -4
- crackerjack/mcp/tools/intelligence_tools.py +1 -1
- crackerjack/mcp/tools/proactive_tools.py +1 -1
- crackerjack/orchestration/execution_strategies.py +3 -3
- crackerjack/plugins/hooks.py +2 -1
- crackerjack/plugins/loader.py +1 -1
- crackerjack/services/dependency_analyzer.py +4 -4
- crackerjack/services/error_pattern_analyzer.py +4 -4
- crackerjack/services/parallel_executor.py +2 -2
- crackerjack/services/performance_benchmarks.py +3 -1
- crackerjack/services/performance_cache.py +4 -4
- crackerjack/services/quality_intelligence.py +1 -1
- {crackerjack-0.37.9.dist-info → crackerjack-0.38.1.dist-info}/METADATA +3 -2
- {crackerjack-0.37.9.dist-info → crackerjack-0.38.1.dist-info}/RECORD +29 -29
- {crackerjack-0.37.9.dist-info → crackerjack-0.38.1.dist-info}/WHEEL +0 -0
- {crackerjack-0.37.9.dist-info → crackerjack-0.38.1.dist-info}/entry_points.txt +0 -0
- {crackerjack-0.37.9.dist-info → crackerjack-0.38.1.dist-info}/licenses/LICENSE +0 -0
crackerjack/__init__.py
CHANGED
crackerjack/__main__.py
CHANGED
|
@@ -11,6 +11,7 @@ from crackerjack.services.git import GitService
|
|
|
11
11
|
|
|
12
12
|
from .cli import (
|
|
13
13
|
CLI_OPTIONS,
|
|
14
|
+
BumpOption,
|
|
14
15
|
create_options,
|
|
15
16
|
handle_interactive_mode,
|
|
16
17
|
handle_standard_mode,
|
|
@@ -1219,9 +1220,9 @@ def main(
|
|
|
1219
1220
|
update_precommit: bool = CLI_OPTIONS["update_precommit"],
|
|
1220
1221
|
verbose: bool = CLI_OPTIONS["verbose"],
|
|
1221
1222
|
debug: bool = CLI_OPTIONS["debug"],
|
|
1222
|
-
publish:
|
|
1223
|
+
publish: BumpOption | None = CLI_OPTIONS["publish"],
|
|
1223
1224
|
all: str | None = CLI_OPTIONS["all"],
|
|
1224
|
-
bump:
|
|
1225
|
+
bump: BumpOption | None = CLI_OPTIONS["bump"],
|
|
1225
1226
|
strip_code: bool = CLI_OPTIONS["strip_code"],
|
|
1226
1227
|
run_tests: bool = CLI_OPTIONS["run_tests"],
|
|
1227
1228
|
benchmark: bool = CLI_OPTIONS["benchmark"],
|
|
@@ -1466,6 +1467,10 @@ def _process_all_commands(local_vars: t.Any, console: t.Any, options: t.Any) ->
|
|
|
1466
1467
|
):
|
|
1467
1468
|
return False
|
|
1468
1469
|
|
|
1470
|
+
# Handle coverage status command
|
|
1471
|
+
if not _handle_coverage_status(local_vars["coverage_status"], console, options):
|
|
1472
|
+
return False
|
|
1473
|
+
|
|
1469
1474
|
# Handle documentation and analysis commands
|
|
1470
1475
|
return _handle_analysis_commands(local_vars, console, options)
|
|
1471
1476
|
|
|
@@ -1538,6 +1543,78 @@ def _handle_specialized_analytics(local_vars: t.Any, console: t.Any) -> bool:
|
|
|
1538
1543
|
return _handle_enterprise_features(local_vars, console)
|
|
1539
1544
|
|
|
1540
1545
|
|
|
1546
|
+
def _handle_coverage_status(
|
|
1547
|
+
coverage_status: bool, console: t.Any, options: t.Any
|
|
1548
|
+
) -> bool:
|
|
1549
|
+
"""Handle coverage status display command."""
|
|
1550
|
+
if not coverage_status:
|
|
1551
|
+
return True
|
|
1552
|
+
|
|
1553
|
+
try:
|
|
1554
|
+
from pathlib import Path
|
|
1555
|
+
|
|
1556
|
+
from crackerjack.managers.test_manager import TestManager
|
|
1557
|
+
|
|
1558
|
+
# Use current working directory as package path
|
|
1559
|
+
pkg_path = Path.cwd()
|
|
1560
|
+
|
|
1561
|
+
# Create test manager directly
|
|
1562
|
+
test_manager = TestManager(console, pkg_path)
|
|
1563
|
+
|
|
1564
|
+
console.print("[cyan]📊[/cyan] Coverage Status Report")
|
|
1565
|
+
console.print("=" * 50)
|
|
1566
|
+
|
|
1567
|
+
# Get coverage information
|
|
1568
|
+
coverage_info = test_manager.get_coverage()
|
|
1569
|
+
coverage_percent = coverage_info.get("coverage_percent", 0.0)
|
|
1570
|
+
coverage_source = coverage_info.get("source", "unknown")
|
|
1571
|
+
|
|
1572
|
+
if coverage_percent > 0:
|
|
1573
|
+
console.print(
|
|
1574
|
+
f"[green]Current Coverage:[/green] {coverage_percent:.2f}% (from {coverage_source})"
|
|
1575
|
+
)
|
|
1576
|
+
else:
|
|
1577
|
+
console.print(
|
|
1578
|
+
"[yellow]Current Coverage:[/yellow] No coverage data available"
|
|
1579
|
+
)
|
|
1580
|
+
|
|
1581
|
+
# Show status message if available
|
|
1582
|
+
status_message = coverage_info.get("message")
|
|
1583
|
+
if status_message:
|
|
1584
|
+
console.print(f"[dim]{status_message}[/dim]")
|
|
1585
|
+
|
|
1586
|
+
# Try to get more detailed coverage report
|
|
1587
|
+
coverage_report = test_manager.get_coverage_report()
|
|
1588
|
+
if coverage_report:
|
|
1589
|
+
console.print(f"[cyan]Details:[/cyan] {coverage_report}")
|
|
1590
|
+
|
|
1591
|
+
# Show coverage ratchet status if available
|
|
1592
|
+
try:
|
|
1593
|
+
ratchet_status = test_manager.get_coverage_ratchet_status()
|
|
1594
|
+
if ratchet_status:
|
|
1595
|
+
next_milestone = ratchet_status.get("next_milestone")
|
|
1596
|
+
if next_milestone:
|
|
1597
|
+
console.print(f"[cyan]Next Milestone:[/cyan] {next_milestone:.0f}%")
|
|
1598
|
+
|
|
1599
|
+
milestones = ratchet_status.get("milestones_achieved", [])
|
|
1600
|
+
if milestones:
|
|
1601
|
+
console.print(
|
|
1602
|
+
f"[green]Milestones Achieved:[/green] {len(milestones)}"
|
|
1603
|
+
)
|
|
1604
|
+
except Exception:
|
|
1605
|
+
pass # Ignore ratchet status errors
|
|
1606
|
+
|
|
1607
|
+
console.print()
|
|
1608
|
+
return False # Exit after showing status
|
|
1609
|
+
|
|
1610
|
+
except Exception as e:
|
|
1611
|
+
console.print(f"[red]❌[/red] Failed to get coverage status: {e}")
|
|
1612
|
+
import traceback
|
|
1613
|
+
|
|
1614
|
+
console.print(f"[dim]{traceback.format_exc()}[/dim]")
|
|
1615
|
+
return False
|
|
1616
|
+
|
|
1617
|
+
|
|
1541
1618
|
def _handle_enterprise_features(local_vars: t.Any, console: t.Any) -> bool:
|
|
1542
1619
|
"""Handle enterprise features."""
|
|
1543
1620
|
# Handle enterprise optimizer
|
crackerjack/api.py
CHANGED
|
@@ -8,8 +8,7 @@ from rich.console import Console
|
|
|
8
8
|
from .code_cleaner import CleaningResult, CodeCleaner, PackageCleaningResult
|
|
9
9
|
from .core.workflow_orchestrator import WorkflowOrchestrator
|
|
10
10
|
from .errors import CrackerjackError, ErrorCode
|
|
11
|
-
from .interactive import InteractiveCLI
|
|
12
|
-
from .interactive import WorkflowOptions as InteractiveWorkflowOptions
|
|
11
|
+
from .interactive import InteractiveCLI, InteractiveWorkflowOptions
|
|
13
12
|
from .models.config import WorkflowOptions
|
|
14
13
|
from .services.regex_patterns import SAFE_PATTERNS
|
|
15
14
|
|
crackerjack/cli/options.py
CHANGED
|
@@ -934,8 +934,8 @@ def create_options(
|
|
|
934
934
|
update_precommit: bool,
|
|
935
935
|
verbose: bool,
|
|
936
936
|
debug: bool,
|
|
937
|
-
publish:
|
|
938
|
-
bump:
|
|
937
|
+
publish: BumpOption | None,
|
|
938
|
+
bump: BumpOption | None,
|
|
939
939
|
benchmark: bool,
|
|
940
940
|
test_workers: int,
|
|
941
941
|
test_timeout: int,
|