-
Notifications
You must be signed in to change notification settings - Fork 7
Updates to Python Feature Management #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
e5c0777
dependency update + strict
mrm9084 429fff3
removing setup py usage
mrm9084 81a52ae
Create copilot-instructions.md
mrm9084 ca8b856
formatting
mrm9084 a19326a
test and sample headers
mrm9084 eb121f0
pr comments
mrm9084 d719bbc
Update copilot-instructions.md
mrm9084 da7499c
pr comments
mrm9084 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,121 @@ | ||
| # FEATURE MANAGEMENT FOR PYTHON - COPILOT INSTRUCTIONS | ||
|
|
||
| --- | ||
|
|
||
| ## CORE PRINCIPLES | ||
|
|
||
| ### RULE 1: DO NOT REPEAT INSTRUCTIONS | ||
| **NEVER repeat instructions when guiding users. Users should follow instructions independently.** | ||
|
|
||
| ### RULE 2: REFERENCE OFFICIAL DOCUMENTATION | ||
| **ALWAYS** reference the [Azure SDK Python Design Guidelines](https://azure.github.io/azure-sdk/python_design.html) | ||
| - Link to specific pages when answering guidelines questions | ||
| - Use this as the authoritative source for SDK development guidance | ||
|
|
||
| ### RULE 3: VERIFY ENVIRONMENT FIRST | ||
| **REQUIRED CONDITIONS:** | ||
| - Always activate the Python virtual environment before running Python commands: | ||
| - On Windows: `.venv\Scripts\activate` | ||
| - On Linux/macOS: `source .venv/bin/activate` | ||
| - Use `python -m pip` instead of bare `pip` when installing packages. | ||
|
|
||
| --- | ||
|
|
||
| ## DEV SETUP | ||
|
|
||
| Install all dependencies with: | ||
|
|
||
| ```bash | ||
| python -m pip install -e ".[dev,test]" | ||
| ``` | ||
|
|
||
| This project requires **Python 3.10 or newer**. | ||
|
|
||
| --- | ||
|
|
||
| ## PROJECT STRUCTURE | ||
|
|
||
| - `featuremanagement/` — Synchronous feature management code | ||
| - `featuremanagement/aio/` — Async equivalents of feature management classes | ||
| - `featuremanagement/_models/` — Data models (feature flags, variants, telemetry) | ||
| - `featuremanagement/_time_window_filter/` — Time window filter with recurrence support | ||
| - `featuremanagement/azuremonitor/` — Optional Azure Monitor telemetry integration | ||
| - `tests/` — Unit tests (sync and async) | ||
| - `samples/` — Sample applications | ||
|
|
||
| --- | ||
|
|
||
| ## CODE CONVENTIONS | ||
|
|
||
| - All source files must include the Microsoft copyright header. | ||
| - All modules must have a module-level docstring. | ||
| - Maximum line length is 120 characters. | ||
| - Use type annotations on all functions and methods. | ||
|
|
||
| --- | ||
|
|
||
| ## PYLINT OPERATIONS | ||
|
|
||
| ### RUNNING PYLINT | ||
|
|
||
| **COMMAND:** | ||
| ```bash | ||
| pylint featuremanagement | ||
| ``` | ||
|
|
||
| ### FIXING PYLINT WARNINGS | ||
|
|
||
| **ALLOWED ACTIONS:** | ||
| - ✅ Fix warnings with 100% confidence | ||
| - ✅ Use existing files for all solutions | ||
| - ✅ Reference official guidelines | ||
|
|
||
| **FORBIDDEN ACTIONS:** | ||
| - ❌ Fix warnings without complete confidence | ||
| - ❌ Create new files for solutions | ||
| - ❌ Import non-existent modules | ||
| - ❌ Add new dependencies/imports | ||
| - ❌ Make unnecessary large changes | ||
| - ❌ Change code style without reason | ||
| - ❌ Delete code without clear justification | ||
|
|
||
| --- | ||
|
|
||
| ## MYPY OPERATIONS | ||
|
|
||
| ### RUNNING MYPY | ||
|
|
||
| **COMMAND:** | ||
| ```bash | ||
| mypy featuremanagement | ||
| ``` | ||
|
|
||
| The project uses `strict = True` in `mypy.ini`. | ||
|
|
||
| --- | ||
|
|
||
| ## CODE FORMATTING | ||
|
|
||
| ### RUNNING BLACK | ||
|
|
||
| **COMMAND:** | ||
| ```bash | ||
| black featuremanagement | ||
| ``` | ||
|
|
||
| Line length is configured to 120 in `pyproject.toml`. | ||
|
|
||
| --- | ||
|
|
||
| ## TESTING | ||
|
|
||
| ### RUNNING TESTS | ||
|
|
||
| **COMMAND:** | ||
| ```bash | ||
| pytest tests | ||
| ``` | ||
|
|
||
| - Sync tests are in `tests/test_*.py` | ||
| - Async tests use `pytest-asyncio` and are in files ending with `_async.py` | ||
| - Run tests with: `pytest tests` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.