pdd-cli 0.0.42__py3-none-any.whl → 0.0.43__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 +1 -1
- pdd/construct_paths.py +26 -2
- {pdd_cli-0.0.42.dist-info → pdd_cli-0.0.43.dist-info}/METADATA +3 -3
- {pdd_cli-0.0.42.dist-info → pdd_cli-0.0.43.dist-info}/RECORD +8 -8
- {pdd_cli-0.0.42.dist-info → pdd_cli-0.0.43.dist-info}/WHEEL +0 -0
- {pdd_cli-0.0.42.dist-info → pdd_cli-0.0.43.dist-info}/entry_points.txt +0 -0
- {pdd_cli-0.0.42.dist-info → pdd_cli-0.0.43.dist-info}/licenses/LICENSE +0 -0
- {pdd_cli-0.0.42.dist-info → pdd_cli-0.0.43.dist-info}/top_level.txt +0 -0
pdd/__init__.py
CHANGED
pdd/construct_paths.py
CHANGED
|
@@ -392,6 +392,7 @@ def construct_paths(
|
|
|
392
392
|
pddrc_config = {}
|
|
393
393
|
context = None
|
|
394
394
|
context_config = {}
|
|
395
|
+
original_context_config = {} # Keep track of original context config for sync discovery
|
|
395
396
|
|
|
396
397
|
try:
|
|
397
398
|
# Find and load .pddrc file
|
|
@@ -405,6 +406,7 @@ def construct_paths(
|
|
|
405
406
|
|
|
406
407
|
# Get context-specific configuration
|
|
407
408
|
context_config = _get_context_config(pddrc_config, context)
|
|
409
|
+
original_context_config = context_config.copy() # Store original before modifications
|
|
408
410
|
|
|
409
411
|
if not quiet and context:
|
|
410
412
|
console.print(f"[info]Using .pddrc context:[/info] {context}")
|
|
@@ -451,8 +453,30 @@ def construct_paths(
|
|
|
451
453
|
)
|
|
452
454
|
# Infer base directories from a sample output path
|
|
453
455
|
gen_path = Path(output_paths_str.get("generate_output_path", "src"))
|
|
454
|
-
|
|
455
|
-
|
|
456
|
+
|
|
457
|
+
# First, check current working directory for prompt files matching the basename pattern
|
|
458
|
+
current_dir = Path.cwd()
|
|
459
|
+
prompt_pattern = f"{basename}_*.prompt"
|
|
460
|
+
if list(current_dir.glob(prompt_pattern)):
|
|
461
|
+
# Found prompt files in current working directory
|
|
462
|
+
resolved_config["prompts_dir"] = str(current_dir)
|
|
463
|
+
resolved_config["code_dir"] = str(current_dir)
|
|
464
|
+
if not quiet:
|
|
465
|
+
console.print(f"[info]Found prompt files in current directory:[/info] {current_dir}")
|
|
466
|
+
else:
|
|
467
|
+
# Fall back to context-aware logic
|
|
468
|
+
# Use original_context_config to avoid checking augmented config with env vars
|
|
469
|
+
if original_context_config and any(key.endswith('_output_path') for key in original_context_config):
|
|
470
|
+
# For configured contexts, prompts are typically at the same level as output dirs
|
|
471
|
+
# e.g., if code goes to "pdd/", prompts should be at "prompts/" (siblings)
|
|
472
|
+
resolved_config["prompts_dir"] = "prompts"
|
|
473
|
+
resolved_config["code_dir"] = str(gen_path.parent)
|
|
474
|
+
else:
|
|
475
|
+
# For default contexts, maintain relative relationship
|
|
476
|
+
# e.g., if code goes to "pi.py", prompts should be at "prompts/" (siblings)
|
|
477
|
+
resolved_config["prompts_dir"] = str(gen_path.parent / "prompts")
|
|
478
|
+
resolved_config["code_dir"] = str(gen_path.parent)
|
|
479
|
+
|
|
456
480
|
resolved_config["tests_dir"] = str(Path(output_paths_str.get("test_output_path", "tests")).parent)
|
|
457
481
|
resolved_config["examples_dir"] = str(Path(output_paths_str.get("example_output_path", "examples")).parent)
|
|
458
482
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pdd-cli
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.43
|
|
4
4
|
Summary: PDD (Prompt-Driven Development) Command Line Interface
|
|
5
5
|
Author: Greg Tanaka
|
|
6
6
|
Author-email: glt@alumni.caltech.edu
|
|
@@ -46,7 +46,7 @@ Requires-Dist: pytest-asyncio; extra == "dev"
|
|
|
46
46
|
Requires-Dist: z3-solver; extra == "dev"
|
|
47
47
|
Dynamic: license-file
|
|
48
48
|
|
|
49
|
-
.. image:: https://img.shields.io/badge/pdd--cli-v0.0.
|
|
49
|
+
.. image:: https://img.shields.io/badge/pdd--cli-v0.0.43-blue
|
|
50
50
|
:alt: PDD-CLI Version
|
|
51
51
|
|
|
52
52
|
.. image:: https://img.shields.io/badge/Discord-join%20chat-7289DA.svg?logo=discord&logoColor=white&link=https://discord.gg/Yp4RTh8bG7
|
|
@@ -123,7 +123,7 @@ After installation, verify:
|
|
|
123
123
|
|
|
124
124
|
pdd --version
|
|
125
125
|
|
|
126
|
-
You'll see the current PDD version (e.g., 0.0.
|
|
126
|
+
You'll see the current PDD version (e.g., 0.0.43).
|
|
127
127
|
|
|
128
128
|
Getting Started with Examples
|
|
129
129
|
-----------------------------
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
pdd/__init__.py,sha256=
|
|
1
|
+
pdd/__init__.py,sha256=_wvZeRl7sFMqEFovHXvbgfEHB53-_Kfnnq2wOL1rpNQ,634
|
|
2
2
|
pdd/auto_deps_main.py,sha256=iV2khcgSejiXjh5hiQqeu_BJQOLfTKXhMx14j6vRlf8,3916
|
|
3
3
|
pdd/auto_include.py,sha256=OJcdcwTwJNqHPHKG9P4m9Ij-PiLex0EbuwJP0uiQi_Y,7484
|
|
4
4
|
pdd/auto_update.py,sha256=w6jzTnMiYRNpwQHQxWNiIAwQ0d6xh1iOB3xgDsabWtc,5236
|
|
@@ -13,7 +13,7 @@ pdd/code_generator_main.py,sha256=7MlZPmET3xycXL3VMLW8mLI8sW3pwRDGNyFynHt8TfM,25
|
|
|
13
13
|
pdd/comment_line.py,sha256=sX2hf4bG1fILi_rvI9MkkwCZ2IitgKkW7nOiw8aQKPY,1845
|
|
14
14
|
pdd/conflicts_in_prompts.py,sha256=9N3rZWdJUGayOTOgnHW9G_Jm1C9G4Y8hSLhnURc1BkY,4890
|
|
15
15
|
pdd/conflicts_main.py,sha256=U23aJqJ6pgLDDCz-AaejWnG-qsTGAhZ9024KsHR9pYU,3650
|
|
16
|
-
pdd/construct_paths.py,sha256=
|
|
16
|
+
pdd/construct_paths.py,sha256=oFmN7d0UUw6VtdnDvXh4DY52vnnn5PgReX610chVA2U,31393
|
|
17
17
|
pdd/context_generator.py,sha256=e5ey0i7wWnxAUiwiw1gkB1_t9OFjKU2lxYKpb_eVSio,6036
|
|
18
18
|
pdd/context_generator_main.py,sha256=nJjc5L_pWTkDQzGhkHbm_C74TpgLeWGukdrb1rA5kEA,3857
|
|
19
19
|
pdd/continue_generation.py,sha256=6W2LQuQHWHSByv6zMMAVlGOCC1zEF_BAXwLPugMaC7M,5637
|
|
@@ -107,9 +107,9 @@ pdd/prompts/trim_results_start_LLM.prompt,sha256=OKz8fAf1cYWKWgslFOHEkUpfaUDARh3
|
|
|
107
107
|
pdd/prompts/unfinished_prompt_LLM.prompt,sha256=-JgBpiPTQZdWOAwOG1XpfpD9waynFTAT3Jo84eQ4bTw,1543
|
|
108
108
|
pdd/prompts/update_prompt_LLM.prompt,sha256=prIc8uLp2jqnLTHt6JvWDZGanPZipivhhYeXe0lVaYw,1328
|
|
109
109
|
pdd/prompts/xml_convertor_LLM.prompt,sha256=YGRGXJeg6EhM9690f-SKqQrKqSJjLFD51UrPOlO0Frg,2786
|
|
110
|
-
pdd_cli-0.0.
|
|
111
|
-
pdd_cli-0.0.
|
|
112
|
-
pdd_cli-0.0.
|
|
113
|
-
pdd_cli-0.0.
|
|
114
|
-
pdd_cli-0.0.
|
|
115
|
-
pdd_cli-0.0.
|
|
110
|
+
pdd_cli-0.0.43.dist-info/licenses/LICENSE,sha256=-1bjYH-CEjGEQ8VixtnRYuu37kN6F9NxmZSDkBuUQ9o,1062
|
|
111
|
+
pdd_cli-0.0.43.dist-info/METADATA,sha256=_7sUhN20_Gy0m3PBLOmcRueGZzf8Q_dIPU7_jHPERkw,12398
|
|
112
|
+
pdd_cli-0.0.43.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
113
|
+
pdd_cli-0.0.43.dist-info/entry_points.txt,sha256=Kr8HtNVb8uHZtQJNH4DnF8j7WNgWQbb7_Pw5hECSR-I,36
|
|
114
|
+
pdd_cli-0.0.43.dist-info/top_level.txt,sha256=xjnhIACeMcMeDfVNREgQZl4EbTni2T11QkL5r7E-sbE,4
|
|
115
|
+
pdd_cli-0.0.43.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|