unitsauce 0.1.0__tar.gz → 0.1.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.
@@ -0,0 +1,163 @@
1
+ Metadata-Version: 2.4
2
+ Name: unitsauce
3
+ Version: 0.1.1
4
+ Summary: AI-powered test failure analysis and fix suggestions
5
+ Author: Zan Starasinic
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/zanstarasinic/unitsauce
8
+ Requires-Python: >=3.10
9
+ Description-Content-Type: text/markdown
10
+ Requires-Dist: anthropic
11
+ Requires-Dist: python-dotenv
12
+ Requires-Dist: art
13
+ Requires-Dist: rich
14
+ Requires-Dist: pytest
15
+ Requires-Dist: pytest-json-report
16
+
17
+ # UnitSauce
18
+
19
+ AI-powered test failure analysis and auto-fix for Python projects.
20
+
21
+ UnitSauce analyzes failing tests, identifies bugs in your code changes, and generates fixes using Claude AI. Works as a CLI tool or GitHub Action.
22
+
23
+ ---
24
+
25
+ ## Features
26
+
27
+ - **Automatic failure detection** — Runs pytest and identifies failing tests
28
+ - **AI-powered analysis** — Uses Claude to understand the bug from git diff
29
+ - **Smart fixes** — Generates minimal code or test fixes
30
+ - **Verification** — Confirms the fix actually works before reporting
31
+ - **PR comments** — Posts fix suggestions directly to your pull request
32
+
33
+ ---
34
+
35
+ ## Quick Start
36
+
37
+ ### CLI Usage
38
+ ```bash
39
+ pip install unitsauce
40
+ ```
41
+ ```bash
42
+ # Auto-detect whether to fix code or test
43
+ unitsauce /path/to/project
44
+
45
+ # Force fix code only
46
+ unitsauce /path/to/project --mode code
47
+
48
+ # Force fix test only
49
+ unitsauce /path/to/project --mode test
50
+
51
+ # Output as markdown
52
+ unitsauce /path/to/project --output markdown
53
+ ```
54
+
55
+ ### GitHub Action
56
+
57
+ Add to your workflow (`.github/workflows/test.yml`):
58
+ ```yaml
59
+ name: Tests
60
+ on:
61
+ pull_request:
62
+
63
+ permissions:
64
+ pull-requests: write
65
+
66
+ jobs:
67
+ test:
68
+ runs-on: ubuntu-latest
69
+ steps:
70
+ - uses: actions/checkout@v4
71
+ with:
72
+ fetch-depth: 2
73
+
74
+ - uses: actions/setup-python@v5
75
+ with:
76
+ python-version: '3.11'
77
+
78
+ - name: Install dependencies
79
+ run: pip install pytest
80
+
81
+ - name: Run tests
82
+ run: pytest
83
+
84
+ - name: UnitSauce Analysis
85
+ if: failure()
86
+ uses: zanstarasinic/unitsauce@main
87
+ env:
88
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
90
+ ```
91
+
92
+ ---
93
+
94
+ ## Configuration
95
+
96
+ ### CLI Options
97
+
98
+ | Option | Description | Default |
99
+ |--------|-------------|---------|
100
+ | `--mode` | `auto`, `code`, or `test` | `auto` |
101
+ | `--output` | `console`, `markdown`, or `json` | `console` |
102
+
103
+ ### Environment Variables
104
+
105
+ | Variable | Required | Description |
106
+ |----------|----------|-------------|
107
+ | `ANTHROPIC_API_KEY` | Yes | Your Anthropic API key |
108
+ | `GITHUB_TOKEN` | For PR comments | Provided automatically by GitHub Actions |
109
+
110
+ ---
111
+
112
+ ## Requirements
113
+
114
+ - Python 3.10+
115
+ - Git repository
116
+ - Anthropic API key
117
+ - pytest
118
+
119
+ ---
120
+
121
+ ## How It Works
122
+
123
+ 1. Detects failures — Runs pytest and collects failing tests
124
+ 2. Analyzes changes — Gets git diff to see what changed
125
+ 3. Identifies affected code — Maps failures to modified functions
126
+ 4. Generates fix — Sends context to Claude, gets minimal fix
127
+ 5. Verifies — Applies fix, runs test again to confirm
128
+ 6. Reports — Shows diff or posts PR comment
129
+
130
+ ---
131
+
132
+ ## Example PR Comment
133
+ ```
134
+ UnitSauce Analysis
135
+
136
+ Found 1 failing test(s), fixed 1.
137
+
138
+ ---
139
+
140
+ test_calculator.py::test_add
141
+
142
+ Error: assert 6 == 5
143
+
144
+ Fixed by: Updating test in test_calculator.py
145
+
146
+ - assert add(2, 3) == 5
147
+ + assert add(2, 3) == 6
148
+ ```
149
+
150
+ ---
151
+
152
+ ## Local Development
153
+ ```bash
154
+ git clone https://github.com/zanstarasinic/unitsauce.git
155
+ cd unitsauce
156
+ pip install -e .
157
+ ```
158
+
159
+ ---
160
+
161
+ ## License
162
+
163
+ MIT
@@ -0,0 +1,147 @@
1
+ # UnitSauce
2
+
3
+ AI-powered test failure analysis and auto-fix for Python projects.
4
+
5
+ UnitSauce analyzes failing tests, identifies bugs in your code changes, and generates fixes using Claude AI. Works as a CLI tool or GitHub Action.
6
+
7
+ ---
8
+
9
+ ## Features
10
+
11
+ - **Automatic failure detection** — Runs pytest and identifies failing tests
12
+ - **AI-powered analysis** — Uses Claude to understand the bug from git diff
13
+ - **Smart fixes** — Generates minimal code or test fixes
14
+ - **Verification** — Confirms the fix actually works before reporting
15
+ - **PR comments** — Posts fix suggestions directly to your pull request
16
+
17
+ ---
18
+
19
+ ## Quick Start
20
+
21
+ ### CLI Usage
22
+ ```bash
23
+ pip install unitsauce
24
+ ```
25
+ ```bash
26
+ # Auto-detect whether to fix code or test
27
+ unitsauce /path/to/project
28
+
29
+ # Force fix code only
30
+ unitsauce /path/to/project --mode code
31
+
32
+ # Force fix test only
33
+ unitsauce /path/to/project --mode test
34
+
35
+ # Output as markdown
36
+ unitsauce /path/to/project --output markdown
37
+ ```
38
+
39
+ ### GitHub Action
40
+
41
+ Add to your workflow (`.github/workflows/test.yml`):
42
+ ```yaml
43
+ name: Tests
44
+ on:
45
+ pull_request:
46
+
47
+ permissions:
48
+ pull-requests: write
49
+
50
+ jobs:
51
+ test:
52
+ runs-on: ubuntu-latest
53
+ steps:
54
+ - uses: actions/checkout@v4
55
+ with:
56
+ fetch-depth: 2
57
+
58
+ - uses: actions/setup-python@v5
59
+ with:
60
+ python-version: '3.11'
61
+
62
+ - name: Install dependencies
63
+ run: pip install pytest
64
+
65
+ - name: Run tests
66
+ run: pytest
67
+
68
+ - name: UnitSauce Analysis
69
+ if: failure()
70
+ uses: zanstarasinic/unitsauce@main
71
+ env:
72
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
73
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
74
+ ```
75
+
76
+ ---
77
+
78
+ ## Configuration
79
+
80
+ ### CLI Options
81
+
82
+ | Option | Description | Default |
83
+ |--------|-------------|---------|
84
+ | `--mode` | `auto`, `code`, or `test` | `auto` |
85
+ | `--output` | `console`, `markdown`, or `json` | `console` |
86
+
87
+ ### Environment Variables
88
+
89
+ | Variable | Required | Description |
90
+ |----------|----------|-------------|
91
+ | `ANTHROPIC_API_KEY` | Yes | Your Anthropic API key |
92
+ | `GITHUB_TOKEN` | For PR comments | Provided automatically by GitHub Actions |
93
+
94
+ ---
95
+
96
+ ## Requirements
97
+
98
+ - Python 3.10+
99
+ - Git repository
100
+ - Anthropic API key
101
+ - pytest
102
+
103
+ ---
104
+
105
+ ## How It Works
106
+
107
+ 1. Detects failures — Runs pytest and collects failing tests
108
+ 2. Analyzes changes — Gets git diff to see what changed
109
+ 3. Identifies affected code — Maps failures to modified functions
110
+ 4. Generates fix — Sends context to Claude, gets minimal fix
111
+ 5. Verifies — Applies fix, runs test again to confirm
112
+ 6. Reports — Shows diff or posts PR comment
113
+
114
+ ---
115
+
116
+ ## Example PR Comment
117
+ ```
118
+ UnitSauce Analysis
119
+
120
+ Found 1 failing test(s), fixed 1.
121
+
122
+ ---
123
+
124
+ test_calculator.py::test_add
125
+
126
+ Error: assert 6 == 5
127
+
128
+ Fixed by: Updating test in test_calculator.py
129
+
130
+ - assert add(2, 3) == 5
131
+ + assert add(2, 3) == 6
132
+ ```
133
+
134
+ ---
135
+
136
+ ## Local Development
137
+ ```bash
138
+ git clone https://github.com/zanstarasinic/unitsauce.git
139
+ cd unitsauce
140
+ pip install -e .
141
+ ```
142
+
143
+ ---
144
+
145
+ ## License
146
+
147
+ MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "unitsauce"
7
- version = "0.1.0"
7
+ version = "0.1.1"
8
8
  description = "AI-powered test failure analysis and fix suggestions"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -0,0 +1,163 @@
