crackerjack 0.18.0__py3-none-any.whl → 0.18.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.
- crackerjack/.ruff_cache/0.11.8/530407680854991027 +0 -0
- crackerjack/pyproject.toml +1 -1
- {crackerjack-0.18.0.dist-info → crackerjack-0.18.1.dist-info}/METADATA +141 -74
- {crackerjack-0.18.0.dist-info → crackerjack-0.18.1.dist-info}/RECORD +7 -7
- {crackerjack-0.18.0.dist-info → crackerjack-0.18.1.dist-info}/WHEEL +0 -0
- {crackerjack-0.18.0.dist-info → crackerjack-0.18.1.dist-info}/entry_points.txt +0 -0
- {crackerjack-0.18.0.dist-info → crackerjack-0.18.1.dist-info}/licenses/LICENSE +0 -0
Binary file
|
crackerjack/pyproject.toml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: crackerjack
|
3
|
-
Version: 0.18.
|
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
|
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
|
-
|
59
|
-
- **Solution**: Crackerjack automates project setup with pre-configured best practices and tools
|
58
|
+
### Why Choose Crackerjack?
|
60
59
|
|
61
|
-
|
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
|
-
|
65
|
-
- **
|
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
|
-
|
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
|
-
|
108
|
-
|
109
|
-
-
|
110
|
-
-
|
111
|
-
|
112
|
-
|
113
|
-
-
|
114
|
-
-
|
115
|
-
-
|
116
|
-
-
|
117
|
-
-
|
118
|
-
|
119
|
-
|
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
|
-
|
195
|
-
self.
|
196
|
-
self.
|
197
|
-
self.
|
198
|
-
|
199
|
-
|
200
|
-
self.
|
201
|
-
self.
|
202
|
-
self.
|
203
|
-
|
204
|
-
|
205
|
-
self.
|
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
|
-
|
239
|
-
```
|
240
|
-
python -m crackerjack -p minor -c
|
241
|
-
```
|
274
|
+
#### Development Workflows
|
242
275
|
|
243
|
-
-
|
244
|
-
|
245
|
-
|
246
|
-
|
276
|
+
- **Quick Check** - Run basic checks on your code:
|
277
|
+
```bash
|
278
|
+
python -m crackerjack
|
279
|
+
```
|
247
280
|
|
248
|
-
-
|
249
|
-
|
250
|
-
|
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
|
-
|
254
|
-
|
255
|
-
|
256
|
-
```
|
285
|
+
# Equivalent to:
|
286
|
+
python -m crackerjack -x -t -p minor -c
|
287
|
+
```
|
257
288
|
|
258
|
-
-
|
259
|
-
|
260
|
-
|
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
|
-
- **
|
264
|
-
|
265
|
-
|
266
|
-
|
294
|
+
- **Fast Testing** - Run tests without running pre-commit hooks:
|
295
|
+
```bash
|
296
|
+
python -m crackerjack -t -s
|
297
|
+
```
|
267
298
|
|
268
|
-
|
269
|
-
```
|
270
|
-
python -m crackerjack -r
|
271
|
-
```
|
299
|
+
#### Version Management
|
272
300
|
|
273
|
-
- **
|
274
|
-
|
275
|
-
|
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
|
-
- **
|
279
|
-
|
280
|
-
python -m crackerjack -
|
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
|
-
|
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
|
-
|
349
|
+
- **Help** - Display command help:
|
350
|
+
```bash
|
351
|
+
python -m crackerjack --help
|
285
352
|
```
|
286
353
|
|
287
354
|
## AI Agent Integration
|
@@ -1,7 +1,7 @@
|
|
1
|
-
crackerjack-0.18.
|
2
|
-
crackerjack-0.18.
|
3
|
-
crackerjack-0.18.
|
4
|
-
crackerjack-0.18.
|
1
|
+
crackerjack-0.18.1.dist-info/METADATA,sha256=n7uXNTLnzmO9c__WFDUjM2tXnCUkKU-PvkReWmHzykY,17747
|
2
|
+
crackerjack-0.18.1.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
|
3
|
+
crackerjack-0.18.1.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
4
|
+
crackerjack-0.18.1.dist-info/licenses/LICENSE,sha256=fDt371P6_6sCu7RyqiZH_AhT1LdN3sN1zjBtqEhDYCk,1531
|
5
5
|
crackerjack/.gitignore,sha256=oho3dNx7a7y36_y9AsalCkssU4in0MMsNAANWdc-h1c,153
|
6
6
|
crackerjack/.libcst.codemod.yaml,sha256=a8DlErRAIPV1nE6QlyXPAzTOgkB24_spl2E9hphuf5s,772
|
7
7
|
crackerjack/.pdm.toml,sha256=dZe44HRcuxxCFESGG8SZIjmc-cGzSoyK3Hs6t4NYA8w,23
|
@@ -24,7 +24,7 @@ crackerjack/.ruff_cache/0.11.4/9818742842212983150,sha256=QF9j6-3MH_d0pDNotdbF2h
|
|
24
24
|
crackerjack/.ruff_cache/0.11.6/3557596832929915217,sha256=yR2iXWDkSHVRw2eTiaCE8Eh34JPRUGc8vE3HYEEBk9k,224
|
25
25
|
crackerjack/.ruff_cache/0.11.7/10386934055395314831,sha256=lBNwN5zAgM4OzbkXIOzCczUtfooATrD10htj9ASlFkc,224
|
26
26
|
crackerjack/.ruff_cache/0.11.7/3557596832929915217,sha256=fKlwUbsvT3YIKV6UR-aA_i64lLignWeVfVu-MMmVbU0,207
|
27
|
-
crackerjack/.ruff_cache/0.11.8/530407680854991027,sha256=
|
27
|
+
crackerjack/.ruff_cache/0.11.8/530407680854991027,sha256=G5OzHZdMbB_wqFgzzKInpUDR2v19Qj2w8EdWm8zlR88,224
|
28
28
|
crackerjack/.ruff_cache/0.2.0/10047773857155985907,sha256=j9LNa_RQ4Plor7go1uTYgz17cEENKvZQ-dP6b9MX0ik,248
|
29
29
|
crackerjack/.ruff_cache/0.2.1/8522267973936635051,sha256=u_aPBMibtAp_iYvLwR88GMAECMcIgHezxMyuapmU2P4,248
|
30
30
|
crackerjack/.ruff_cache/0.2.2/18053836298936336950,sha256=Xb_ebP0pVuUfSqPEZKlhQ70so_vqkEfMYpuHQ06iR5U,248
|
@@ -55,5 +55,5 @@ crackerjack/.ruff_cache/CACHEDIR.TAG,sha256=WVMVbX4MVkpCclExbq8m-IcOZIOuIZf5FrYw
|
|
55
55
|
crackerjack/__init__.py,sha256=r9SuEjHUrW99hFWifRk4ofmYPSgf9rblcnzqhdV5bP0,157
|
56
56
|
crackerjack/__main__.py,sha256=FDAcn9NYoQ7q01YDtdxUgKz3RloItUc-Z8x5kBGcemA,4557
|
57
57
|
crackerjack/crackerjack.py,sha256=07yDkbj0ChR5hnqTC6zJw5Bx9YuP9cQad6G3Jbq9OyE,33512
|
58
|
-
crackerjack/pyproject.toml,sha256=
|
59
|
-
crackerjack-0.18.
|
58
|
+
crackerjack/pyproject.toml,sha256=zb6cU5lId5Qmh0Xl-gHt-sMeuB-ROmeVRUj_3ikra94,4199
|
59
|
+
crackerjack-0.18.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|