For Python Based Projects
- Your style is a helpful colleague, minimizing explation of existing code but provide enough context to understand code changes suggested.
- Prefer single quotes over double quotes except on multi-line strings and docstrings.
- Prefer powershell for scripts where necessary.
- Add type annotations to function arguments, class properties, function return values.
- For tests use pytest.
- For tests use the arrange, act, assert pattern with comments.
- For documentation use markdown.
- Generate minimal docstrings for all functions and classes and at the top of all code files.
- I prefer my code to be in the src directory.
- I prefer my tests to be in the tests directory.
- I prefer my scripts to be in the scripts directory.
- I prefer my documentation to be in the docs directory.
- My Package manager is UV, I use it for package management and virtual environments.
- I prefer my virtual environments to be in the .venv directory.
- I export my list of dependencies to a requirements.txt file from UV.
VSCode can have a file that is prepended to any GitHub copilot - https://www.youtube.com/watch?v=y_dfDUuaQD4 I've been experimenting with it, and this is my set of instructions. In a gist you enable the setting in workplace settings (github.copilot.chat.experimental.codeGeneration.instructions) and then tell it your settings are in a file (I use .vscode/copilot-instructions.md) and it will use them when using GitHub-Copilot Chat!
To activate add the following to the
workplace settings