diff --git a/CONVENTIONS.md b/CONVENTIONS.md index 714e6dd..7fc9a32 100644 --- a/CONVENTIONS.md +++ b/CONVENTIONS.md @@ -1,3 +1,10 @@ +# Conventions + +When contributing code to this project, you MUST follow the requirements +specified here. + +## Code Conventions + When contributing code to this project, you MUST follow these principles: - Code should be easy to read and understand. @@ -10,3 +17,16 @@ When contributing code to this project, you MUST follow these principles: - Properly handle errors and exceptions to ensure the software's robustness. - Use exceptions rather than error codes for handling errors. - Consider security implications of the code. Implement security best practices to protect against vulnerabilities and attacks. +- Documentation should document semantics, not syntax. +- Prefer importing modules, not individual items from modules. +- Do not use f-strings in logging statements. +- Loop variables and walrus-expression-variables should be deleted when + unneeded to keep scope clean, and to avoid accidental use. + +## Testing + +When contributing test to this project, you MUST follow these principles: + +- Do not use any testing libraries other than `pytest`. +- Mocking is the root of all evil. Writing your own stubs is much more + preferable.