patchling 0.8.0__tar.gz → 0.8.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.
- {patchling-0.8.0 → patchling-0.8.1}/PKG-INFO +8 -8
- {patchling-0.8.0 → patchling-0.8.1}/README.md +6 -6
- {patchling-0.8.0 → patchling-0.8.1}/patchling/core.py +5 -0
- {patchling-0.8.0 → patchling-0.8.1}/patchling.egg-info/PKG-INFO +8 -8
- {patchling-0.8.0 → patchling-0.8.1}/setup.py +2 -2
- {patchling-0.8.0 → patchling-0.8.1}/LICENSE.txt +0 -0
- {patchling-0.8.0 → patchling-0.8.1}/patchling/__init__.py +0 -0
- {patchling-0.8.0 → patchling-0.8.1}/patchling/applydiff.py +0 -0
- {patchling-0.8.0 → patchling-0.8.1}/patchling/gptpatch.py +0 -0
- {patchling-0.8.0 → patchling-0.8.1}/patchling/gptsummarize.py +0 -0
- {patchling-0.8.0 → patchling-0.8.1}/patchling.egg-info/SOURCES.txt +0 -0
- {patchling-0.8.0 → patchling-0.8.1}/patchling.egg-info/dependency_links.txt +0 -0
- {patchling-0.8.0 → patchling-0.8.1}/patchling.egg-info/entry_points.txt +0 -0
- {patchling-0.8.0 → patchling-0.8.1}/patchling.egg-info/requires.txt +0 -0
- {patchling-0.8.0 → patchling-0.8.1}/patchling.egg-info/top_level.txt +0 -0
- {patchling-0.8.0 → patchling-0.8.1}/setup.cfg +0 -0
- {patchling-0.8.0 → patchling-0.8.1}/tests/test_applydiff.py +0 -0
- {patchling-0.8.0 → patchling-0.8.1}/tests/test_applydiff_edgecases.py +0 -0
- {patchling-0.8.0 → patchling-0.8.1}/tests/test_diff_parse.py +0 -0
- {patchling-0.8.0 → patchling-0.8.1}/tests/test_failing_case.py +0 -0
- {patchling-0.8.0 → patchling-0.8.1}/tests/test_multidiff.py +0 -0
- {patchling-0.8.0 → patchling-0.8.1}/tests/test_parse_diff_per_file.py +0 -0
- {patchling-0.8.0 → patchling-0.8.1}/tests/test_smartapply.py +0 -0
- {patchling-0.8.0 → patchling-0.8.1}/tests/test_strip_bad_ouput.py +0 -0
- {patchling-0.8.0 → patchling-0.8.1}/tests/test_swallow_reasoning.py +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: patchling
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.1
|
|
4
4
|
Summary: Natural-language code transformation as a library: generate unified diffs with LLMs and apply them resiliently with smartapply. Formerly gptdiff.
|
|
5
5
|
Home-page: https://github.com/255BITS/patchling-py
|
|
6
6
|
Author: 255labs
|
|
7
|
-
Project-URL: Documentation, https://
|
|
7
|
+
Project-URL: Documentation, https://255bits.github.io/patchling-py
|
|
8
8
|
Project-URL: Source, https://github.com/255BITS/patchling-py
|
|
9
9
|
Project-URL: Browser/Node runtime (npm), https://www.npmjs.com/package/patchling
|
|
10
10
|
Project-URL: Built with patchling (nanoodle), https://nanoodle.com
|
|
@@ -54,7 +54,7 @@ print(updated["main.py"])
|
|
|
54
54
|
|
|
55
55
|
Files in, files out. No filesystem access required, no agent harness. The hard part — applying an LLM-generated diff that `git apply` would reject — is what `smartapply` solves: per-file, AI-assisted patch resolution that survives fuzzy hunks, renames, new files, and deletions.
|
|
56
56
|
|
|
57
|
-
📚 Full documentation at [
|
|
57
|
+
📚 Full documentation at [255bits.github.io/patchling-py](https://255bits.github.io/patchling-py)
|
|
58
58
|
|
|
59
59
|
Prefer the browser? **[patchling](https://github.com/255BITS/patchling)** is a JavaScript port of
|
|
60
60
|
`generateDiff` + `smartapply` — try the **[live demos →](https://255bits.github.io/patchling-examples/)**.
|
|
@@ -131,7 +131,7 @@ See [examples/usage_example.py](examples/usage_example.py) for a runnable versio
|
|
|
131
131
|
- `build_environment(files: dict[str, str]) -> str` — serializes a files dict into the environment string `generate_diff` expects.
|
|
132
132
|
- `load_project_files(path, cwd) -> dict` / `save_files(files, base_dir)` — optional filesystem helpers for when you *do* want to read/write a real project (respects `.gitignore` and `.gptignore`).
|
|
133
133
|
|
|
134
|
-
Full signatures, error handling, and edge cases: [API Reference](https://
|
|
134
|
+
Full signatures, error handling, and edge cases: [API Reference](https://255bits.github.io/patchling-py/api).
|
|
135
135
|
|
|
136
136
|
**Pipeline example** — sequential transformations over an in-memory codebase:
|
|
137
137
|
|
|
@@ -203,7 +203,7 @@ patchling "Add type hints to all functions" --apply
|
|
|
203
203
|
patchling "Add logging" src/api/ src/utils/helpers.py
|
|
204
204
|
```
|
|
205
205
|
|
|
206
|
-
Useful flags: `--model`, `--temperature`, `--prepend <file>` (custom instructions), `--image <path>` (visual context), `--nobeep`. Full list: [CLI Reference](https://
|
|
206
|
+
Useful flags: `--model`, `--temperature`, `--prepend <file>` (custom instructions), `--image <path>` (visual context), `--nobeep`. Full list: [CLI Reference](https://255bits.github.io/patchling-py/cli).
|
|
207
207
|
|
|
208
208
|
Because changes arrive as diffs, the CLI is git-native: review with `git diff`, keep with `git add -p`, discard with `git checkout .`.
|
|
209
209
|
|
|
@@ -216,7 +216,7 @@ patchling-apply path/to/diff.patch
|
|
|
216
216
|
patchling-apply --diff "<diff text>"
|
|
217
217
|
```
|
|
218
218
|
|
|
219
|
-
Options: `--project-dir`, `--model`, `--max_tokens`, `--nobeep`. Details: [patchling-apply docs](https://
|
|
219
|
+
Options: `--project-dir`, `--model`, `--max_tokens`, `--nobeep`. Details: [patchling-apply docs](https://255bits.github.io/patchling-py/patchling-apply).
|
|
220
220
|
|
|
221
221
|
### Agent loops
|
|
222
222
|
|
|
@@ -230,7 +230,7 @@ while true; do
|
|
|
230
230
|
done
|
|
231
231
|
```
|
|
232
232
|
|
|
233
|
-
One overnight test-coverage loop took a project from 18 to 127 test cases. Recipes and guardrails: [Automation Guide](https://
|
|
233
|
+
One overnight test-coverage loop took a project from 18 to 127 test cases. Recipes and guardrails: [Automation Guide](https://255bits.github.io/patchling-py/examples/automation).
|
|
234
234
|
|
|
235
235
|
---
|
|
236
236
|
|
|
@@ -243,7 +243,7 @@ pytest tests/
|
|
|
243
243
|
|
|
244
244
|
## Documentation
|
|
245
245
|
|
|
246
|
-
Docs live at [
|
|
246
|
+
Docs live at [255bits.github.io/patchling-py](https://255bits.github.io/patchling-py). To preview locally:
|
|
247
247
|
|
|
248
248
|
```bash
|
|
249
249
|
pip install .[docs]
|
|
@@ -17,7 +17,7 @@ print(updated["main.py"])
|
|
|
17
17
|
|
|
18
18
|
Files in, files out. No filesystem access required, no agent harness. The hard part — applying an LLM-generated diff that `git apply` would reject — is what `smartapply` solves: per-file, AI-assisted patch resolution that survives fuzzy hunks, renames, new files, and deletions.
|
|
19
19
|
|
|
20
|
-
📚 Full documentation at [
|
|
20
|
+
📚 Full documentation at [255bits.github.io/patchling-py](https://255bits.github.io/patchling-py)
|
|
21
21
|
|
|
22
22
|
Prefer the browser? **[patchling](https://github.com/255BITS/patchling)** is a JavaScript port of
|
|
23
23
|
`generateDiff` + `smartapply` — try the **[live demos →](https://255bits.github.io/patchling-examples/)**.
|
|
@@ -94,7 +94,7 @@ See [examples/usage_example.py](examples/usage_example.py) for a runnable versio
|
|
|
94
94
|
- `build_environment(files: dict[str, str]) -> str` — serializes a files dict into the environment string `generate_diff` expects.
|
|
95
95
|
- `load_project_files(path, cwd) -> dict` / `save_files(files, base_dir)` — optional filesystem helpers for when you *do* want to read/write a real project (respects `.gitignore` and `.gptignore`).
|
|
96
96
|
|
|
97
|
-
Full signatures, error handling, and edge cases: [API Reference](https://
|
|
97
|
+
Full signatures, error handling, and edge cases: [API Reference](https://255bits.github.io/patchling-py/api).
|
|
98
98
|
|
|
99
99
|
**Pipeline example** — sequential transformations over an in-memory codebase:
|
|
100
100
|
|
|
@@ -166,7 +166,7 @@ patchling "Add type hints to all functions" --apply
|
|
|
166
166
|
patchling "Add logging" src/api/ src/utils/helpers.py
|
|
167
167
|
```
|
|
168
168
|
|
|
169
|
-
Useful flags: `--model`, `--temperature`, `--prepend <file>` (custom instructions), `--image <path>` (visual context), `--nobeep`. Full list: [CLI Reference](https://
|
|
169
|
+
Useful flags: `--model`, `--temperature`, `--prepend <file>` (custom instructions), `--image <path>` (visual context), `--nobeep`. Full list: [CLI Reference](https://255bits.github.io/patchling-py/cli).
|
|
170
170
|
|
|
171
171
|
Because changes arrive as diffs, the CLI is git-native: review with `git diff`, keep with `git add -p`, discard with `git checkout .`.
|
|
172
172
|
|
|
@@ -179,7 +179,7 @@ patchling-apply path/to/diff.patch
|
|
|
179
179
|
patchling-apply --diff "<diff text>"
|
|
180
180
|
```
|
|
181
181
|
|
|
182
|
-
Options: `--project-dir`, `--model`, `--max_tokens`, `--nobeep`. Details: [patchling-apply docs](https://
|
|
182
|
+
Options: `--project-dir`, `--model`, `--max_tokens`, `--nobeep`. Details: [patchling-apply docs](https://255bits.github.io/patchling-py/patchling-apply).
|
|
183
183
|
|
|
184
184
|
### Agent loops
|
|
185
185
|
|
|
@@ -193,7 +193,7 @@ while true; do
|
|
|
193
193
|
done
|
|
194
194
|
```
|
|
195
195
|
|
|
196
|
-
One overnight test-coverage loop took a project from 18 to 127 test cases. Recipes and guardrails: [Automation Guide](https://
|
|
196
|
+
One overnight test-coverage loop took a project from 18 to 127 test cases. Recipes and guardrails: [Automation Guide](https://255bits.github.io/patchling-py/examples/automation).
|
|
197
197
|
|
|
198
198
|
---
|
|
199
199
|
|
|
@@ -206,7 +206,7 @@ pytest tests/
|
|
|
206
206
|
|
|
207
207
|
## Documentation
|
|
208
208
|
|
|
209
|
-
Docs live at [
|
|
209
|
+
Docs live at [255bits.github.io/patchling-py](https://255bits.github.io/patchling-py). To preview locally:
|
|
210
210
|
|
|
211
211
|
```bash
|
|
212
212
|
pip install .[docs]
|
|
@@ -635,6 +635,11 @@ def call_llm_for_apply_with_think_tool_available(file_path, original_content, fi
|
|
|
635
635
|
appended_content = ""
|
|
636
636
|
toolbox.use(event)
|
|
637
637
|
|
|
638
|
+
if full_response.lstrip().startswith("<think>") and notool_response.startswith("\n"):
|
|
639
|
+
# The newline separating </think> from the file content is a wrapping
|
|
640
|
+
# artifact, not part of the file.
|
|
641
|
+
notool_response = notool_response[1:]
|
|
642
|
+
|
|
638
643
|
return notool_response
|
|
639
644
|
|
|
640
645
|
def call_llm_for_apply(file_path, original_content, file_diff, model, api_key=None, base_url=None, extra_prompt=None, max_tokens=30000):
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: patchling
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.1
|
|
4
4
|
Summary: Natural-language code transformation as a library: generate unified diffs with LLMs and apply them resiliently with smartapply. Formerly gptdiff.
|
|
5
5
|
Home-page: https://github.com/255BITS/patchling-py
|
|
6
6
|
Author: 255labs
|
|
7
|
-
Project-URL: Documentation, https://
|
|
7
|
+
Project-URL: Documentation, https://255bits.github.io/patchling-py
|
|
8
8
|
Project-URL: Source, https://github.com/255BITS/patchling-py
|
|
9
9
|
Project-URL: Browser/Node runtime (npm), https://www.npmjs.com/package/patchling
|
|
10
10
|
Project-URL: Built with patchling (nanoodle), https://nanoodle.com
|
|
@@ -54,7 +54,7 @@ print(updated["main.py"])
|
|
|
54
54
|
|
|
55
55
|
Files in, files out. No filesystem access required, no agent harness. The hard part — applying an LLM-generated diff that `git apply` would reject — is what `smartapply` solves: per-file, AI-assisted patch resolution that survives fuzzy hunks, renames, new files, and deletions.
|
|
56
56
|
|
|
57
|
-
📚 Full documentation at [
|
|
57
|
+
📚 Full documentation at [255bits.github.io/patchling-py](https://255bits.github.io/patchling-py)
|
|
58
58
|
|
|
59
59
|
Prefer the browser? **[patchling](https://github.com/255BITS/patchling)** is a JavaScript port of
|
|
60
60
|
`generateDiff` + `smartapply` — try the **[live demos →](https://255bits.github.io/patchling-examples/)**.
|
|
@@ -131,7 +131,7 @@ See [examples/usage_example.py](examples/usage_example.py) for a runnable versio
|
|
|
131
131
|
- `build_environment(files: dict[str, str]) -> str` — serializes a files dict into the environment string `generate_diff` expects.
|
|
132
132
|
- `load_project_files(path, cwd) -> dict` / `save_files(files, base_dir)` — optional filesystem helpers for when you *do* want to read/write a real project (respects `.gitignore` and `.gptignore`).
|
|
133
133
|
|
|
134
|
-
Full signatures, error handling, and edge cases: [API Reference](https://
|
|
134
|
+
Full signatures, error handling, and edge cases: [API Reference](https://255bits.github.io/patchling-py/api).
|
|
135
135
|
|
|
136
136
|
**Pipeline example** — sequential transformations over an in-memory codebase:
|
|
137
137
|
|
|
@@ -203,7 +203,7 @@ patchling "Add type hints to all functions" --apply
|
|
|
203
203
|
patchling "Add logging" src/api/ src/utils/helpers.py
|
|
204
204
|
```
|
|
205
205
|
|
|
206
|
-
Useful flags: `--model`, `--temperature`, `--prepend <file>` (custom instructions), `--image <path>` (visual context), `--nobeep`. Full list: [CLI Reference](https://
|
|
206
|
+
Useful flags: `--model`, `--temperature`, `--prepend <file>` (custom instructions), `--image <path>` (visual context), `--nobeep`. Full list: [CLI Reference](https://255bits.github.io/patchling-py/cli).
|
|
207
207
|
|
|
208
208
|
Because changes arrive as diffs, the CLI is git-native: review with `git diff`, keep with `git add -p`, discard with `git checkout .`.
|
|
209
209
|
|
|
@@ -216,7 +216,7 @@ patchling-apply path/to/diff.patch
|
|
|
216
216
|
patchling-apply --diff "<diff text>"
|
|
217
217
|
```
|
|
218
218
|
|
|
219
|
-
Options: `--project-dir`, `--model`, `--max_tokens`, `--nobeep`. Details: [patchling-apply docs](https://
|
|
219
|
+
Options: `--project-dir`, `--model`, `--max_tokens`, `--nobeep`. Details: [patchling-apply docs](https://255bits.github.io/patchling-py/patchling-apply).
|
|
220
220
|
|
|
221
221
|
### Agent loops
|
|
222
222
|
|
|
@@ -230,7 +230,7 @@ while true; do
|
|
|
230
230
|
done
|
|
231
231
|
```
|
|
232
232
|
|
|
233
|
-
One overnight test-coverage loop took a project from 18 to 127 test cases. Recipes and guardrails: [Automation Guide](https://
|
|
233
|
+
One overnight test-coverage loop took a project from 18 to 127 test cases. Recipes and guardrails: [Automation Guide](https://255bits.github.io/patchling-py/examples/automation).
|
|
234
234
|
|
|
235
235
|
---
|
|
236
236
|
|
|
@@ -243,7 +243,7 @@ pytest tests/
|
|
|
243
243
|
|
|
244
244
|
## Documentation
|
|
245
245
|
|
|
246
|
-
Docs live at [
|
|
246
|
+
Docs live at [255bits.github.io/patchling-py](https://255bits.github.io/patchling-py). To preview locally:
|
|
247
247
|
|
|
248
248
|
```bash
|
|
249
249
|
pip install .[docs]
|
|
@@ -2,12 +2,12 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name='patchling',
|
|
5
|
-
version='0.8.
|
|
5
|
+
version='0.8.1',
|
|
6
6
|
description='Natural-language code transformation as a library: generate unified diffs with LLMs and apply them resiliently with smartapply. Formerly gptdiff.',
|
|
7
7
|
author='255labs',
|
|
8
8
|
url='https://github.com/255BITS/patchling-py',
|
|
9
9
|
project_urls={
|
|
10
|
-
'Documentation': 'https://
|
|
10
|
+
'Documentation': 'https://255bits.github.io/patchling-py',
|
|
11
11
|
'Source': 'https://github.com/255BITS/patchling-py',
|
|
12
12
|
'Browser/Node runtime (npm)': 'https://www.npmjs.com/package/patchling',
|
|
13
13
|
'Built with patchling (nanoodle)': 'https://nanoodle.com',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|