1- # Copilot Instructions
1+ # FEATURE MANAGEMENT FOR PYTHON - COPILOT INSTRUCTIONS
22
3- ## Python Environment
3+ ---
44
5- Always activate and use the Python virtual environment when running Python commands:
5+ ## CORE PRINCIPLES
66
7- - On Windows: ` .venv\Scripts\activate `
8- - On Linux/macOS: ` source .venv/bin/activate `
7+ ### RULE 1: DO NOT REPEAT INSTRUCTIONS
8+ ** NEVER repeat instructions when guiding users. Users should follow instructions independently. **
99
10- Use ` python -m pip ` instead of bare ` pip ` when installing packages.
10+ ### RULE 2: REFERENCE OFFICIAL DOCUMENTATION
11+ ** ALWAYS** reference the [ Azure SDK Python Design Guidelines] ( https://azure.github.io/azure-sdk/python_design.html )
12+ - Link to specific pages when answering guidelines questions
13+ - Use this as the authoritative source for SDK development guidance
1114
12- ## Dev Setup
15+ ### RULE 3: VERIFY ENVIRONMENT FIRST
16+ ** REQUIRED CONDITIONS:**
17+ - Always activate the Python virtual environment before running Python commands:
18+ - On Windows: ` .venv\Scripts\activate `
19+ - On Linux/macOS: ` source .venv/bin/activate `
20+ - Use ` python -m pip ` instead of bare ` pip ` when installing packages.
21+
22+ ---
23+
24+ ## DEV SETUP
1325
1426Install all dependencies with:
1527
16- ```
28+ ``` bash
1729python -m pip install -e " .[dev,test]"
1830```
1931
20- ## Python Version
32+ This project requires ** Python 3.10 or newer ** .
2133
22- This project requires Python 3.10 or newer.
34+ ---
2335
24- ## Project Structure
36+ ## PROJECT STRUCTURE
2537
2638- ` featuremanagement/ ` — Synchronous feature management code
2739- ` featuremanagement/aio/ ` — Async equivalents of feature management classes
@@ -31,25 +43,78 @@ This project requires Python 3.10 or newer.
3143- ` tests/ ` — Unit tests (sync and async)
3244- ` samples/ ` — Sample applications
3345
34- ## Code Conventions
46+ ---
47+
48+ ## CODE CONVENTIONS
3549
3650- All source files must include the Microsoft copyright header.
3751- All modules must have a module-level docstring.
3852- Maximum line length is 120 characters.
3953- Use type annotations on all functions and methods.
4054
41- ## Code Quality
55+ ---
4256
43- Run these before submitting changes:
57+ ## PYLINT OPERATIONS
4458
45- ```
46- black featuremanagement
59+ ### RUNNING PYLINT
60+
61+ ** COMMAND:**
62+ ``` bash
4763pylint featuremanagement
64+ ```
65+
66+ ### FIXING PYLINT WARNINGS
67+
68+ ** ALLOWED ACTIONS:**
69+ - ✅ Fix warnings with 100% confidence
70+ - ✅ Use existing files for all solutions
71+ - ✅ Reference official guidelines
72+
73+ ** FORBIDDEN ACTIONS:**
74+ - ❌ Fix warnings without complete confidence
75+ - ❌ Create new files for solutions
76+ - ❌ Import non-existent modules
77+ - ❌ Add new dependencies/imports
78+ - ❌ Make unnecessary large changes
79+ - ❌ Change code style without reason
80+ - ❌ Delete code without clear justification
81+
82+ ---
83+
84+ ## MYPY OPERATIONS
85+
86+ ### RUNNING MYPY
87+
88+ ** COMMAND:**
89+ ``` bash
4890mypy featuremanagement
49- pytest tests
5091```
5192
52- ## Testing
93+ The project uses ` strict = True ` in ` mypy.ini ` .
94+
95+ ---
96+
97+ ## CODE FORMATTING
98+
99+ ### RUNNING BLACK
100+
101+ ** COMMAND:**
102+ ``` bash
103+ black featuremanagement
104+ ```
105+
106+ Line length is configured to 120 in ` pyproject.toml ` .
107+
108+ ---
109+
110+ ## TESTING
111+
112+ ### RUNNING TESTS
113+
114+ ** COMMAND:**
115+ ``` bash
116+ pytest tests
117+ ```
53118
54119- Sync tests are in ` tests/test_*.py `
55120- Async tests use ` pytest-asyncio ` and are in files ending with ` _async.py `
0 commit comments