pdd-cli 0.0.24__py3-none-any.whl → 0.0.25__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.
Potentially problematic release.
This version of pdd-cli might be problematic. Click here for more details.
- pdd/__init__.py +7 -1
- pdd/bug_main.py +5 -1
- pdd/bug_to_unit_test.py +16 -5
- pdd/change.py +2 -1
- pdd/change_main.py +407 -189
- pdd/cli.py +853 -301
- pdd/code_generator.py +2 -1
- pdd/conflicts_in_prompts.py +2 -1
- pdd/construct_paths.py +377 -222
- pdd/context_generator.py +2 -1
- pdd/continue_generation.py +3 -2
- pdd/crash_main.py +55 -20
- pdd/detect_change.py +2 -1
- pdd/fix_code_loop.py +465 -160
- pdd/fix_code_module_errors.py +7 -4
- pdd/fix_error_loop.py +9 -9
- pdd/fix_errors_from_unit_tests.py +207 -365
- pdd/fix_main.py +31 -4
- pdd/fix_verification_errors.py +60 -34
- pdd/fix_verification_errors_loop.py +842 -768
- pdd/fix_verification_main.py +412 -0
- pdd/generate_output_paths.py +427 -189
- pdd/generate_test.py +3 -2
- pdd/increase_tests.py +2 -2
- pdd/llm_invoke.py +14 -3
- pdd/preprocess.py +3 -3
- pdd/process_csv_change.py +466 -154
- pdd/prompts/extract_prompt_update_LLM.prompt +11 -5
- pdd/prompts/extract_unit_code_fix_LLM.prompt +2 -2
- pdd/prompts/fix_code_module_errors_LLM.prompt +29 -0
- pdd/prompts/fix_errors_from_unit_tests_LLM.prompt +5 -5
- pdd/prompts/generate_test_LLM.prompt +9 -3
- pdd/prompts/update_prompt_LLM.prompt +3 -3
- pdd/split.py +6 -5
- pdd/split_main.py +13 -4
- pdd/trace_main.py +7 -0
- pdd/xml_tagger.py +2 -1
- {pdd_cli-0.0.24.dist-info → pdd_cli-0.0.25.dist-info}/METADATA +4 -4
- {pdd_cli-0.0.24.dist-info → pdd_cli-0.0.25.dist-info}/RECORD +43 -42
- {pdd_cli-0.0.24.dist-info → pdd_cli-0.0.25.dist-info}/WHEEL +1 -1
- {pdd_cli-0.0.24.dist-info → pdd_cli-0.0.25.dist-info}/entry_points.txt +0 -0
- {pdd_cli-0.0.24.dist-info → pdd_cli-0.0.25.dist-info}/licenses/LICENSE +0 -0
- {pdd_cli-0.0.24.dist-info → pdd_cli-0.0.25.dist-info}/top_level.txt +0 -0
pdd/llm_invoke.py
CHANGED
|
@@ -25,6 +25,7 @@ import json
|
|
|
25
25
|
|
|
26
26
|
from pydantic import BaseModel, Field
|
|
27
27
|
from rich import print as rprint
|
|
28
|
+
from rich.errors import MarkupError
|
|
28
29
|
|
|
29
30
|
# Langchain core and community imports
|
|
30
31
|
from langchain_core.prompts import PromptTemplate, ChatPromptTemplate
|
|
@@ -347,12 +348,22 @@ def llm_invoke(prompt, input_json, strength, temperature, verbose=False, output_
|
|
|
347
348
|
rprint(f"Strength used: {strength}")
|
|
348
349
|
rprint(f"Temperature used: {temperature}")
|
|
349
350
|
try:
|
|
350
|
-
|
|
351
|
+
# Try printing with rich formatting first
|
|
352
|
+
rprint(f"Input JSON: {str(input_json)}")
|
|
353
|
+
except MarkupError:
|
|
354
|
+
# Fallback to standard print if rich markup fails
|
|
355
|
+
print(f"Input JSON: {str(input_json)}")
|
|
351
356
|
except Exception:
|
|
352
|
-
|
|
357
|
+
print(f"Input JSON: {input_json}")
|
|
353
358
|
if output_pydantic:
|
|
354
359
|
rprint(f"Output Pydantic format: {output_pydantic}")
|
|
355
|
-
|
|
360
|
+
try:
|
|
361
|
+
# Try printing with rich formatting first
|
|
362
|
+
rprint(f"Result: {result_output}")
|
|
363
|
+
except MarkupError as me:
|
|
364
|
+
# Fallback to standard print if rich markup fails
|
|
365
|
+
print(f"[bold yellow]Warning:[/bold yellow] Failed to render result with rich markup: {me}")
|
|
366
|
+
print(f"Raw Result: {str(result_output)}") # Use standard print
|
|
356
367
|
|
|
357
368
|
return {'result': result_output, 'cost': cost, 'model_name': model.model}
|
|
358
369
|
|
pdd/preprocess.py
CHANGED
|
@@ -133,9 +133,9 @@ def process_web_tags(text: str) -> str:
|
|
|
133
133
|
console.print("[bold yellow]Warning:[/bold yellow] FIRECRAWL_API_KEY not found in environment")
|
|
134
134
|
return f"[Error: FIRECRAWL_API_KEY not set. Cannot scrape {url}]"
|
|
135
135
|
app = FirecrawlApp(api_key=api_key)
|
|
136
|
-
response = app.scrape_url(url
|
|
137
|
-
if 'markdown'
|
|
138
|
-
return response
|
|
136
|
+
response = app.scrape_url(url, formats=['markdown'])
|
|
137
|
+
if hasattr(response, 'markdown'):
|
|
138
|
+
return response.markdown
|
|
139
139
|
else:
|
|
140
140
|
console.print(f"[bold yellow]Warning:[/bold yellow] No markdown content returned for {url}")
|
|
141
141
|
return f"[No content available for {url}]"
|