You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+15-14Lines changed: 15 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ applyTo: "**"
6
6
7
7
## Purpose
8
8
9
-
This instructions file is designed to guide GitHub Copilot's behavior specifically for this repository. It is intended to provide clear, general, and maintainable guidelines for code generation, style, and collaboration.
9
+
This instructions file is designed to guide GitHub Copilot's behavior specifically for this repository. It is intended to provide clear, general, and maintainable guidelines for code generation, style, and collaboration.
10
10
11
11
**In case of any conflict, instructions from other individualized or project-specific files (such as `my-copilot.instructions.md`) take precedence over this file.**
12
12
@@ -24,7 +24,7 @@ In case of any conflicting instructions, the following hierarchy shall apply. If
24
24
1. Individualized instructions (e.g. a developer's or an organization's instruction file(s)), if present
25
25
2. This repository's `.github/.copilot-instructions.md`
26
26
3. General best practices and guidelines from sources such as [Microsoft Learn](https://learn.microsoft.com/docs/)
27
-
This includes the [Microsoft Cloud Adoption Framework](https://learn.microsoft.com/azure/cloud-adoption-framework/).
27
+
This includes the [Microsoft Cloud Adoption Framework](https://learn.microsoft.com/azure/cloud-adoption-framework/).
28
28
4. Official [GitHub Copilot best practices documentation](https://docs.github.com/enterprise-cloud@latest/copilot/using-github-copilot/coding-agent/best-practices-for-using-copilot-to-work-on-tasks)
29
29
30
30
## Copilot Personality Behavior
@@ -58,11 +58,11 @@ In case of any conflicting instructions, the following hierarchy shall apply. If
58
58
-`/`: Root directory containing the main files and folders. Bicep configuration is stored in `bicepconfig.json`.
59
59
- The following folders are all at the root level:
60
60
-`assets/`: PlantUML diagrams and images. Static assets such as these should be placed here. Any diagrams should be placed in the /diagrams/src subfolder.
61
-
-`infrastructure/`: Contains Jupyter notebooks for setting up various API Management infrastructures. When modifying samples, these notebooks should not need to be modified.
61
+
-`infrastructure/`: Contains Jupyter notebooks for setting up various API Management infrastructures. When modifying samples, these notebooks should not need to be modified.
62
62
-`samples/`: Various policy and scenario samples that can be applied to the infrastructures.
63
63
-`setup/`: General setup scripts and configurations for the repository and dev environment setup.
64
64
-`shared/`: Shared resources, such as Bicep modules, Python libraries, and other reusable components.
65
-
-`tests/`: Contains unit tests for Python code and Bicep modules. This folder should contain all tests for all code in the repository.
65
+
-`tests/`: Contains unit tests for Python code and Bicep modules. This folder should contain all tests for all code in the repository.
- Prefer Python 3.12+ syntax and features unless otherwise specified.
131
+
- Respect the repository's `.pylintrc` file for linting rules. The file is found in the `tests/python/` folder.
131
132
- When inserting a comment to describe a method, insert a blank line after the comment section.
132
133
- Never leave a blank line at the very top of a Python file. The file must start immediately with the module docstring or code. Always remove any leading blank line at the top.
133
134
- Do not have imports such as `from shared.python import Foo`. The /shared/python directory is covered by a root `.env` file. Just use `import Foo` or `from Foo import Bar` as appropriate.
134
135
- After the module docstring, all import statements must come before any section headers (e.g., CONSTANTS, VARIABLES, etc.). Section headers should only appear after the imports. Here is a more explicit example:
- Use these [configuration settings](https://github.com/microsoft/vscode-jupyter/blob/dd568fde/package.nls.json) as a reference for the VS Code Jupyter extension configuration.
- Ensure you verify that all include links are correct and up to date. This link provides a starting point: https://github.com/plantuml-stdlib/Azure-PlantUML/blob/master/AzureSymbols.md
197
198
- Keep diagrams simple. For Azure, include major components, not individual aspects of components. For example, there is no need for individual policies in WAFs or APIs inAPI Management, Smart Detector Alert Rules, etc.
198
-
- Less is more. Don't be too verbose in the diagrams.
199
+
- Less is more. Don't be too verbose in the diagrams.
199
200
- Never include subscription IDs, resource group names, orany other sensitive information in the diagrams. That data isnot relevant.
200
201
- Don't use the "legend" command if the information is relatively obvious.
201
202
202
203
### API Management Policy XML Instructions
203
204
204
-
- Policies should use camelCase forall variable names.
205
+
- Policies should use camelCase forall variable names.
Copy file name to clipboardExpand all lines: README.md
+30-1Lines changed: 30 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -217,7 +217,35 @@ As you work with this repo, you will likely want to make your own customizations
217
217
218
218
The repo uses the bicep linter and has rules defined in `bicepconfig.json`. See the [bicep linter documentation][bicep-linter-docs] for details.
219
219
220
-
**We welcome contributions!** Please consider forking the repo and creating issues and pull requests to share your samples. Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details. Thank you!
220
+
**We welcome contributions!** Please consider forking the repo and creating issues and pull requests to share your samples. Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details. Thank you!
221
+
222
+
### 🔍 Code Quality & Linting
223
+
224
+
The repository uses [pylint][pylint-docs] to maintain Python code quality standards. Configuration is located in `tests/python/.pylintrc`.
225
+
226
+
#### Running Pylint
227
+
228
+
**Using the convenience script (recommended):**
229
+
```powershell
230
+
# From tests/python directory
231
+
.\run_pylint.ps1 # Run with default settings
232
+
.\run_pylint.ps1 -ShowReport # Include full detailed report
233
+
.\run_pylint.ps1 -Target "../../samples" # Analyze a different directory
api_hwaca_pool=API('hello-world-aca-pool', 'Hello World (ACA Pool)', '/aca-pool', 'This is the ACA API for Backend Pool', pol_aca_backend_pool, [api_hwaca_pool_get])
api_hwaca_pool_get=GET_APIOperation('This is a GET for Hello World on ACA Backend Pool')
54
54
api_hwaca_pool=API('hello-world-aca-pool', 'Hello World (ACA Pool)', '/aca-pool', 'This is the ACA API for Backend Pool', pol_aca_backend_pool, [api_hwaca_pool_get])
0 commit comments