crackerjack 0.20.1__py3-none-any.whl → 0.20.2__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.
@@ -4,7 +4,7 @@ requires = [ "pdm-backend" ]
4
4
 
5
5
  [project]
6
6
  name = "crackerjack"
7
- version = "0.20.0"
7
+ version = "0.20.1"
8
8
  description = "Crackerjack: code quality toolkit"
9
9
  readme = "README.md"
10
10
  keywords = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: crackerjack
3
- Version: 0.20.1
3
+ Version: 0.20.2
4
4
  Summary: Crackerjack: code quality toolkit
5
5
  Keywords: bandit,black,creosote,mypy,pyright,pytest,refurb,ruff
6
6
  Author-Email: lesleslie <les@wedgwoodwebworks.com>
@@ -192,9 +192,35 @@ Crackerjack provides advanced testing capabilities powered by pytest:
192
192
  ### Standard Testing
193
193
 
194
194
  - **Parallel Test Execution:** Tests run in parallel by default using pytest-xdist for faster execution
195
- - **Timeout Protection:** All tests have a default 60-second timeout to prevent hanging tests
195
+ - **Smart Parallelization:** Automatically adjusts the number of worker processes based on project size
196
+ - **Timeout Protection:** Tests have dynamic timeouts based on project size to prevent hanging tests
196
197
  - **Coverage Reports:** Automatically generates test coverage reports with configurable thresholds
197
198
 
199
+ ### Advanced Test Configuration
200
+
201
+ Crackerjack offers fine-grained control over test execution:
202
+
203
+ - **Worker Control:** Set the number of parallel workers with `--test-workers` (0 = auto-detect, 1 = disable parallelization)
204
+ - **Timeout Control:** Customize test timeouts with `--test-timeout` (in seconds)
205
+ - **Project Size Detection:** Automatically detects project size and adjusts timeout and parallelization settings
206
+ - **Deadlock Prevention:** Uses advanced threading techniques to prevent deadlocks in test output processing
207
+ - **Progress Tracking:** Shows periodic heartbeat messages for long-running tests
208
+
209
+ Example test execution options:
210
+ ```bash
211
+ # Run tests with a single worker (no parallelization)
212
+ python -m crackerjack -t --test-workers=1
213
+
214
+ # Run tests with a specific number of workers (e.g., 4)
215
+ python -m crackerjack -t --test-workers=4
216
+
217
+ # Run tests with a custom timeout (5 minutes per test)
218
+ python -m crackerjack -t --test-timeout=300
219
+
220
+ # Combine options for maximum control
221
+ python -m crackerjack -t --test-workers=2 --test-timeout=600
222
+ ```
223
+
198
224
  ### Benchmark Testing
199
225
 
200
226
  Crackerjack includes benchmark testing capabilities:
@@ -278,10 +304,16 @@ class MyOptions:
278
304
  # Process options
279
305
  self.clean = True # Clean code (remove docstrings, comments, etc.)
280
306
  self.test = True # Run tests using pytest
307
+ self.skip_hooks = False # Skip running pre-commit hooks
308
+
309
+ # Test execution options
310
+ self.test_workers = 2 # Number of parallel workers (0 = auto-detect, 1 = disable parallelization)
311
+ self.test_timeout = 120 # Timeout in seconds for individual tests (0 = use default based on project size)
312
+
313
+ # Benchmark options
281
314
  self.benchmark = False # Run tests in benchmark mode
282
315
  self.benchmark_regression = False # Fail tests if benchmarks regress beyond threshold
283
316
  self.benchmark_regression_threshold = 5.0 # Threshold percentage for benchmark regression
284
- self.skip_hooks = False # Skip running pre-commit hooks
285
317
 
286
318
  # Version and publishing options
287
319
  self.publish = None # Publish to PyPI (micro, minor, major)
@@ -321,6 +353,8 @@ runner.process(MyOptions())
321
353
  - `-s`, `--skip-hooks`: Skip running pre-commit hooks (useful with `-t`).
322
354
  - `-x`, `--clean`: Clean code by removing docstrings, line comments, and extra whitespace.
323
355
  - `-t`, `--test`: Run tests using `pytest`.
356
+ - `--test-workers`: Set the number of parallel workers for testing (0 = auto-detect, 1 = disable parallelization).
357
+ - `--test-timeout`: Set the timeout in seconds for individual tests (0 = use default based on project size).
324
358
  - `--benchmark`: Run tests in benchmark mode (disables parallel execution).
325
359
  - `--benchmark-regression`: Fail tests if benchmarks regress beyond threshold.
326
360
  - `--benchmark-regression-threshold`: Set threshold percentage for benchmark regression (default 5.0%).
@@ -356,6 +390,28 @@ runner.process(MyOptions())
356
390
  python -m crackerjack -t -s
