crackerjack 0.22.8__tar.gz → 0.24.0__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.

Potentially problematic release.


This version of crackerjack might be problematic. Click here for more details.

Files changed (103) hide show
  1. crackerjack-0.24.0/.envrc +1 -0
  2. crackerjack-0.24.0/.github/FUNDING.yml +1 -0
  3. {crackerjack-0.22.8/crackerjack → crackerjack-0.24.0}/.pre-commit-config-ai.yaml +2 -11
  4. {crackerjack-0.22.8/crackerjack → crackerjack-0.24.0}/.pre-commit-config.yaml +2 -9
  5. crackerjack-0.24.0/.windsurfrules +188 -0
  6. crackerjack-0.24.0/CLAUDE.md +550 -0
  7. {crackerjack-0.22.8 → crackerjack-0.24.0}/PKG-INFO +24 -25
  8. crackerjack-0.24.0/README-AI-AGENT.md +314 -0
  9. {crackerjack-0.22.8 → crackerjack-0.24.0}/README.md +13 -14
  10. crackerjack-0.24.0/RULES.md +152 -0
  11. crackerjack-0.24.0/crackerjack/.gitignore +20 -0
  12. crackerjack-0.24.0/crackerjack/.libcst.codemod.yaml +18 -0
  13. crackerjack-0.24.0/crackerjack/.pre-commit-config-ai.yaml +126 -0
  14. crackerjack-0.24.0/crackerjack/.pre-commit-config.yaml +100 -0
  15. {crackerjack-0.22.8 → crackerjack-0.24.0}/crackerjack/crackerjack.py +66 -26
  16. {crackerjack-0.22.8 → crackerjack-0.24.0}/crackerjack/pyproject.toml +5 -7
  17. crackerjack-0.24.0/pdm.lock +1042 -0
  18. {crackerjack-0.22.8 → crackerjack-0.24.0}/pyproject.toml +38 -62
  19. {crackerjack-0.22.8 → crackerjack-0.24.0}/tests/test_crackerjack.py +30 -23
  20. {crackerjack-0.22.8 → crackerjack-0.24.0}/tests/test_structured_errors.py +1 -1
  21. crackerjack-0.24.0/uv.lock +759 -0
  22. crackerjack-0.22.8/crackerjack/.pytest_cache/.gitignore +0 -2
  23. crackerjack-0.22.8/crackerjack/.pytest_cache/CACHEDIR.TAG +0 -4
  24. crackerjack-0.22.8/crackerjack/.pytest_cache/README.md +0 -8
  25. crackerjack-0.22.8/crackerjack/.pytest_cache/v/cache/nodeids +0 -1
  26. crackerjack-0.22.8/crackerjack/.pytest_cache/v/cache/stepwise +0 -1
  27. crackerjack-0.22.8/crackerjack/.ruff_cache/.gitignore +0 -1
  28. crackerjack-0.22.8/crackerjack/.ruff_cache/0.1.11/3256171999636029978 +0 -0
  29. crackerjack-0.22.8/crackerjack/.ruff_cache/0.1.14/602324811142551221 +0 -0
  30. crackerjack-0.22.8/crackerjack/.ruff_cache/0.1.4/10355199064880463147 +0 -0
  31. crackerjack-0.22.8/crackerjack/.ruff_cache/0.1.6/15140459877605758699 +0 -0
  32. crackerjack-0.22.8/crackerjack/.ruff_cache/0.1.7/1790508110482614856 +0 -0
  33. crackerjack-0.22.8/crackerjack/.ruff_cache/0.1.9/17041001205004563469 +0 -0
  34. crackerjack-0.22.8/crackerjack/.ruff_cache/0.11.11/18187162184424859798 +0 -0
  35. crackerjack-0.22.8/crackerjack/.ruff_cache/0.11.12/16869036553936192448 +0 -0
  36. crackerjack-0.22.8/crackerjack/.ruff_cache/0.11.12/1867267426380906393 +0 -0
  37. crackerjack-0.22.8/crackerjack/.ruff_cache/0.11.12/4240757255861806333 +0 -0
  38. crackerjack-0.22.8/crackerjack/.ruff_cache/0.11.12/4441409093023629623 +0 -0
  39. crackerjack-0.22.8/crackerjack/.ruff_cache/0.11.13/1867267426380906393 +0 -0
  40. crackerjack-0.22.8/crackerjack/.ruff_cache/0.11.13/4240757255861806333 +0 -0
  41. crackerjack-0.22.8/crackerjack/.ruff_cache/0.11.2/4070660268492669020 +0 -0
  42. crackerjack-0.22.8/crackerjack/.ruff_cache/0.11.3/9818742842212983150 +0 -0
  43. crackerjack-0.22.8/crackerjack/.ruff_cache/0.11.4/9818742842212983150 +0 -0
  44. crackerjack-0.22.8/crackerjack/.ruff_cache/0.11.6/3557596832929915217 +0 -0
  45. crackerjack-0.22.8/crackerjack/.ruff_cache/0.11.7/10386934055395314831 +0 -0
  46. crackerjack-0.22.8/crackerjack/.ruff_cache/0.11.7/3557596832929915217 +0 -0
  47. crackerjack-0.22.8/crackerjack/.ruff_cache/0.11.8/530407680854991027 +0 -0
  48. crackerjack-0.22.8/crackerjack/.ruff_cache/0.12.0/5056746222905752453 +0 -0
  49. crackerjack-0.22.8/crackerjack/.ruff_cache/0.12.1/5056746222905752453 +0 -0
  50. crackerjack-0.22.8/crackerjack/.ruff_cache/0.12.2/5056746222905752453 +0 -0
  51. crackerjack-0.22.8/crackerjack/.ruff_cache/0.12.3/5056746222905752453 +0 -0
  52. crackerjack-0.22.8/crackerjack/.ruff_cache/0.2.0/10047773857155985907 +0 -0
  53. crackerjack-0.22.8/crackerjack/.ruff_cache/0.2.1/8522267973936635051 +0 -0
  54. crackerjack-0.22.8/crackerjack/.ruff_cache/0.2.2/18053836298936336950 +0 -0
  55. crackerjack-0.22.8/crackerjack/.ruff_cache/0.3.0/12548816621480535786 +0 -0
  56. crackerjack-0.22.8/crackerjack/.ruff_cache/0.3.3/11081883392474770722 +0 -0
  57. crackerjack-0.22.8/crackerjack/.ruff_cache/0.3.4/676973378459347183 +0 -0
  58. crackerjack-0.22.8/crackerjack/.ruff_cache/0.3.5/16311176246009842383 +0 -0
  59. crackerjack-0.22.8/crackerjack/.ruff_cache/0.5.7/1493622539551733492 +0 -0
  60. crackerjack-0.22.8/crackerjack/.ruff_cache/0.5.7/6231957614044513175 +0 -0
  61. crackerjack-0.22.8/crackerjack/.ruff_cache/0.5.7/9932762556785938009 +0 -0
  62. crackerjack-0.22.8/crackerjack/.ruff_cache/0.6.0/11982804814124138945 +0 -0
  63. crackerjack-0.22.8/crackerjack/.ruff_cache/0.6.0/12055761203849489982 +0 -0
  64. crackerjack-0.22.8/crackerjack/.ruff_cache/0.6.2/1206147804896221174 +0 -0
  65. crackerjack-0.22.8/crackerjack/.ruff_cache/0.6.4/1206147804896221174 +0 -0
  66. crackerjack-0.22.8/crackerjack/.ruff_cache/0.6.5/1206147804896221174 +0 -0
  67. crackerjack-0.22.8/crackerjack/.ruff_cache/0.6.7/3657366982708166874 +0 -0
  68. crackerjack-0.22.8/crackerjack/.ruff_cache/0.6.9/285614542852677309 +0 -0
  69. crackerjack-0.22.8/crackerjack/.ruff_cache/0.7.1/1024065805990144819 +0 -0
  70. crackerjack-0.22.8/crackerjack/.ruff_cache/0.7.1/285614542852677309 +0 -0
  71. crackerjack-0.22.8/crackerjack/.ruff_cache/0.7.3/16061516852537040135 +0 -0
  72. crackerjack-0.22.8/crackerjack/.ruff_cache/0.8.4/16354268377385700367 +0 -0
  73. crackerjack-0.22.8/crackerjack/.ruff_cache/0.9.10/12813592349865671909 +0 -0
  74. crackerjack-0.22.8/crackerjack/.ruff_cache/0.9.10/923908772239632759 +0 -0
  75. crackerjack-0.22.8/crackerjack/.ruff_cache/0.9.3/13948373885254993391 +0 -0
  76. crackerjack-0.22.8/crackerjack/.ruff_cache/0.9.9/12813592349865671909 +0 -0
  77. crackerjack-0.22.8/crackerjack/.ruff_cache/0.9.9/8843823720003377982 +0 -0
  78. crackerjack-0.22.8/crackerjack/.ruff_cache/CACHEDIR.TAG +0 -1
  79. {crackerjack-0.22.8/crackerjack → crackerjack-0.24.0}/.gitignore +0 -0
  80. {crackerjack-0.22.8/crackerjack → crackerjack-0.24.0}/.libcst.codemod.yaml +0 -0
  81. {crackerjack-0.22.8 → crackerjack-0.24.0}/LICENSE +0 -0
  82. {crackerjack-0.22.8 → crackerjack-0.24.0}/crackerjack/.pdm.toml +0 -0
  83. {crackerjack-0.22.8 → crackerjack-0.24.0}/crackerjack/__init__.py +0 -0
  84. {crackerjack-0.22.8 → crackerjack-0.24.0}/crackerjack/__main__.py +0 -0
  85. {crackerjack-0.22.8 → crackerjack-0.24.0}/crackerjack/errors.py +0 -0
  86. {crackerjack-0.22.8 → crackerjack-0.24.0}/crackerjack/interactive.py +0 -0
  87. {crackerjack-0.22.8 → crackerjack-0.24.0}/crackerjack/py313.py +0 -0
  88. {crackerjack-0.22.8 → crackerjack-0.24.0}/tests/TESTING.md +0 -0
  89. {crackerjack-0.22.8 → crackerjack-0.24.0}/tests/__init__.py +0 -0
  90. {crackerjack-0.22.8 → crackerjack-0.24.0}/tests/conftest.py +0 -0
  91. {crackerjack-0.22.8 → crackerjack-0.24.0}/tests/data/comments_sample.txt +0 -0
  92. {crackerjack-0.22.8 → crackerjack-0.24.0}/tests/data/docstrings_sample.txt +0 -0
  93. {crackerjack-0.22.8 → crackerjack-0.24.0}/tests/data/expected_comments_sample.txt +0 -0
  94. {crackerjack-0.22.8 → crackerjack-0.24.0}/tests/data/init.py +0 -0
  95. {crackerjack-0.22.8 → crackerjack-0.24.0}/tests/test_crackerjack_runner.py +0 -0
  96. {crackerjack-0.22.8 → crackerjack-0.24.0}/tests/test_errors.py +0 -0
  97. {crackerjack-0.22.8 → crackerjack-0.24.0}/tests/test_interactive.py +0 -0
  98. {crackerjack-0.22.8 → crackerjack-0.24.0}/tests/test_interactive_run.py +0 -0
  99. {crackerjack-0.22.8 → crackerjack-0.24.0}/tests/test_main.py +0 -0
  100. {crackerjack-0.22.8 → crackerjack-0.24.0}/tests/test_multiline_functions.py +0 -0
  101. {crackerjack-0.22.8 → crackerjack-0.24.0}/tests/test_py313_advanced.py +0 -0
  102. {crackerjack-0.22.8 → crackerjack-0.24.0}/tests/test_py313_features.py +0 -0
  103. {crackerjack-0.22.8 → crackerjack-0.24.0}/tests/test_pytest_features.py +0 -0
