-
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 4 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,56 @@ | ||
| # Copilot Instructions | ||
|
|
||
| ## Python Environment | ||
|
|
||
| Always activate and use the Python virtual environment when 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: | ||
|
|
||
| ``` | ||
| python -m pip install -e ".[dev,test]" | ||
| ``` | ||
|
|
||
| ## Python Version | ||
|
|
||
| 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. | ||
|
|
||
| ## Code Quality | ||
|
|
||
| Run these before submitting changes: | ||
|
|
||
| ``` | ||
| black featuremanagement | ||
| pylint featuremanagement | ||
| mypy featuremanagement | ||
| pytest tests | ||
| ``` | ||
|
|
||
| ## Testing | ||
|
|
||
| - 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,31 +1,4 @@ | ||
| [mypy] | ||
| python_version = 3.10 | ||
| # Start off with these | ||
| warn_unused_configs = True | ||
| warn_redundant_casts = True | ||
| warn_unused_ignores = True | ||
|
|
||
| # Getting these passing should be easy | ||
| strict_equality = True | ||
| extra_checks = True | ||
|
|
||
| # Strongly recommend enabling this one as soon as you can | ||
| check_untyped_defs = True | ||
|
|
||
| # These shouldn't be too much additional work, but may be tricky to | ||
| # get passing if you use a lot of untyped libraries | ||
| disallow_subclassing_any = True | ||
| disallow_untyped_decorators = True | ||
| disallow_any_generics = True | ||
|
|
||
| # These next few are various gradations of forcing use of type annotations | ||
| disallow_untyped_calls = True | ||
| disallow_incomplete_defs = True | ||
| disallow_untyped_defs = True | ||
|
|
||
| # This one isn't too hard to get passing, but return on investment is lower | ||
| no_implicit_reexport = True | ||
|
|
||
| # This one can be tricky to get passing if you use a lot of untyped libraries | ||
| warn_return_any = True | ||
| strict = True | ||
|
|
Oops, something went wrong.
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.