You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove extra instruction from system prompt generation
Eliminated the explicit instruction to use documented parameter names and keyword arguments from the system prompt in ShinyTestGenerator. The prompt now only includes the system prompt file and function reference documentation.
"System prompt file not found for app type: testing"
147
147
)
148
148
149
-
# Add an explicit instruction to the system prompt to prefer documented
150
-
# parameter names and to always pass arguments as keyword arguments.
151
-
extra_instruction= (
152
-
"\n\nIMPORTANT: When generating test code, use the exact parameter names shown in the provided function reference documentation and pass all arguments as keyword arguments using those documented names. "
153
-
"Do not invent, rename, or reorder parameter names."
154
-
)
155
-
156
-
return (
157
-
f"{system_prompt_file}\n\nHere is the function reference documentation for Shiny for Python: {self.documentation}"
158
-
+extra_instruction
159
-
)
149
+
returnf"{system_prompt_file}\n\nHere is the function reference documentation for Shiny for Python: {self.documentation}"
"- If test is in 'tests/subdir/test_app.py' and app is in 'apps/subdir/app.py', use: '../../apps/subdir/app.py'\n"
325
315
"- Always compute the correct relative path from the test file to the app file\n"
326
316
"- NEVER use absolute paths or paths that aren't relative from the test location\n\n"
317
+
"CRITICAL: Generate only ONE comprehensive test function (e.g., 'test_app_functionality') that tests ALL components sequentially within the same test. "
318
+
"Do NOT create multiple separate test functions. Exercise all inputs and outputs in a single test flow.\n\n"
327
319
"IMPORTANT: Only output the Python test code in a single code block. Do not include any explanation, justification, or extra text."
0 commit comments