Coding Standards¶
Linting and Formatting¶
Python: Use Ruff for linting and formatting.
Line length: 100 characters.
Target Python: 3.10.
Exclude generated documentation (
docs/sphinx/build) and Alembic versions (src/penroselamarck/alembic/versions).
Shell scripts: Use
shellcheckfor linting andshfmtfor formatting with flags-i 4 -sr.Dockerfiles: Use
hadolintfor linting.Pre-commit: Configure hooks for
ruff,ruff-format,shellcheck,shfmt, andhadolint. Run hooks locally and enforce in CI via the GitHubpre-commit/actionon pushes and pull requests.Devcontainer: Automatically install and run
pre-commitduring container creation and on start (postCreateCommandandpostStartCommand) so hooks are installed and validated by default.Editors: Enable format-on-save. Recommend VS Code extensions: Ruff, Python, Pylance, ShellCheck, Shell Format, Hadolint, Docker, GitHub Actions.