@@ -0,0 +1 @@
1
+ layout uv
@@ -0,0 +1 @@
1
+ github: [lesleslie]
@@ -29,19 +29,10 @@ repos:
29
29
  rev: "v2.6.0"
30
30
  hooks:
31
31
  - id: pyproject-fmt
32
+ args: ["-n"]
32
33
  verbose: true
33
34
 
34
35
  # Package management - once structure is valid
35
- - repo: https://github.com/pdm-project/pdm
36
- rev: 2.25.3
37
- hooks:
38
- - id: pdm-lock-check
39
- verbose: true
40
- - id: pdm-sync
41
- verbose: true
42
- additional_dependencies:
43
- - keyring
44
-
45
36
  - repo: https://github.com/astral-sh/uv-pre-commit
46
37
  rev: 0.7.15
47
38
  hooks:
@@ -54,7 +45,7 @@ repos:
54
45
  rev: v1.5.0
55
46
  hooks:
56
47
  - id: detect-secrets
57
- exclude: 'pdm\.lock|uv\.lock|pyproject\.toml|tests/.*|docs/.*|.*\.md'
48
+ exclude: 'uv\.lock|pyproject\.toml|tests/.*|docs/.*|.*\.md'
58
49
  verbose: true
59
50
 
60
51
  # Code quality tier 1 - quick fixes
