crackerjack 0.18.0__tar.gz → 0.18.1__tar.gz

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.
Files changed (68) hide show
  1. {crackerjack-0.18.0 → crackerjack-0.18.1}/PKG-INFO +141 -74
  2. {crackerjack-0.18.0 → crackerjack-0.18.1}/README.md +140 -73
  3. crackerjack-0.18.1/crackerjack/.ruff_cache/0.11.8/530407680854991027 +0 -0
  4. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/pyproject.toml +1 -1
  5. {crackerjack-0.18.0 → crackerjack-0.18.1}/pyproject.toml +1 -1
  6. crackerjack-0.18.0/crackerjack/.ruff_cache/0.11.8/530407680854991027 +0 -0
  7. {crackerjack-0.18.0 → crackerjack-0.18.1}/LICENSE +0 -0
  8. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.gitignore +0 -0
  9. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.libcst.codemod.yaml +0 -0
  10. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.pdm.toml +0 -0
  11. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.pre-commit-config.yaml +0 -0
  12. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.pytest_cache/.gitignore +0 -0
  13. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.pytest_cache/CACHEDIR.TAG +0 -0
  14. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.pytest_cache/README.md +0 -0
  15. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.pytest_cache/v/cache/nodeids +0 -0
  16. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.pytest_cache/v/cache/stepwise +0 -0
  17. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/.gitignore +0 -0
  18. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.1.11/3256171999636029978 +0 -0
  19. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.1.14/602324811142551221 +0 -0
  20. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.1.4/10355199064880463147 +0 -0
  21. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.1.6/15140459877605758699 +0 -0
  22. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.1.7/1790508110482614856 +0 -0
  23. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.1.9/17041001205004563469 +0 -0
  24. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.11.2/4070660268492669020 +0 -0
  25. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.11.3/9818742842212983150 +0 -0
  26. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.11.4/9818742842212983150 +0 -0
  27. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.11.6/3557596832929915217 +0 -0
  28. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.11.7/10386934055395314831 +0 -0
  29. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.11.7/3557596832929915217 +0 -0
  30. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.2.0/10047773857155985907 +0 -0
  31. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.2.1/8522267973936635051 +0 -0
  32. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.2.2/18053836298936336950 +0 -0
  33. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.3.0/12548816621480535786 +0 -0
  34. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.3.3/11081883392474770722 +0 -0
  35. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.3.4/676973378459347183 +0 -0
  36. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.3.5/16311176246009842383 +0 -0
  37. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.5.7/1493622539551733492 +0 -0
  38. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.5.7/6231957614044513175 +0 -0
  39. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.5.7/9932762556785938009 +0 -0
  40. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.6.0/11982804814124138945 +0 -0
  41. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.6.0/12055761203849489982 +0 -0
  42. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.6.2/1206147804896221174 +0 -0
  43. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.6.4/1206147804896221174 +0 -0
  44. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.6.5/1206147804896221174 +0 -0
  45. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.6.7/3657366982708166874 +0 -0
  46. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.6.9/285614542852677309 +0 -0
  47. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.7.1/1024065805990144819 +0 -0
  48. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.7.1/285614542852677309 +0 -0
  49. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.7.3/16061516852537040135 +0 -0
  50. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.8.4/16354268377385700367 +0 -0
  51. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.9.10/12813592349865671909 +0 -0
  52. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.9.10/923908772239632759 +0 -0
  53. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.9.3/13948373885254993391 +0 -0
  54. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.9.9/12813592349865671909 +0 -0
  55. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/0.9.9/8843823720003377982 +0 -0
  56. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/.ruff_cache/CACHEDIR.TAG +0 -0
  57. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/__init__.py +0 -0
  58. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/__main__.py +0 -0
  59. {crackerjack-0.18.0 → crackerjack-0.18.1}/crackerjack/crackerjack.py +0 -0
  60. {crackerjack-0.18.0 → crackerjack-0.18.1}/tests/README.md +0 -0
  61. {crackerjack-0.18.0 → crackerjack-0.18.1}/tests/__init__.py +0 -0
  62. {crackerjack-0.18.0 → crackerjack-0.18.1}/tests/data/comments_sample.txt +0 -0
  63. {crackerjack-0.18.0 → crackerjack-0.18.1}/tests/data/docstrings_sample.txt +0 -0
  64. {crackerjack-0.18.0 → crackerjack-0.18.1}/tests/data/expected_comments_sample.txt +0 -0
  65. {crackerjack-0.18.0 → crackerjack-0.18.1}/tests/data/init.py +0 -0
  66. {crackerjack-0.18.0 → crackerjack-0.18.1}/tests/test_crackerjack.py +0 -0
  67. {crackerjack-0.18.0 → crackerjack-0.18.1}/tests/test_crackerjack_runner.py +0 -0
  68. {crackerjack-0.18.0 → crackerjack-0.18.1}/tests/test_main.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: crackerjack
