Skip to content

Contributing

Hi, glad you are here. First, we setup the development environment so you are aligned with all other contributors.

Development Setup

Setting up the git repository locally

# Fork the repo (from Codeberg GUI) then clone
git clone https://codeberg.org/dpaletti/orti.git
cd orti

# Keep it updated with upstream
git remote add upstream https://codeberg.org/dpaletti/orti.git
git fetch upstream

# Create your branch
git checkout -b <branch_name>

Installing development tools

Hardware development happens on KiCad, grab the latest version on theofficial site.

We use REUSE to ensure license compliance. Install it through UV:

# Install UV if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install reuse without interfering with pre-existing python packages
uv tool install reuse

Once you got reuse installed you can add copyright to the files you are committing with something along these lines:

  reuse annotate --copyright "<codeberg.org/dpaletti/orti> contributors" --license "one among CERN-OHL-S-3.0 or GPLv3-or-later or CC-BY-SA-4.0" file_name_or_pattern

Git hooks

Everything runs on a pre-push hook except for the check to prevent private keys commit which runs on pre-commit hooks. On pre-push we check wether the files are reuse compliant and the markdown files are correctly formatted, linted and spell-checked. All pre-push hooks will be then ran in Codeberg CI.

Developer Certificate of Origin (DCO)

Commits need to be signed to comply with the DCO.

To sign your commit, just add the -s flag when committing:

git commit -s -m "your commit message"

This appends a line like:

Signed-off-by: Your Name <your.email@example.com>

We won't merge commits if they aren't signed off. If you forget, you can amend the last commit like this:

git commit --amend -s

If you're submitting a PR with multiple commits make sure each one is signed.

For JJ users you can add this to your config:

[ui]
should-sign-off = true

[templates]
draft_commit_description = '''
concat(
  description,
  if(
    config("ui.should-sign-off").as_boolean() &&
    !description.contains("Signed-off-by: " ++ author.name()),
    "\nSigned-off-by: " ++ author.name() ++ " <" ++ author.email() ++ ">",
  ),
)
'''