@@ -18,16 +18,9 @@ repos:
18
18
  rev: "v2.6.0"
19
19
  hooks:
20
20
  - id: pyproject-fmt
21
+ args: ["-n"]
21
22
 
22
23
  # Package management - once structure is valid
23
- - repo: https://github.com/pdm-project/pdm
24
- rev: 2.25.4
25
- hooks:
26
- - id: pdm-lock-check
27
- - id: pdm-sync
28
- additional_dependencies:
29
- - keyring
30
-
31
24
  - repo: https://github.com/astral-sh/uv-pre-commit
32
25
  rev: 0.7.20
33
26
  hooks:
@@ -39,7 +32,7 @@ repos:
39
32
  rev: v1.5.0
40
33
  hooks:
41
34
  - id: detect-secrets
42
- exclude: 'pdm\.lock|uv\.lock|pyproject\.toml|tests/.*|docs/.*|.*\.md'
35
+ exclude: 'uv\.lock|pyproject\.toml|tests/.*|docs/.*|.*\.md'
43
36
 
44
37
  # Code quality tier 1 - quick fixes
45
38
  - repo: https://github.com/codespell-project/codespell
@@ -0,0 +1,188 @@
1
+ # Windsurf AI Rules for Crackerjack Projects
2
+
3
+ ## Project Context
4
+ This is a Crackerjack project - an opinionated Python project management tool that streamlines development workflow by combining best-in-class tools. When working on this codebase or projects that use Crackerjack, follow these rules strictly.
5
+
6
+ ## Code Quality & Style
7
+
8
+ ### Static Typing Requirements
9
+ - Always include comprehensive type hints for all functions, methods, and variables
10
+ - Import typing as `import typing as t` and prefix all typing references with `t.`
11
+ - Never import individual types directly from typing (avoid `from typing import List, Dict, Optional`)
12
+ - Use modern typing syntax with pipe operator (`|`) for unions instead of `Optional[T]`
13
+ - Use built-in collection types: `list[str]` not `t.List[str]`, `dict[str, int]` not `t.Dict[str, int]`
14
+ - Use `t.Protocol` instead of abstract base classes
15
+ - Apply `@t.runtime_checkable` decorator to protocols when runtime checking is needed
16
+
17
+ ### Modern Python Standards
18
+ - Target Python 3.13+ features and syntax exclusively
19
+ - Use f-strings for all string formatting
20
+ - Prefer `pathlib.Path` over `os.path` for file operations
21
+ - Use dataclasses for structured data
22
+ - Adopt latest language features immediately
23
+
24
+ ### Code Architecture
25
+ - Write modular functions that do one thing well
26
+ - Avoid unnecessary docstrings and line comments unless they explain "why" not "what"
27
+ - Choose clear, descriptive variable and function names
28
+ - Group related functionality into well-defined classes
29
+ - Structure projects with clear separation of concerns
30
+
31
+ ## Tool Integration & Commands
32
+
33
+ ### PDM Usage
34
+ - Always use `pdm run` to execute tools within the project's virtual environment
35
+ - Run pytest with `pdm run pytest` instead of calling pytest directly
36
+ - Execute all tools through PDM: `pdm run pyright`, `pdm run ruff`, `pdm run crackerjack`
37
+ - Install dependencies with `pdm install`
38
+
39
+ ### Crackerjack Commands
40
+ - Run basic process: `python -m crackerjack`
41
+ - Clean, test, and commit: `python -m crackerjack -x -t -c`
42
+ - Auto bump and commit: `python -m crackerjack -a micro`
43
+ - Interactive mode: `python -m crackerjack -i`
44
+ - Test only: `python -m crackerjack -t`
45
+ - Skip pre-commit during testing: `python -m crackerjack -t -s`
46
+ - Optimize for large projects: `python -m crackerjack -t --test-workers=2 --test-timeout=300`
47
+
48
+ ### Quality Validation
49
+ - Code is incomplete until it passes: `python -m crackerjack -x -t`
50
+ - This validates typing, formatting, linting, and test success
51
+ - Run `pre-commit run --all-files` during development
52
+ - All code must pass pre-commit checks before submission
53
+
54
+ ## Testing Standards
55
+
56
+ ### Test Environment
57
+ - Use pytest with asyncio_mode="auto" for async testing
58
+ - Never create files directly on filesystem in tests
59
+ - Always use `tempfile` module or pytest's `tmp_path` fixtures
60
+ - Tests must be isolated and not affect surrounding environment
61
+ - Avoid hard-coded paths pointing to real filesystem
62
+
63
+ ### Test Configuration
64
+ - Write tests for behavior, not implementation details
65
+ - Focus on testing public interfaces rather than private functions
66
+ - Use parallel test execution when appropriate
67
+ - Add timeouts to prevent hanging tests
68
+ - Separate unit tests, integration tests, and benchmarks
69
+ - Aim for complete coverage of critical paths
70
+
71
+ ### Benchmark Testing
72
+ - Run benchmarks: `python -m crackerjack -t --benchmark`
73
+ - Regression detection: `python -m crackerjack -t --benchmark-regression`
74
+ - Custom threshold: `python -m crackerjack -t --benchmark-regression --benchmark-regression-threshold=10.0`
75
+
76
+ ## Error Handling & Output
77
+
78
+ ### Exception Management
79
+ - Use structured exception handling with specific exception types
80
+ - Provide meaningful error messages with context
81
+ - Handle errors gracefully and provide actionable feedback
82
+
83
+ ### Console Output
84
+ - Use Rich library for all console output
85
+ - Provide clear status indicators for operations
86
+ - Format output for readability and user experience
87
+
88
+ ## Development Workflow
89
+
90
+ ### Pre-commit Hooks
91
+ Configure comprehensive pre-commit hooks:
92
+ - Pyright for static type checking
93
+ - Ruff for linting and formatting
94
+ - Vulture for detecting unused code
95
+ - Creosote for identifying large files
96
+ - Flynt for string formatting conversion
97
+ - Codespell for spell checking
98
+ - Autotyping for type annotation
99
+ - Refurb for Python code modernization
100
+ - Bandit for security vulnerabilities
101
+
102
+ ### Version Management
103
+ - Use semantic versioning
104
+ - Bump versions through Crackerjack: `-b micro|minor|major`
105
+ - Publish to PyPI: `-p micro|minor|major`
106
+ - Version bumping handled through PDM
107
+
108
+ ### Git Operations
109
+ - Commit after pre-commit: `python -m crackerjack -c`
110
+ - Create pull requests: `python -m crackerjack -r`
111
+ - Never commit changes unless explicitly requested
112
+
113
+ ## Dependency Management
114
+
115
+ ### Package Management
116
+ - Use PDM with uv for dependency management
117
+ - Keep external dependencies minimal
118
+ - Pin exact versions in lockfiles
119
+ - Use range specifications in pyproject.toml
120
+ - Regularly audit dependencies for security
121
+ - Prefer standard library solutions when reasonable
122
+
123
+ ### Configuration
124
+ - Use pyproject.toml for all project configuration
125
+ - Follow standard package layout conventions
126
+ - Configure all tools through pyproject.toml when possible
127
+
128
+ ## Performance & Optimization
129
+
130
+ ### Code Performance
131
+ - Use profiling tools for critical code paths
132
+ - Benchmark alternative implementations
133
+ - Favor readability over micro-optimizations
134
+ - Document non-obvious optimizations with rationale
135
+
136
+ ### Test Performance
137
+ - Adjust test workers based on project size
138
+ - Use appropriate timeouts for test execution
139
+ - Implement deadlock prevention for threading
140
+ - Show progress tracking for long-running tests
141
+
142
+ ## Documentation Philosophy
143
+
144
+ ### Minimalist Approach
145
+ - Focus documentation on "why" rather than "what"
146
+ - Document APIs at module/class level, not individual functions
147
+ - Use type hints to replace parameter documentation
148
+ - Create examples for complex functionality
149
+ - Avoid verbose explanations
150
+
151
+ ## Security & Best Practices
152
+
153
+ ### Security Standards
154
+ - Never expose or log secrets and keys
155
+ - Never commit secrets to repository
156
+ - Use Bandit for security vulnerability scanning
157
+ - Follow security best practices consistently
158
+
159
+ ### Code Review
160
+ - All code must be reviewed before merging
161
+ - Automate style checks to focus reviews on substance
162
+ - Look for edge cases and error handling
163
+ - Ensure tests adequately cover changes
164
+
165
+ ## Project-Specific Guidelines
166
+
167
+ ### For Crackerjack Core Development
168
+ - Maintain the opinionated nature of the tool
169
+ - Enforce single correct way to accomplish tasks
170
+ - Remove unnecessary flexibility that leads to inconsistency
171
+ - Value clarity over brevity
172
+
173
+ ### For Projects Using Crackerjack
174
+ - Follow all Crackerjack style rules
175
+ - Use Crackerjack for all development workflow tasks
176
+ - Configure projects to pass `python -m crackerjack -x -t`
177
+ - Adopt Crackerjack's opinionated choices consistently
178
+
179
+ ## AI Assistant Instructions
180
+
181
+ When working on Crackerjack or projects using Crackerjack:
182
+ 1. Always check code against these rules before suggesting changes
183
+ 2. Run appropriate Crackerjack commands to validate changes
184
+ 3. Ensure all code follows the typing and style guidelines
185
+ 4. Use PDM for all tool execution
186
+ 5. Test changes thoroughly with appropriate timeouts
187
+ 6. Never compromise on code quality standards
188
+ 7. Maintain the opinionated, high-quality nature of the project