3
- Version: 0.18.0
3
+ Version: 0.18.1
4
4
  Summary: Default template for PDM package
5
5
  Keywords: black,ruff,mypy,creosote,refurb
6
6
  Author-Email: lesleslie <les@wedgwoodwebworks.com>
@@ -53,18 +53,25 @@ Description-Content-Type: text/markdown
53
53
 
54
54
  ## What is Crackerjack?
55
55
 
56
- Crackerjack is an opinionated Python project management tool designed to solve common challenges in Python development:
56
+ Crackerjack is an opinionated Python project management tool that streamlines the entire development lifecycle. It combines best-in-class tools into a unified workflow, allowing you to focus on writing code rather than configuring tools.
57
57
 
58
- - **Problem**: Setting up Python projects with best practices is time-consuming and requires knowledge of many tools
59
- - **Solution**: Crackerjack automates project setup with pre-configured best practices and tools
58
+ ### Why Choose Crackerjack?
60
59
 
61
- - **Problem**: Maintaining consistent code quality across a project is difficult
62
- - **Solution**: Crackerjack enforces a consistent style and quality standard through integrated linting, formatting, and pre-commit hooks
60
+ Crackerjack solves three critical challenges in Python development:
63
61
 
64
- - **Problem**: Publishing Python packages involves many manual steps
65
- - **Solution**: Crackerjack streamlines the entire development lifecycle from code cleaning to testing to version bumping to publishing
62
+ 1. **Project Setup & Configuration**
63
+ - **Challenge**: Setting up Python projects with best practices requires knowledge of numerous tools and configurations
64
+ - **Solution**: Crackerjack automates project initialization with pre-configured templates and industry best practices
66
65
 
67
- Crackerjack combines best-in-class tools (Ruff, PDM, pre-commit, pytest, and more) into a single, streamlined workflow to ensure code quality, consistency, and reliability. It's designed for Python developers who want to focus on writing code rather than configuring tools.
66
+ 2. **Code Quality & Consistency**
67
+ - **Challenge**: Maintaining consistent code quality across a project and team requires constant vigilance
68
+ - **Solution**: Crackerjack enforces a unified style through integrated linting, formatting, and pre-commit hooks
69
+
70
+ 3. **Streamlined Publishing**
71
+ - **Challenge**: Publishing Python packages involves many manual, error-prone steps
72
+ - **Solution**: Crackerjack automates the entire release process from testing to version bumping to publishing
73
+
74
+ Crackerjack integrates powerful tools like Ruff, PDM, pre-commit, pytest, and more into a cohesive system that ensures code quality, consistency, and reliability. It's designed for developers who value both productivity and excellence.
68
75
 
69
76
  ---
70
77
 
@@ -104,19 +111,33 @@ Crackerjack is built on the following core principles:
104
111
 
105
112
  ## Key Features
106
113
 
