Skip to content

Commit 7af3381

Browse files
Copilotl0lawrence
andcommitted
Add virtual environment requirements to copilot instructions
Co-authored-by: l0lawrence <[email protected]>
1 parent 9e0d9d0 commit 7af3381

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/copilot-instructions.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@
1616
**REQUIRED CONDITIONS:**
1717
- To use Azure MCP tool calls, users must have PowerShell installed. Provide [PowerShell installation instructions](https://learn.microsoft.com/powershell/scripting/install/installing-powershell) if not installed, and recommend restarting the IDE to start the MCP server.
1818

19+
### RULE 4: USE VIRTUAL ENVIRONMENTS
20+
**ALWAYS run Python commands in a virtual environment (venv).**
21+
- All Python operations (pip, tox, pytest, etc.) must be executed within an activated virtual environment
22+
- Create a virtual environment using: `python -m venv env`
23+
- Activate before running commands:
24+
- Windows (PowerShell): `env\scripts\activate`
25+
- Linux/Mac: `source env/bin/activate`
26+
- Windows (CMD): `env\scripts\activate.bat`
27+
- Reference: [Python virtual environment documentation](https://docs.python.org/3/tutorial/venv.html)
28+
- Reference: [Azure SDK dev setup guide](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/dev_setup.md)
29+
1930
---
2031

2132
## PYLINT OPERATIONS
@@ -26,8 +37,12 @@
2637
- [Official pylint guide](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/pylint_checking.md)
2738
- [Tox formatting guide](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/tests.md#tox)
2839

40+
**PREREQUISITES:**
41+
- Ensure you are in an activated virtual environment before running pylint commands
42+
2943
**COMMAND:**
3044
```bash
45+
# After activating your virtual environment
3146
tox -e pylint --c <path_to_tox.ini> --root .
3247
```
3348

@@ -64,6 +79,7 @@ tox -e pylint --c <path_to_tox.ini> --root .
6479
- [MyPy fixing guide](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/static_type_checking_cheat_sheet.md)
6580

6681
**REQUIREMENTS:**
82+
- Ensure you are in an activated virtual environment before running MyPy commands
6783
- Use Python 3.9 compatible environment
6884
- Follow official fixing guidelines
6985
- Use tox mcp tool for running MyPy

0 commit comments

Comments
 (0)