Thank you for your interest in contributing to C5-DEC CAD. This document explains how to set up the development environment, submit changes, and follow project conventions.
- Prerequisites
- Getting the code
- Development environment
- Branching and workflow
- Commit message convention
- Running the test suite
- Code conventions
- Documentation conventions
- Opening issues and pull requests
- Docker Desktop or Docker Engine
- Visual Studio Code with the Dev Containers extension
- Git
- Poetry ≥ 1.1 (inside the dev container, Poetry is pre-installed)
git clone https://github.com/AbstractionsLab/c5dec.git
cd c5decOpen the folder in VS Code and select Reopen in Container to start the C5-DEC CAD dev container. All Python dependencies are installed automatically via Poetry.
Inside the dev container, activate the Poetry virtual environment:
poetry shellYou can then run any c5dec command directly:
c5dec -hIf you modify pyproject.toml, always validate it before committing:
poetry check| Branch | Purpose |
|---|---|
main |
Stable release branch; only merged from develop via pull request |
develop |
Integration branch for ongoing work |
feature/<short-description> |
New features or enhancements |
fix/<short-description> |
Bug fixes |
docs/<short-description> |
Documentation-only changes |
- Branch off from
develop(notmain):git checkout develop git pull git checkout -b feature/my-feature
- Make changes in small, focused commits (see below).
- Push your branch and open a pull request targeting
develop.
Use the imperative mood and keep the subject line under 72 characters:
<type>: <short summary>
[optional body — wrap at 72 chars]
| Type | When to use |
|---|---|
feat |
New feature or capability |
fix |
Bug fix |
docs |
Documentation changes only |
refactor |
Code restructuring with no functional change |
test |
Adding or updating tests |
chore |
Tooling, dependencies, CI changes |
Example:
feat: add CRA Annex I checklist Excel export
Adds per-category compliance percentage columns to the
exported spreadsheet. Closes #42.
Run all tests from the repository root:
./run-test-suite.shOr with pytest directly (inside the Poetry environment):
pytestTest fixtures live in tests/content/. Mock all external services (OpenProject, Doorstop remote) in new tests.
- Target Python 3.8–3.11; avoid syntax or library features not available in 3.8.
- Use
common.logger(__name__)for logging; neverprint()for operational output. - Raise
common.C5decErrorfor expected error conditions. - Reference paths via
c5settingsconstants — never hard-code file paths. - Follow NumPy/Google docstring style for all public functions and classes.
- Run
poetry checkafter anypyproject.tomlmodification.
- All documentation lives under
docs/(docs/manual/,docs/specs/). Never place docs alongside source code. - File names: lowercase with hyphens (
debug-mode.md). Exception:README.md. - Section headings: sentence case only (
## Getting started, not## Getting Started). - Formats: Markdown, YAML, JSON, CSV, or LaTeX only.
- Search existing issues before opening a new one.
- For bug reports, include: C5-DEC version, deployment model (Docker scripts or dev container), steps to reproduce, expected vs actual behaviour.
- For feature requests, describe the use case and how it fits the C5-DEC methodology.
- Pull requests must include a description of the change and reference any related issue numbers.
- To report a security vulnerability, follow the process in SECURITY.md instead of opening a public issue.