This guide covers best practices for contributing to this repository and the Indico submodule. Following these guidelines helps maintain code quality and a clean project history.
Read this CONTRIBUTING.md file to know more about:
All contributions must pass quality assurance checks before merging. These include automated code style checks, regression tests and manual code reviews to ensure alignment with project architecture and long-term maintainability.
Code style is enforced automatically using linters configured in the repository. Run the style checks with:
make lintFix any issues before submitting your pull request.
Run the test suite to verify your changes don't break existing functionality:
make testRun tests for specific components:
make test-py
make test-jsWrite atomic and descriptive commit messages to maintain a clear project history.
Group all related changes into a single commit. If you end up with multiple disjointed commits during development, squash them before merging using interactive rebase:
git rebase --interactive <target-branch>Example rebase workflow:
Initial commits:
pick a4d29a59 Fix bug in foobar decorator
pick bc0cb59b Implement new feature
pick a7a4b258 WIP2
pick 95750e7d WIP3
pick d1330ee7 Suggestions from code review
Rebase instructions:
pick a4d29a59 Fix bug in foobar decorator
fixup a7a4b258 WIP2
fixup d1330ee7 Suggestions from code review
pick bc0cb59b Implement new feature
fixup 95750e7d WIP3
Result:
a4d29a59 Fix bug in foobar decoratorbc0cb59b Implement new feature
Keep separate commits when changes are logically distinct and meaningful on their own. This helps when using git blame to understand why code changed.
Write commit messages that explain why changes were made, not just what changed. Follow these guidelines:
- Use imperative mood (
Fix bugnotFixed bug) - Capitalize the subject line and don't end with a period
- Limit subject line and body to 72 characters
- Separate subject from body with a blank line
- Use the body to explain reasons behind changes
Good examples:
Upgrade ruff and fix new errors
Fix import when no data provided
Implement user notification system
Bad examples:
Upgrade ruff and fix new errors
fixed import when no data provided.
implemented user notification system that allows users to receive notifications.
These guidelines are inspired by Chris Beams' "How to Write a Git Commit Message".
Target one of these branches for your pull requests:
master- stable branch containing also hotfixesdevel- normal development lifecyclerelease- last minute fixes before a release (optional)
Never create merge commits in your feature branch. Instead of clicking Update branch in GitHub's pull request interface, select Rebase branch. Alternatively, rebase from the command line:
git fetch origin
git rebase origin/<target-branch>
git push --force-with-leaseMerge commits like Merge branch 'devel' into <feature-branch> create messy history and complicate future rebases.
The Indico repository lives as a Git submodule in the indico/ directory. Changes made here are immediately reflected in your local instance since Indico is installed from this directory.
The indico submodule points to the devel branch of the Indico fork. This branch tracks a stable Indico release (e.g., v3.1.1) plus additional commits backported from upstream or temporary patches. The goal is to maintain parity with the latest stable release while managing compatibility with this distribution.
New features and bug fixes are committed to the master branch of the upstream Indico repository. We backport commits when we're behind the latest release or when needed fixes aren't yet released.
To update the indico submodule to a newer upstream version, rebase the devel branch onto the latest upstream/master. First, configure the upstream remote if not already done (one-time setup):
cd indico
git remote add upstream https://github.com/indico/indico.gitFetch the latest upstream changes and rebase:
git fetch upstream
git switch devel
git rebase upstream/masterResolve any conflicts that arise during the rebase. After successfully rebasing, force-push to update the fork:
git push --force-with-leaseUpdate the submodule pointer and dependencies in the main repository:
cd ..
git add indico
uv lock
git add uv.lock
git commit -m "Bump indico submodule to <version>"
git pushWarning
Review commits prefixed with BACKPORTED during the rebase. These may conflict with upstream changes or become unnecessary if the functionality was merged upstream.
To backport commits from the upstream Indico repository, first configure the upstream remote (one-time setup):
cd indico
git remote add upstream https://github.com/indico/indico.gitFetch the latest changes and cherry-pick commits into our devel branch:
git fetch upstream
git switch devel
git cherry-pick <commit-reference>If conflicts occur or compatibility changes are needed for our pinned version, prefix commit messages with BACKPORTED. This helps identify commits to drop when upgrading to newer Indico versions:
BACKPORTED <original-commit-message>
Note
After cherry-picking, record the submodule changes as described in the previous section.
The repository uses three translation domains: messages.pot (Python files), messages-js.pot (JavaScript) and messages-react.pot (React). Each locale has corresponding .po files that must stay current as strings are added or removed.
Update plugin translations with these steps:
- Extract the latest strings from the codebase:
indico i18n extract plugin ..- Update
.pofiles for all active locales:
indico i18n update plugin ..-
Send
.pofiles to translators for translation -
Compile
.pofiles into.moand.jsonfiles (note:messages-js.podoesn't get compiled):
indico i18n compile plugin ..The plugin currently supports en_GB and fr_FR locales. Initialize a new locale with:
indico i18n init plugin .. --locale es_ESAll commands accept an optional --locale flag to target specific locales:
indico i18n update plugin .. --locale fr_FRTarget specific resources with --python, --react or --javascript:
indico i18n compile plugin .. --locale fr_FR --pythonThe Indico core team maintains their translation files. After pulling a new Indico version, update .mo files to run with the latest translations:
indico i18n compile indicoThe plugin currently manages translations manually by sending .po files to translators. To use Transifex (supported by Indico core):
-
Install the Transifex client and create a
.tx/configfile in the root directory. Copy content from Indico core's.tx/config, adjusting paths based on the Transifex setup -
Push
.pofiles to Transifex:
indico i18n push plugin ..- Pull updated translations from Transifex:
indico i18n pull plugin ..Both commands accept a locale parameter:
indico i18n pull plugin .. es_ES