Skip to content

Commit 805adf3

Browse files
authored
Merge branch 'main' into design-and-docs
2 parents e086ac1 + 149dc8e commit 805adf3

154 files changed

Lines changed: 20971 additions & 7265 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
applyTo: '**'
3+
---
4+
5+
Provide project context and coding guidelines that AI should follow when generating code, answering questions, or reviewing changes.# Coding Instructions for vscode-python-environments
6+
7+
## Localization
8+
9+
- Localize all user-facing messages using VS Code’s `l10n` API.
10+
- Internal log messages do not require localization.
11+
12+
## Logging
13+
14+
- Use the extension’s logging utilities (`traceLog`, `traceVerbose`) for internal logs.
15+
- Do not use `console.log` or `console.warn` for logging.
16+
17+
## Settings Precedence
18+
19+
- Always consider VS Code settings precedence:
20+
1. Workspace folder
21+
2. Workspace
22+
3. User/global
23+
- Remove or update settings from the highest precedence scope first.
24+
25+
## Error Handling & User Notifications
26+
27+
- Avoid showing the same error message multiple times in a session; track state with a module-level variable.
28+
- Use clear, actionable error messages and offer relevant buttons (e.g., "Open settings", "Close").
29+
30+
## Documentation
31+
32+
- Add clear docstrings to public functions, describing their purpose, parameters, and behavior.
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
applyTo: '**/github-issues/**'
3+
---
4+
5+
# Guidelines for Creating Effective GitHub Issues
6+
7+
## Issue Format
8+
9+
When creating GitHub issues, use the following structure to ensure clarity and ease of verification:
10+
11+
### For Bug Reports
12+
13+
1. **Title**: Concise description of the issue (5-10 words)
14+
15+
2. **Problem Statement**:
16+
17+
- 1-2 sentences describing the issue
18+
- Focus on user impact
19+
- Use clear, non-technical language when possible
20+
21+
3. **Steps to Verify Fix**:
22+
- Numbered list (5-7 steps maximum)
23+
- Start each step with an action verb
24+
- Include expected observations
25+
- Cover both success paths and cancellation/back button scenarios
26+
27+
### For Feature Requests
28+
29+
1. **Title**: Clear description of the requested feature
30+
31+
2. **Need Statement**:
32+
33+
- 1-2 sentences describing the user need
34+
- Explain why this feature would be valuable
35+
36+
3. **Acceptance Criteria**:
37+
- Bulleted list of verifiable behaviors
38+
- Include how a user would confirm the feature works as expected
39+
40+
## Examples
41+
42+
### Bug Report Example
43+
44+
```
45+
# Terminal opens prematurely with PET Resolve Environment command
46+
47+
**Problem:** When using "Resolve Environment..." from the Python Environment Tool menu,
48+
the terminal opens before entering a path, creating a confusing workflow.
49+
50+
**Steps to verify fix:**
51+
1. Run "Python Environments: Run Python Environment Tool in Terminal" from Command Palette
52+
2. Select "Resolve Environment..."
53+
3. Verify no terminal opens yet
54+
4. Enter a Python path
55+
5. Verify terminal only appears after path entry
56+
6. Try canceling at the input step - confirm no terminal appears
57+
```
58+
59+
### Feature Request Example
60+
61+
```
62+
# Add back button support to multi-step UI flows
63+
64+
**Problem:** The UI flows for environment creation and Python project setup lack back button
65+
functionality, forcing users to cancel and restart when they need to change a previous selection.
66+
67+
**Steps to verify implementation:**
68+
1. Test back button in PET workflow: Run "Python Environments: Run Python Environment Tool in Terminal",
69+
select "Resolve Environment...", press back button, confirm it returns to menu
70+
2. Test back button in VENV creation: Run "Create environment", select VENV, press back button at various steps
71+
3. Test back button in CONDA creation: Create CONDA environment, use back buttons to navigate between steps
72+
4. Test back button in Python project flow: Add Python project, verify back functionality in project type selection
73+
```
74+
75+
## Best Practices
76+
77+
1. **Be concise**: Keep descriptions short but informative
78+
2. **Use active voice**: "Terminal opens prematurely" rather than "The terminal is opened prematurely"
79+
3. **Include context**: Mention relevant commands, UI elements, and workflows
80+
4. **Focus on verification**: Make steps actionable and observable
81+
5. **Cover edge cases**: Include cancellation paths and error scenarios
82+
6. **Use formatting**: Bold headings and numbered lists improve readability
83+
84+
Remember that good issues help both developers fixing problems and testers verifying solutions.

0 commit comments

Comments
 (0)