357
391
  ```
358
392
 
393
+ #### Test Execution Options
394
+
395
+ - **Single-Process Testing** - Run tests sequentially (no parallelization):
396
+ ```bash
397
+ python -m crackerjack -t --test-workers=1
398
+ ```
399
+
400
+ - **Customized Parallel Testing** - Run tests with a specific number of workers:
401
+ ```bash
402
+ python -m crackerjack -t --test-workers=4
403
+ ```
404
+
405
+ - **Long-Running Tests** - Increase test timeout for complex tests:
406
+ ```bash
407
+ python -m crackerjack -t --test-timeout=600
408
+ ```
409
+
410
+ - **Optimized for Large Projects** - Reduce workers and increase timeout for large codebases:
411
+ ```bash
412
+ python -m crackerjack -t --test-workers=2 --test-timeout=300
413
+ ```
414
+
359
415
  #### Version Management
360
416
 
361
417
  - **Bump and Publish** - Bump version and publish to PyPI:
@@ -1,7 +1,7 @@
1
- crackerjack-0.20.1.dist-info/METADATA,sha256=dl2tB6kLCgYAilZFtJ6-dwGjBrOysINM3ODPIBfVRW0,24058
2
- crackerjack-0.20.1.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
3
- crackerjack-0.20.1.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
- crackerjack-0.20.1.dist-info/licenses/LICENSE,sha256=fDt371P6_6sCu7RyqiZH_AhT1LdN3sN1zjBtqEhDYCk,1531
1
+ crackerjack-0.20.2.dist-info/METADATA,sha256=JxIeMJ6WVmtpOW1CYU2eP6mLxb36wqiZNOIHYWcVZ8I,26354
2
+ crackerjack-0.20.2.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
3
+ crackerjack-0.20.2.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
4
+ crackerjack-0.20.2.dist-info/licenses/LICENSE,sha256=fDt371P6_6sCu7RyqiZH_AhT1LdN3sN1zjBtqEhDYCk,1531
5
5
  crackerjack/.gitignore,sha256=4DYG7ZoVEHR5Tv1gQliRWmsNku5Fw2_k756cG_t12Cg,185
6
6
  crackerjack/.libcst.codemod.yaml,sha256=a8DlErRAIPV1nE6QlyXPAzTOgkB24_spl2E9hphuf5s,772
7
7
  crackerjack/.pdm.toml,sha256=dZe44HRcuxxCFESGG8SZIjmc-cGzSoyK3Hs6t4NYA8w,23
@@ -23,7 +23,7 @@ crackerjack/.ruff_cache/0.11.12/16869036553936192448,sha256=pYYUCDrYh7fPq8xkFLxv
23
23
  crackerjack/.ruff_cache/0.11.12/1867267426380906393,sha256=2w4M0Lrjd9flwuq6uJxehTbm7FVUcK5sL2sz1gS2Yvo,256
24
24
  crackerjack/.ruff_cache/0.11.12/4240757255861806333,sha256=uph5uIRG-XnF7ywAEcCxqqgIkWALPCvJFcwCgnNfTI4,77
25
25
  crackerjack/.ruff_cache/0.11.12/4441409093023629623,sha256=eHrESew3XCFJ2WqmKvtGLO1r4mY5Q_mv7yGlDmM1sSc,153
26
- crackerjack/.ruff_cache/0.11.13/1867267426380906393,sha256=AbmV8fLx3w4rzckJWjY4fxme4qFC8RaJefGdR6WFJkM,256
26
+ crackerjack/.ruff_cache/0.11.13/1867267426380906393,sha256=-JUoRdDv_1mo2i4m_u0dAa9ByNdbOSvEGWE_LiSl6tc,256
27
27
  crackerjack/.ruff_cache/0.11.2/4070660268492669020,sha256=FTRTUmvj6nZw_QQBp_WHI-h3_iqRejzL39api-9wTvs,224
28
28
  crackerjack/.ruff_cache/0.11.3/9818742842212983150,sha256=U-4mT__a-OljovvAJvv5M6X7TCMa3dReLXx3kTNGgwU,224
29
29
  crackerjack/.ruff_cache/0.11.4/9818742842212983150,sha256=QF9j6-3MH_d0pDNotdbF2hlqCL66SxN8OLVKR3PZyZU,224
@@ -64,5 +64,5 @@ crackerjack/crackerjack.py,sha256=OWw-EyQzDZsoxH-snikhxuQL8t0Es4MD9bsGfu6zwv4,52
64
64
  crackerjack/errors.py,sha256=OtbmtA912kzDOWVo6JASuFbaMU-VhmQD_fUNsvnWCZc,4311
65
65
  crackerjack/interactive.py,sha256=Ay7_s3pc4ntc_3F_bRKBsWxmjor6nkN9v6tqqJe1iRw,15904
66
66
  crackerjack/py313.py,sha256=VgthlcpLL6nNDcg3evvEmGNYWCdMuojnMhow58ISEdY,6184
67
- crackerjack/pyproject.toml,sha256=UGmBtEKuo7DxmbiWwC1DQvOyhtCKXY_08j1T0lxGU3Q,4843
68
- crackerjack-0.20.1.dist-info/RECORD,,
67
+ crackerjack/pyproject.toml,sha256=2SSoGzy_2YAUS7Tuf8nnShK3JTRCc0mBHEdm89QUQ4E,4843
68
+ crackerjack-0.20.2.dist-info/RECORD,,