107
- Crackerjack provides:
108
-
109
- - **Effortless Project Setup:** Initializes new Python projects with a standard directory structure, `pyproject.toml`, and essential configuration files.
110
- - **PDM Integration:** Manages dependencies and virtual environments using [PDM](https://pdm.fming.dev/) (with [uv](https://github.com/astral-sh/uv) enabled for speed).
111
- - **Automated Code Cleaning:** Removes unnecessary docstrings, line comments, and trailing whitespace.
112
- - **Consistent Code Formatting:** Enforces a consistent style using [Ruff](https://github.com/astral-sh/ruff), the lightning-fast Python linter and formatter.
113
- - **Comprehensive Pre-commit Hooks:** Installs and manages a robust suite of pre-commit hooks to ensure code quality (see the "Pre-commit Hooks" section below).
114
- - **Interactive Checks:** Supports interactive pre-commit hooks (like `refurb`, `bandit`, and `pyright`) to allow you to fix issues in real-time.
115
- - **Built-in Testing:** Automatically runs tests using `pytest`.
116
- - **Easy Version Bumping:** Provides commands to bump the project version (micro, minor, or major).
117
- - **Simplified Publishing:** Automates publishing to PyPI via PDM.
118
- - **Commit and Push:** Commits and pushes your changes.
119
- - **Pull Request Creation:** Creates pull requests to upstream repositories on GitHub or GitLab.
114
+ ### Project Management
115
+ - **Effortless Project Setup:** Initializes new Python projects with a standard directory structure, `pyproject.toml`, and essential configuration files
116
+ - **PDM Integration:** Manages dependencies and virtual environments using [PDM](https://pdm.fming.dev/) with [uv](https://github.com/astral-sh/uv) for lightning-fast package operations
117
+ - **Dependency Management:** Automatically detects and manages project dependencies
118
+
119
+ ### Code Quality
120
+ - **Automated Code Cleaning:** Removes unnecessary docstrings, line comments, and trailing whitespace
121
+ - **Consistent Code Formatting:** Enforces a unified style using [Ruff](https://github.com/astral-sh/ruff), the lightning-fast Python linter and formatter
122
+ - **Comprehensive Pre-commit Hooks:** Installs and manages a robust suite of pre-commit hooks (see the "Pre-commit Hooks" section below)
123
+ - **Interactive Checks:** Supports interactive pre-commit hooks (like `refurb`, `bandit`, and `pyright`) to fix issues in real-time
124
+ - **Static Type Checking:** Enforces type safety with Pyright integration
125
+
126
+ ### Testing & Deployment
127
+ - **Built-in Testing:** Automatically runs tests using `pytest`
128
+ - **Easy Version Bumping:** Provides commands to bump the project version (micro, minor, or major)
129
+ - **Simplified Publishing:** Automates publishing to PyPI via PDM
130
+
131
+ ### Git Integration
132
+ - **Commit and Push:** Commits and pushes your changes with standardized commit messages
133
+ - **Pull Request Creation:** Creates pull requests to upstream repositories on GitHub or GitLab
134
+ - **Pre-commit Integration:** Ensures code quality before commits
135
+
136
+ ### Developer Experience
137
+ - **Command-Line Interface:** Simple, intuitive CLI with comprehensive options
138
+ - **Programmatic API:** Can be integrated into your own Python scripts and workflows
139
+ - **AI Agent Integration:** Structured output format for integration with AI assistants
140
+ - **Verbose Mode:** Detailed output for debugging and understanding what's happening
120
141
 
121
142
  ## Pre-commit Hooks
122
143
 
@@ -191,24 +212,38 @@ from crackerjack import create_crackerjack_runner
191
212
  # Create a custom options object
192
213
  class MyOptions:
193
214
  def __init__(self):
194
- self.commit = False
195
- self.interactive = True
196
- self.doc = False
197
- self.no_config_updates = False
198
- self.verbose = True
199
- self.update_precommit = False
200
- self.clean = True
201
- self.test = True
202
- self.publish = None
203
- self.bump = "micro"
204
- self.all = None
205
- self.create_pr = False
215
+ # Core options
216
+ self.commit = False # Commit changes to Git
217
+ self.interactive = True # Run pre-commit hooks interactively
218
+ self.verbose = True # Enable verbose output
219
+
220
+ # Configuration options
221
+ self.no_config_updates = False # Skip updating config files
222
+ self.update_precommit = False # Update pre-commit hooks
223
+ self.doc = False # Generate documentation (not implemented yet)
224
+
225
+ # Process options
226
+ self.clean = True # Clean code (remove docstrings, comments, etc.)
227
+ self.test = True # Run tests using pytest
228
+ self.skip_hooks = False # Skip running pre-commit hooks
229
+
230
+ # Version and publishing options
231
+ self.publish = None # Publish to PyPI (micro, minor, major)
232
+ self.bump = "micro" # Bump version (micro, minor, major)
233
+ self.all = None # Run with -x -t -p <version> -c
234
+
235
+ # Git options
236
+ self.create_pr = False # Create a pull request
237
+
238
+ # Integration options
239
+ self.ai_agent = False # Enable AI agent structured output
206
240
 
207
241
  # Create a Crackerjack runner with custom settings
208
242
  runner = create_crackerjack_runner(
209
- console=Console(force_terminal=True),
210
- pkg_path=Path.cwd(),
211
- python_version="3.13"
243
+ console=Console(force_terminal=True), # Rich console for pretty output
244
+ pkg_path=Path.cwd(), # Path to your project
245
+ python_version="3.13", # Target Python version
246
+ dry_run=False # Set to True to simulate without changes
212
247
  )
213
248
 
214
249
  # Run Crackerjack with your options
@@ -227,6 +262,7 @@ runner.process(MyOptions())
227
262
  - `-p`, `--publish <micro|minor|major>`: Bump the project version and publish to PyPI using PDM.
228
263
  - `-b`, `--bump <micro|minor|major>`: Bump the project version without publishing.
229
264
  - `-r`, `--pr`: Create a pull request to the upstream repository.
265
+ - `-s`, `--skip-hooks`: Skip running pre-commit hooks (useful with `-t`).
230
266
  - `-x`, `--clean`: Clean code by removing docstrings, line comments, and extra whitespace.
231
267
  - `-t`, `--test`: Run tests using `pytest`.
232
268
  - `-a`, `--all`: Run with `-x -t -p <micro|minor|major> -c` development options.
@@ -235,53 +271,84 @@ runner.process(MyOptions())
235
271
 
236
272
  ### Example Workflows
237
273
 
238
- - **Run checks, bump version, publish, then commit:**
239
- ```
240
- python -m crackerjack -p minor -c
241
- ```
274
+ #### Development Workflows
242
275
 
243
- - **Clean code, run checks, run tests, then commit:**
244
- ```
245
- python -m crackerjack -c -x -t
246
- ```
276
+ - **Quick Check** - Run basic checks on your code:
277
+ ```bash
278
+ python -m crackerjack
279
+ ```
247
280
 
248
- - **Run checks skipping config updates:**
249
- ```
250
- python -m crackerjack -n
251
- ```
281
+ - **Full Development Cycle** - Clean, test, bump version, publish, and commit:
282
+ ```bash
283
+ python -m crackerjack -a minor # All-in-one command
252
284
 
253
- - **Bump the version and publish to PyPI:**
254
- ```
255
- python -m crackerjack -p micro
256
- ```
285
+ # Equivalent to:
286
+ python -m crackerjack -x -t -p minor -c
287
+ ```
257
288
 
258
- - **Bump the version without publishing:**
259
- ```
260
- python -m crackerjack -b major
261
- ```
289
+ - **Development with Tests** - Clean code, run checks, run tests, then commit:
290
+ ```bash
291
+ python -m crackerjack -c -x -t
292
+ ```
262
293
 
263
- - **Update pre-commit hooks:**
264
- ```
265
- python -m crackerjack -u
266
- ```
294
+ - **Fast Testing** - Run tests without running pre-commit hooks:
295
+ ```bash
296
+ python -m crackerjack -t -s
297
+ ```
267
298
 
268
- - **Create a pull request to the upstream repository:**
269
- ```
270
- python -m crackerjack -r
271
- ```
299
+ #### Version Management
272
300
 
273
- - **Get help:**
274
- ```
275
- python -m crackerjack --help
276
- ```
301
+ - **Bump and Publish** - Bump version and publish to PyPI:
302
+ ```bash
303
+ python -m crackerjack -p micro # For patch version
304
+ python -m crackerjack -p minor # For minor version
305
+ python -m crackerjack -p major # For major version
306
+ ```
277
307
 
278
- - **Clean code, run checks, run tests, bump version, publish, then commit:**
279
- ```
280
- python -m crackerjack -x -t -p minor -c
308
+ - **Version Bump Only** - Bump version without publishing:
309
+ ```bash
310
+ python -m crackerjack -b major
311
+ ```
312
+
313
+ #### Configuration Management
314
+
315
+ - **Skip Config Updates** - Run checks without updating configuration files:
316
+ ```bash
317
+ python -m crackerjack -n
318
+ ```
281
319
 
282
- # or even easier
320
+ - **Update Hooks** - Update pre-commit hooks to latest versions:
321
+ ```bash
322
+ python -m crackerjack -u
323
+ ```
324
+
325
+ #### Git Operations
326
+
327
+ - **Commit Changes** - Run checks and commit changes:
328
+ ```bash
329
+ python -m crackerjack -c
330
+ ```
331
+
332
+ - **Create PR** - Create a pull request to the upstream repository:
333
+ ```bash
334
+ python -m crackerjack -r
335
+ ```
336
+
337
+ #### Other Operations
338
+
339
+ - **Interactive Mode** - Run pre-commit hooks interactively:
340
+ ```bash
341
+ python -m crackerjack -i
342
+ ```
343
+
344
+ - **AI Integration** - Run with structured output for AI tools:
345
+ ```bash
346
+ python -m crackerjack --ai-agent --test
347
+ ```
283
348
 
284
- python -m crackerjack -a minor
349
+ - **Help** - Display command help:
350
+ ```bash
351
+ python -m crackerjack --help
285
352
  ```
286
353
 
287
354
  ## AI Agent Integration
@@ -13,18 +13,25 @@
13
13
 
14
14
  ## What is Crackerjack?
15
15
 
16
- Crackerjack is an opinionated Python project management tool designed to solve common challenges in Python development:
16
+ Crackerjack is an opinionated Python project management tool that streamlines the entire development lifecycle. It combines best-in-class tools into a unified workflow, allowing you to focus on writing code rather than configuring tools.
17
17
 
18
- - **Problem**: Setting up Python projects with best practices is time-consuming and requires knowledge of many tools
19
- - **Solution**: Crackerjack automates project setup with pre-configured best practices and tools
18
+ ### Why Choose Crackerjack?
20
19
 
21
- - **Problem**: Maintaining consistent code quality across a project is difficult
22
- - **Solution**: Crackerjack enforces a consistent style and quality standard through integrated linting, formatting, and pre-commit hooks
20
+ Crackerjack solves three critical challenges in Python development:
23
21
 
24
- - **Problem**: Publishing Python packages involves many manual steps
25
- - **Solution**: Crackerjack streamlines the entire development lifecycle from code cleaning to testing to version bumping to publishing
22
+ 1. **Project Setup & Configuration**
23
+ - **Challenge**: Setting up Python projects with best practices requires knowledge of numerous tools and configurations
24
+ - **Solution**: Crackerjack automates project initialization with pre-configured templates and industry best practices
26
25
 
27
- Crackerjack combines best-in-class tools (Ruff, PDM, pre-commit, pytest, and more) into a single, streamlined workflow to ensure code quality, consistency, and reliability. It's designed for Python developers who want to focus on writing code rather than configuring tools.
26
+ 2. **Code Quality & Consistency**
27
+ - **Challenge**: Maintaining consistent code quality across a project and team requires constant vigilance
28
+ - **Solution**: Crackerjack enforces a unified style through integrated linting, formatting, and pre-commit hooks
29
+
30
+ 3. **Streamlined Publishing**
31
+ - **Challenge**: Publishing Python packages involves many manual, error-prone steps
32
+ - **Solution**: Crackerjack automates the entire release process from testing to version bumping to publishing
33
+
34
+ Crackerjack integrates powerful tools like Ruff, PDM, pre-commit, pytest, and more into a cohesive system that ensures code quality, consistency, and reliability. It's designed for developers who value both productivity and excellence.
28
35
 
29
36
  ---
30
37
 
@@ -64,19 +71,33 @@ Crackerjack is built on the following core principles:
64
71
 
65
72
  ## Key Features
66
73
 
67
- Crackerjack provides:
68
-
69
- - **Effortless Project Setup:** Initializes new Python projects with a standard directory structure, `pyproject.toml`, and essential configuration files.
70
- - **PDM Integration:** Manages dependencies and virtual environments using [PDM](https://pdm.fming.dev/) (with [uv](https://github.com/astral-sh/uv) enabled for speed).
71
- - **Automated Code Cleaning:** Removes unnecessary docstrings, line comments, and trailing whitespace.
72
- - **Consistent Code Formatting:** Enforces a consistent style using [Ruff](https://github.com/astral-sh/ruff), the lightning-fast Python linter and formatter.
73
- - **Comprehensive Pre-commit Hooks:** Installs and manages a robust suite of pre-commit hooks to ensure code quality (see the "Pre-commit Hooks" section below).
74
- - **Interactive Checks:** Supports interactive pre-commit hooks (like `refurb`, `bandit`, and `pyright`) to allow you to fix issues in real-time.
75
- - **Built-in Testing:** Automatically runs tests using `pytest`.
76
- - **Easy Version Bumping:** Provides commands to bump the project version (micro, minor, or major).
77
- - **Simplified Publishing:** Automates publishing to PyPI via PDM.
78
- - **Commit and Push:** Commits and pushes your changes.
79
- - **Pull Request Creation:** Creates pull requests to upstream repositories on GitHub or GitLab.
74
+ ### Project Management
75
+ - **Effortless Project Setup:** Initializes new Python projects with a standard directory structure, `pyproject.toml`, and essential configuration files
76
+ - **PDM Integration:** Manages dependencies and virtual environments using [PDM](https://pdm.fming.dev/) with [uv](https://github.com/astral-sh/uv) for lightning-fast package operations
77
+ - **Dependency Management:** Automatically detects and manages project dependencies
78
+
79
+ ### Code Quality
80
+ - **Automated Code Cleaning:** Removes unnecessary docstrings, line comments, and trailing whitespace
81
+ - **Consistent Code Formatting:** Enforces a unified style using [Ruff](https://github.com/astral-sh/ruff), the lightning-fast Python linter and formatter
82
+ - **Comprehensive Pre-commit Hooks:** Installs and manages a robust suite of pre-commit hooks (see the "Pre-commit Hooks" section below)
83
+ - **Interactive Checks:** Supports interactive pre-commit hooks (like `refurb`, `bandit`, and `pyright`) to fix issues in real-time
84
+ - **Static Type Checking:** Enforces type safety with Pyright integration
85
+
86
+ ### Testing & Deployment
87
+ - **Built-in Testing:** Automatically runs tests using `pytest`
88
+ - **Easy Version Bumping:** Provides commands to bump the project version (micro, minor, or major)
89
+ - **Simplified Publishing:** Automates publishing to PyPI via PDM
90
+
91
+ ### Git Integration
92
+ - **Commit and Push:** Commits and pushes your changes with standardized commit messages
93
+ - **Pull Request Creation:** Creates pull requests to upstream repositories on GitHub or GitLab
94
+ - **Pre-commit Integration:** Ensures code quality before commits
95
+
96
+ ### Developer Experience
97
+ - **Command-Line Interface:** Simple, intuitive CLI with comprehensive options
98
+ - **Programmatic API:** Can be integrated into your own Python scripts and workflows
99
+ - **AI Agent Integration:** Structured output format for integration with AI assistants
100
+ - **Verbose Mode:** Detailed output for debugging and understanding what's happening
80
101
 
81
102
  ## Pre-commit Hooks
82
103
 
@@ -151,24 +172,38 @@ from crackerjack import create_crackerjack_runner
151
172
  # Create a custom options object
152
173
  class MyOptions:
153
174
  def __init__(self):
154
- self.commit = False
155
- self.interactive = True
156
- self.doc = False
157
- self.no_config_updates = False
158
- self.verbose = True
159
- self.update_precommit = False
160
- self.clean = True
161
- self.test = True
162
- self.publish = None
163
- self.bump = "micro"
164
- self.all = None
165
- self.create_pr = False
175
+ # Core options
176
+ self.commit = False # Commit changes to Git
177
+ self.interactive = True # Run pre-commit hooks interactively
178
+ self.verbose = True # Enable verbose output
179
+
180
+ # Configuration options
181
+ self.no_config_updates = False # Skip updating config files
182
+ self.update_precommit = False # Update pre-commit hooks
183
+ self.doc = False # Generate documentation (not implemented yet)
184
+
185
+ # Process options
186
+ self.clean = True # Clean code (remove docstrings, comments, etc.)
187
+ self.test = True # Run tests using pytest
188
+ self.skip_hooks = False # Skip running pre-commit hooks
189
+
190
+ # Version and publishing options
191
+ self.publish = None # Publish to PyPI (micro, minor, major)
192
+ self.bump = "micro" # Bump version (micro, minor, major)
193
+ self.all = None # Run with -x -t -p <version> -c
194
+
195
+ # Git options
196
+ self.create_pr = False # Create a pull request
197
+
198
+ # Integration options
199
+ self.ai_agent = False # Enable AI agent structured output
166
200
 
167
201
  # Create a Crackerjack runner with custom settings
168
202
  runner = create_crackerjack_runner(
169
- console=Console(force_terminal=True),
170
- pkg_path=Path.cwd(),
171
- python_version="3.13"
203
+ console=Console(force_terminal=True), # Rich console for pretty output
204
+ pkg_path=Path.cwd(), # Path to your project
205
+ python_version="3.13", # Target Python version
206
+ dry_run=False # Set to True to simulate without changes
172
207
  )
173
208
 
174
209
  # Run Crackerjack with your options
@@ -187,6 +222,7 @@ runner.process(MyOptions())
187
222
  - `-p`, `--publish <micro|minor|major>`: Bump the project version and publish to PyPI using PDM.
188
223
  - `-b`, `--bump <micro|minor|major>`: Bump the project version without publishing.
189
224
  - `-r`, `--pr`: Create a pull request to the upstream repository.
225
+ - `-s`, `--skip-hooks`: Skip running pre-commit hooks (useful with `-t`).
190
226
  - `-x`, `--clean`: Clean code by removing docstrings, line comments, and extra whitespace.
191
227
  - `-t`, `--test`: Run tests using `pytest`.
192
228
  - `-a`, `--all`: Run with `-x -t -p <micro|minor|major> -c` development options.
@@ -195,53 +231,84 @@ runner.process(MyOptions())
195
231
 
196
232
  ### Example Workflows
197
233
 
198
- - **Run checks, bump version, publish, then commit:**
199
- ```
200
- python -m crackerjack -p minor -c
201
- ```
234
+ #### Development Workflows
202
235
 
203
- - **Clean code, run checks, run tests, then commit:**
204
- ```
205
- python -m crackerjack -c -x -t
206
- ```
236
+ - **Quick Check** - Run basic checks on your code:
237
+ ```bash
238
+ python -m crackerjack
239
+ ```
207
240
 
208
- - **Run checks skipping config updates:**
209
- ```
210
- python -m crackerjack -n
211
- ```
241
+ - **Full Development Cycle** - Clean, test, bump version, publish, and commit:
242
+ ```bash
243
+ python -m crackerjack -a minor # All-in-one command
212
244
 
213
- - **Bump the version and publish to PyPI:**
214
- ```
215
- python -m crackerjack -p micro
216
- ```
245
+ # Equivalent to:
246
+ python -m crackerjack -x -t -p minor -c
247
+ ```
217
248
 
218
- - **Bump the version without publishing:**
219
- ```
220
- python -m crackerjack -b major
221
- ```
249
+ - **Development with Tests** - Clean code, run checks, run tests, then commit:
250
+ ```bash
251
+ python -m crackerjack -c -x -t
252
+ ```
222
253
 
223
- - **Update pre-commit hooks:**
224
- ```
225
- python -m crackerjack -u
226
- ```
254
+ - **Fast Testing** - Run tests without running pre-commit hooks:
255
+ ```bash
256
+ python -m crackerjack -t -s
257
+ ```
227
258
 
228
- - **Create a pull request to the upstream repository:**
229
- ```
230
- python -m crackerjack -r
231
- ```
259
+ #### Version Management
232
260
 
233
- - **Get help:**
234
- ```
235
- python -m crackerjack --help
236
- ```
261
+ - **Bump and Publish** - Bump version and publish to PyPI:
262
+ ```bash
263
+ python -m crackerjack -p micro # For patch version
264
+ python -m crackerjack -p minor # For minor version
265
+ python -m crackerjack -p major # For major version
266
+ ```
237
267
 
238
- - **Clean code, run checks, run tests, bump version, publish, then commit:**
239
- ```
240
- python -m crackerjack -x -t -p minor -c
268
+ - **Version Bump Only** - Bump version without publishing:
269
+ ```bash
270
+ python -m crackerjack -b major
271
+ ```
272
+
273
+ #### Configuration Management
274
+
275
+ - **Skip Config Updates** - Run checks without updating configuration files:
276
+ ```bash
277
+ python -m crackerjack -n
278
+ ```
241
279
 
242
- # or even easier
280
+ - **Update Hooks** - Update pre-commit hooks to latest versions:
281
+ ```bash
282
+ python -m crackerjack -u
283
+ ```
284
+
285
+ #### Git Operations
286
+
287
+ - **Commit Changes** - Run checks and commit changes:
288
+ ```bash
289
+ python -m crackerjack -c
290
+ ```
291
+
292
+ - **Create PR** - Create a pull request to the upstream repository:
293
+ ```bash
294
+ python -m crackerjack -r
295
+ ```
296
+
297
+ #### Other Operations
298
+
299
+ - **Interactive Mode** - Run pre-commit hooks interactively:
300
+ ```bash
301
+ python -m crackerjack -i
302
+ ```
303
+
304
+ - **AI Integration** - Run with structured output for AI tools:
305
+ ```bash
306
+ python -m crackerjack --ai-agent --test
307
+ ```
243
308
 
244
- python -m crackerjack -a minor
309
+ - **Help** - Display command help:
310
+ ```bash
311
+ python -m crackerjack --help
245
312
  ```
246
313
 
247
314
  ## AI Agent Integration
@@ -152,7 +152,7 @@ pythonPlatform = "Darwin"
152
152
 
153
153
  [project]
154
154
  name = "crackerjack"
155
- version = "0.17.4"
155
+ version = "0.18.0"
156
156
  description = "Default template for PDM package"
157
157
  requires-python = ">=3.13"
158
158
  readme = "README.md"
@@ -171,7 +171,7 @@ pythonPlatform = "Darwin"
171
171
 
172
172
  [project]
173
173
  name = "crackerjack"
174
- version = "0.18.0"
174
+ version = "0.18.1"
175
175
  description = "Default template for PDM package"
176
176
  requires-python = ">=3.13"
177
177
  readme = "README.md"
File without changes