NOTE: this style guide is still evolving. Any ideas/exceptions from the referenced style guides should be documented and added here.
Style Guide
Python Style Guide
Formatting
We are using ruff-format to format our Python code, since it adheres to the Black code style we also do.
Other
When it comes to naming variables, types, classes, etc. and the position of imports, we adhere to the conventions of the PEP 8 - Style Guide for Python Code.
Rules:
File Names
File names should be in lowercase with underscores separating words, e.g. file_name.py.
Documentation
Python should be commented in the DocBlockr style. We suggest using the recommended extensions where autoDocstring is included, which allows you to generate a template comment based on the function signature.
TypeScript Style Guide
Formatting
We format our code using prettier. See our package.json for our settings and refer to the prettier docs for getting information about the enforced style guide.
File Names
Files providing React components or otherwise using JSX should be named like PascalCase.tsx, whereas files that provide non-JSX code, like utility functions, types, etc., should be named camelCase.ts
Other
We adhere to the typescript style guide from TS.dev.
Documentation
We use TSDoc Comments. The format is similar to JSDoc comments and we follow the exceptions mentioned in the typescript style guide. Using VSCode/VSCodium, you can autogenerate JSDoc comments typing /** above a function signature. Note that JSDoc differs slightly from TSDoc.