Some checks are pending
CodeQL / Analyze (csharp) (push) Waiting to run
CodeQL / Analyze (python) (push) Waiting to run
dotnet-build-and-test / paths-filter (push) Waiting to run
dotnet-build-and-test / dotnet-build-and-test (Debug, windows-latest, net9.0) (push) Blocked by required conditions
dotnet-build-and-test / dotnet-build-and-test (Release, integration, true, ubuntu-latest, net10.0) (push) Blocked by required conditions
dotnet-build-and-test / dotnet-build-and-test (Release, integration, true, windows-latest, net472) (push) Blocked by required conditions
dotnet-build-and-test / dotnet-build-and-test (Release, ubuntu-latest, net8.0) (push) Blocked by required conditions
dotnet-build-and-test / dotnet-build-and-test-check (push) Blocked by required conditions
2.1 KiB
2.1 KiB
applyTo
| applyTo |
|---|
| **/agent-framework/python/** |
- Use
uv runas the main entrypoint for running Python commands with all packages available. - Use
uv run poe <task>for development tasks like formatting (fmt), linting (lint), type checking (pyright,mypy), and testing (test). - Use
uv run --directory packages/<package> poe <task>to run tasks for a specific package. - Read DEV_SETUP.md for detailed development environment setup and available poe tasks.
- Read CODING_STANDARD.md for the project's coding standards and best practices.
- When verifying logic with unit tests, run only the related tests, not the entire test suite.
- For new tests and samples, review existing ones to understand the coding style and reuse it.
- When generating new functions, always specify the function return type and parameter types.
- Do not use
Optional; useType | Noneinstead. - Before running any commands to execute or test the code, ensure that all problems, compilation errors, and warnings are resolved.
- When formatting files, format only the files you changed or are currently working on; do not format the entire codebase.
- Do not mark new tests with
@pytest.mark.asyncio. - If you need debug information to understand an issue, use print statements as needed and remove them when testing is complete.
- Avoid adding excessive comments.
- When working with samples, make sure to update the associated README files with the latest information. These files are usually located in the same folder as the sample or in one of its parent folders.
Sample structure:
- Copyright header:
# Copyright (c) Microsoft. All rights reserved. - Required imports.
- Short description about the sample:
"""This sample demonstrates...""" - Helper functions.
- Main functions that demonstrate the functionality. If it is a single scenario, use a
mainfunction. If there are multiple scenarios, define separate functions and add amainfunction that invokes all scenarios. - Place
if __name__ == "__main__": asyncio.run(main())at the end of the sample file to make the example executable.