crackerjack 0.38.9__py3-none-any.whl → 0.38.10__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.

@@ -33,12 +33,45 @@ class TestCommandBuilder:
33
33
  return 900
34
34
  return 300
35
35
 
36
+ def _detect_package_name(self) -> str:
37
+ """Detect the main package name for coverage reporting."""
38
+ # Method 1: Try to read from pyproject.toml
39
+ pyproject_path = self.pkg_path / "pyproject.toml"
40
+ if pyproject_path.exists():
41
+ try:
42
+ import tomllib
43
+ with pyproject_path.open("rb") as f:
44
+ data = tomllib.load(f)
45
+ project_name = data.get("project", {}).get("name")
46
+ if project_name:
47
+ # Convert project name to package name (hyphens to underscores)
48
+ return project_name.replace("-", "_")
49
+ except Exception:
50
+ pass # Fall back to directory detection
51
+
52
+ # Method 2: Look for Python packages in the project root
53
+ for item in self.pkg_path.iterdir():
54
+ if (
55
+ item.is_dir()
56
+ and not item.name.startswith(".")
57
+ and not item.name in ("tests", "docs", "build", "dist", "__pycache__")
58
+ and (item / "__init__.py").exists()
59
+ ):
60
+ return item.name
61
+
62
+ # Method 3: Fallback to crackerjack if nothing found (for crackerjack itself)
63
+ return "crackerjack"
64
+
36
65
  def _add_coverage_options(self, cmd: list[str], options: OptionsProtocol) -> None:
66
+ # Determine package name from project structure
67
+ package_name = self._detect_package_name()
68
+
37
69
  cmd.extend(
38
70
  [
39
- "--cov=crackerjack",
71
+ f"--cov={package_name}",
40
72
  "--cov-report=term-missing",
41
73
  "--cov-report=html",
74
+ "--cov-report=json", # Required for badge updates
42
75
  "--cov-fail-under=0",
43
76
  ]
44
77
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: crackerjack
3
- Version: 0.38.9
3
+ Version: 0.38.10
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
@@ -86,7 +86,7 @@ crackerjack/managers/__init__.py,sha256=PFWccXx4hDQA76T02idAViOLVD-aPeVpgjdfSkh_
86
86
  crackerjack/managers/async_hook_manager.py,sha256=c0HFR98sFwfk0uZ3NmAe_6OVZpBrq9I570V8A2DoIxw,5129
87
87
  crackerjack/managers/hook_manager.py,sha256=_FT0ngwPwujqg0KZGpLz-pP07mwDmptJ5pVkiy5yS8k,7820
88
88
  crackerjack/managers/publish_manager.py,sha256=E0jqHuscfn89pI2Ely0R6xyi3EGTvYFQeFTWyRmdjBM,22067
89
- crackerjack/managers/test_command_builder.py,sha256=1TlPzddNcDDxRORH6UvAudcbRc6hKwFyknSEVLkiWAo,3459
89
+ crackerjack/managers/test_command_builder.py,sha256=O1hH4sJ4MZNr509j962Q6zzZzayKkZZSZr9AE5jUH4k,4895
90
90
  crackerjack/managers/test_executor.py,sha256=2837Ti4OaNsmLxnmELjbQ18hmfL0-Z2EW-W2UeFSDcE,13871
91
91
  crackerjack/managers/test_manager.py,sha256=ClApfL9e3K1qe3vVcVbC8Y84CMJO55mwPegXiaTw9g8,18638
92
92
  crackerjack/managers/test_manager_backup.py,sha256=CR8D7WZ68ZrTADFqYJtVDUWnlznJXJNriPIdsp6ZB1E,37932
@@ -225,8 +225,8 @@ crackerjack/tools/validate_input_validator_patterns.py,sha256=NN7smYlXWrHLQXTb-8
225
225
  crackerjack/tools/validate_regex_patterns.py,sha256=J7GG9EP1fASpRIsG8qRPeiCSkdCwmk0sdo29GgoJ6w8,5863
226
226
  crackerjack/ui/__init__.py,sha256=eMb1OeTU-dSLICAACn0YdYB4Amdr8wHckjKfn0wOIZE,37
227
227
  crackerjack/ui/server_panels.py,sha256=F5IH6SNN06BaZQMsFx_D-OA286aojmaFPJ5kvvSRv_c,4232
228
- crackerjack-0.38.9.dist-info/METADATA,sha256=fiEPm6rENprBtuHNDnafBeLabIjFpo7URymS-7xVoTs,38122
229
- crackerjack-0.38.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
230
- crackerjack-0.38.9.dist-info/entry_points.txt,sha256=AJKNft0WXm9xoGUJ3Trl-iXHOWxRAYbagQiza3AILr4,57
231
- crackerjack-0.38.9.dist-info/licenses/LICENSE,sha256=fDt371P6_6sCu7RyqiZH_AhT1LdN3sN1zjBtqEhDYCk,1531
232
- crackerjack-0.38.9.dist-info/RECORD,,
228
+ crackerjack-0.38.10.dist-info/METADATA,sha256=lF3_aqP8gfMzPi8Bak4nikLXGyMlZHPi1mhoAbbWm4k,38123
229
+ crackerjack-0.38.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
230
+ crackerjack-0.38.10.dist-info/entry_points.txt,sha256=AJKNft0WXm9xoGUJ3Trl-iXHOWxRAYbagQiza3AILr4,57
231
+ crackerjack-0.38.10.dist-info/licenses/LICENSE,sha256=fDt371P6_6sCu7RyqiZH_AhT1LdN3sN1zjBtqEhDYCk,1531
232
+ crackerjack-0.38.10.dist-info/RECORD,,