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
+6-104Lines changed: 6 additions & 104 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,11 @@ In case of any conflicting instructions, the following hierarchy shall apply. If
64
64
-`shared/`: Shared resources, such as Bicep modules, Python libraries, and other reusable components.
65
65
-`tests/`: Contains unit tests for Python code and Bicep modules. This folder should contain all tests for all code in the repository.
66
66
67
+
## Language-specific Instructions
68
+
69
+
- Python: see `.github/copilot-instructions.python.md`
70
+
- Bicep: see `.github/copilot-instructions.bicep.md`
71
+
67
72
## Formatting and Style
68
73
69
74
- Maintain consistent indentation and whitespace but consider Editor Config settings, etc, for the repository.
@@ -85,110 +90,7 @@ In case of any conflicting instructions, the following hierarchy shall apply. If
85
90
- Ensure that Jupyter notebooks do not contain any cell output.
86
91
- Ensure that Jupyter notebooks have `index` assigned to `1` in the first cell.
87
92
88
-
## Language-specific Instructions
89
-
90
-
### Bicep Instructions
91
-
- Prefer latest Bicep syntax and features.
92
-
- Generated Bicep files should work with Windows, Linux, and macOS.
93
-
- Reference latest available module versions. These may be newer than what you were trained on.
94
-
- Add a link to each Bicep module immediately above the resource declaration (e.g., // https://learn.microsoft.com/azure/templates/microsoft.network/virtualnetworks)
95
-
- Use `@description` for all parameters and variables.
96
-
- Use snake-case and uppercase for all enum declarations.
97
-
- Use camel care for resource and variables names.
98
-
-`location` and `resourceSuffix` parameters do not need to be included when referencing modules in the current workspace unless the values differ from the defaults set in their parameters.
99
-
- If a script must be used, default to cross-platform shell (not bash) scripts. Avoid PowerShell scripts.
100
-
- Always add these two parameters at the top of Bicep files:
101
-
102
-
```Bicep
103
-
@description('Location to be used for resources. Defaults to the resource group location')
104
-
param location string = resourceGroup().location
105
-
106
-
@description('The unique suffix to append. Defaults to a unique string based on subscription and resource group IDs.')
- Visible sections of code with the following format should be used:
112
-
113
-
```bicep
114
-
// ------------------------------
115
-
// <SECTION HEADER>
116
-
// ------------------------------
117
-
```
118
-
119
-
- <SECTIONHEADER> should be indented three spaces and be in all caps.
120
-
- Section headers should have only two blank lines before and only one blank line after.
121
-
- Top-to-bottom, the following comma-separated section headers should be inserted unless the section is empty:
122
-
- Parameters
123
-
- Constants
124
-
- Variables
125
-
- Resources
126
-
- Outputs
127
-
128
-
### Python Instructions
129
-
130
-
- 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.
132
-
- When inserting a comment to describe a method, insert a blank line after the comment section.
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.
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.
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:
136
-
137
-
```python
138
-
"""
139
-
Module docstring.
140
-
"""
141
-
142
-
import...
143
-
...
144
-
145
-
146
-
# ------------------------------
147
-
# CONSTANTS
148
-
# ------------------------------
149
-
...
150
-
```
151
-
152
-
- Overall layout of a Python file should be:
153
-
- Visible sections of code with the following format should be used:
154
-
155
-
```python
156
-
# ------------------------------
157
-
# <SECTION HEADER>
158
-
# ------------------------------
159
-
```
160
-
161
-
-<SECTIONHEADER> should be indented three spaces and be inall caps.
162
-
- Section headers should have only two blank lines before and only one blank line after.
163
-
- Top-to-bottom, the following comma-separated section headers should be inserted unless the section is empty:
164
-
- Constants
165
-
- Variables
166
-
- Private Methods
167
-
- Public Methods
168
-
169
-
- If using classes, the following section headers should be used:
170
-
- Classes
171
-
- Constants
172
-
- Variables
173
-
- Constructor
174
-
- Private Methods
175
-
- Public Methods
176
-
177
-
- Python Docstring/Class Formatting Rule:
178
-
- Always insert a single blank line after a class docstring and before anyclass attributes or methods.
179
-
- Never place class attributes or decorators on the same line as the docstring. Example:
180
-
181
-
```python
182
-
classMyClass:
183
-
"""
184
-
This is the class docstring.
185
-
"""
186
-
187
-
attribute: str
188
-
...
189
-
```
190
-
191
-
### Jupyter Notebook Instructions
93
+
## Jupyter Notebook Instructions
192
94
193
95
- 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.
0 commit comments