1
+ Metadata-Version: 2.4
2
+ Name: unitsauce
3
+ Version: 0.1.1
4
+ Summary: AI-powered test failure analysis and fix suggestions
5
+ Author: Zan Starasinic
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/zanstarasinic/unitsauce
8
+ Requires-Python: >=3.10
9
+ Description-Content-Type: text/markdown
10
+ Requires-Dist: anthropic
11
+ Requires-Dist: python-dotenv
12
+ Requires-Dist: art
13
+ Requires-Dist: rich
14
+ Requires-Dist: pytest
15
+ Requires-Dist: pytest-json-report
16
+
17
+ # UnitSauce
18
+
19
+ AI-powered test failure analysis and auto-fix for Python projects.
20
+
21
+ UnitSauce analyzes failing tests, identifies bugs in your code changes, and generates fixes using Claude AI. Works as a CLI tool or GitHub Action.
22
+
23
+ ---
24
+
25
+ ## Features
26
+
27
+ - **Automatic failure detection** — Runs pytest and identifies failing tests
28
+ - **AI-powered analysis** — Uses Claude to understand the bug from git diff
29
+ - **Smart fixes** — Generates minimal code or test fixes
30
+ - **Verification** — Confirms the fix actually works before reporting
31
+ - **PR comments** — Posts fix suggestions directly to your pull request
32
+
33
+ ---
34
+
35
+ ## Quick Start
36
+
37
+ ### CLI Usage
38
+ ```bash
39
+ pip install unitsauce
40
+ ```
41
+ ```bash
42
+ # Auto-detect whether to fix code or test
43
+ unitsauce /path/to/project
44
+
45
+ # Force fix code only
46
+ unitsauce /path/to/project --mode code
47
+
48
+ # Force fix test only
49
+ unitsauce /path/to/project --mode test
50
+
51
+ # Output as markdown
52
+ unitsauce /path/to/project --output markdown
53
+ ```
54
+
55
+ ### GitHub Action
56
+
57
+ Add to your workflow (`.github/workflows/test.yml`):
58
+ ```yaml
59
+ name: Tests
60
+ on:
61
+ pull_request:
62
+
63
+ permissions:
64
+ pull-requests: write
65
+
66
+ jobs:
67
+ test:
68
+ runs-on: ubuntu-latest
69
+ steps:
70
+ - uses: actions/checkout@v4
71
+ with:
72
+ fetch-depth: 2
73
+
74
+ - uses: actions/setup-python@v5
75
+ with:
76
+ python-version: '3.11'
77
+
78
+ - name: Install dependencies
79
+ run: pip install pytest
80
+
81
+ - name: Run tests
82
+ run: pytest
83
+
84
+ - name: UnitSauce Analysis
85
+ if: failure()
86
+ uses: zanstarasinic/unitsauce@main
87
+ env:
88
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
89
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
90
+ ```
91
+
92
+ ---
93
+
94
+ ## Configuration
95
+
96
+ ### CLI Options
97
+
98
+ | Option | Description | Default |
99
+ |--------|-------------|---------|
100
+ | `--mode` | `auto`, `code`, or `test` | `auto` |
101
+ | `--output` | `console`, `markdown`, or `json` | `console` |
102
+
103
+ ### Environment Variables
104
+
105
+ | Variable | Required | Description |
106
+ |----------|----------|-------------|
107
+ | `ANTHROPIC_API_KEY` | Yes | Your Anthropic API key |
108
+ | `GITHUB_TOKEN` | For PR comments | Provided automatically by GitHub Actions |
109
+
110
+ ---
111
+
112
+ ## Requirements
113
+
114
+ - Python 3.10+
115
+ - Git repository
116
+ - Anthropic API key
117
+ - pytest
118
+
119
+ ---
120
+
121
+ ## How It Works
122
+
123
+ 1. Detects failures — Runs pytest and collects failing tests
124
+ 2. Analyzes changes — Gets git diff to see what changed
125
+ 3. Identifies affected code — Maps failures to modified functions
126
+ 4. Generates fix — Sends context to Claude, gets minimal fix
127
+ 5. Verifies — Applies fix, runs test again to confirm
128
+ 6. Reports — Shows diff or posts PR comment
129
+
130
+ ---
131
+
132
+ ## Example PR Comment
133
+ ```
134
+ UnitSauce Analysis
135
+
136
+ Found 1 failing test(s), fixed 1.
137
+
138
+ ---
139
+
140
+ test_calculator.py::test_add
141
+
142
+ Error: assert 6 == 5
143
+
144
+ Fixed by: Updating test in test_calculator.py
145
+
146
+ - assert add(2, 3) == 5
147
+ + assert add(2, 3) == 6
148
+ ```
149
+
150
+ ---
151
+
152
+ ## Local Development
153
+ ```bash
154
+ git clone https://github.com/zanstarasinic/unitsauce.git
155
+ cd unitsauce
156
+ pip install -e .
157
+ ```
158
+
159
+ ---
160
+
161
+ ## License
162
+
163
+ MIT
unitsauce-0.1.0/PKG-INFO DELETED
@@ -1,48 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: unitsauce
3
- Version: 0.1.0
4
- Summary: AI-powered test failure analysis and fix suggestions
5
- Author: Zan Starasinic
6
- License: MIT
7
- Project-URL: Homepage, https://github.com/zanstarasinic/unitsauce
8
- Requires-Python: >=3.10
9
- Description-Content-Type: text/markdown
10
- Requires-Dist: anthropic
11
- Requires-Dist: python-dotenv
12
- Requires-Dist: art
13
- Requires-Dist: rich
14
- Requires-Dist: pytest
15
- Requires-Dist: pytest-json-report
16
-
17
- # UnitSauce
18
-
19
- AI-powered test fixer for Python projects.
20
-
21
- ## What it does
22
-
23
- Analyzes failing tests, identifies bugs in recent code changes, and suggests fixes using Claude.
24
-
25
- ## Install
26
- ```bash
27
- pip install -r requirements.txt
28
- cp .env.example .env
29
- # Add your Anthropic API key to .env
30
- ```
31
-
32
- ## Usage
33
- ```bash
34
- python main.py /path/to/your/project
35
- ```
36
-
37
- The tool will:
38
- 1. Run pytest and detect failures
39
- 2. Analyze git diff to find recent changes
40
- 3. Ask if you want to fix the code or update the test
41
- 4. Generate and apply a fix
42
- 5. Verify the fix works
43
-
44
- ## Requirements
45
-
46
- - Python 3.10+
47
- - Anthropic API key
48
- - Project must be a git repository
unitsauce-0.1.0/README.md DELETED
@@ -1,32 +0,0 @@
1
- # UnitSauce
2
-
3
- AI-powered test fixer for Python projects.
4
-
5
- ## What it does
6
-
7
- Analyzes failing tests, identifies bugs in recent code changes, and suggests fixes using Claude.
8
-
9
- ## Install
10
- ```bash
11
- pip install -r requirements.txt
12
- cp .env.example .env
13
- # Add your Anthropic API key to .env
14
- ```
15
-
16
- ## Usage
17
- ```bash
18
- python main.py /path/to/your/project
19
- ```
20
-
21
- The tool will:
22
- 1. Run pytest and detect failures
23
- 2. Analyze git diff to find recent changes
24
- 3. Ask if you want to fix the code or update the test
25
- 4. Generate and apply a fix
26
- 5. Verify the fix works
27
-
28
- ## Requirements
29
-
30
- - Python 3.10+
31
- - Anthropic API key
32
- - Project must be a git repository
@@ -1,48 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: unitsauce
3
- Version: 0.1.0
4
- Summary: AI-powered test failure analysis and fix suggestions
5
- Author: Zan Starasinic
6
- License: MIT
7
- Project-URL: Homepage, https://github.com/zanstarasinic/unitsauce
8
- Requires-Python: >=3.10
9
- Description-Content-Type: text/markdown
10
- Requires-Dist: anthropic
11
- Requires-Dist: python-dotenv
12
- Requires-Dist: art
13
- Requires-Dist: rich
14
- Requires-Dist: pytest
15
- Requires-Dist: pytest-json-report
16
-
17
- # UnitSauce
18
-
19
- AI-powered test fixer for Python projects.
20
-
21
- ## What it does
22
-
23
- Analyzes failing tests, identifies bugs in recent code changes, and suggests fixes using Claude.
24
-
25
- ## Install
26
- ```bash
27
- pip install -r requirements.txt
28
- cp .env.example .env
29
- # Add your Anthropic API key to .env
30
- ```
31
-
32
- ## Usage
33
- ```bash
34
- python main.py /path/to/your/project
35
- ```
36
-
37
- The tool will:
38
- 1. Run pytest and detect failures
39
- 2. Analyze git diff to find recent changes
40
- 3. Ask if you want to fix the code or update the test
41
- 4. Generate and apply a fix
42
- 5. Verify the fix works
43
-
44
- ## Requirements
45
-
46
- - Python 3.10+
47
- - Anthropic API key
48
- - Project must be a git repository
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes