Thank you for your interest in contributing to NeMo Anonymizer! This document provides guidelines and information for contributors.
Please read our Code of Conduct before contributing.
- Getting Started
- Repository Settings
- Pull Request Process
- Issues and Discussions
- Developer Certificate of Origin
- Testing
- Code Style
Note: Dev tools like ruff and ty are installed automatically by
uv sync --group dev.
- Fork the repository on GitHub
- Clone your fork:
git clone https://github.com/<your-username>/anonymizer.git
cd anonymizer- Set up the development environment:
# Install Python dependencies (includes ruff, ty, pre-commit, pytest)
make bootstrap # dev dependencies
make install-dev-docs # dev + docs dependencies (needed for make docs-serve)
# Install pre-commit hooks
make install-pre-commit- Add the upstream remote:
git remote add upstream https://github.com/NVIDIA-NeMo/anonymizer.gitThis repository uses GitHub Rulesets to enforce consistent contribution standards. These rules are automatically enforcedβyou don't need to configure anything, but you should understand them to contribute successfully.
All branches (except main) must follow this naming pattern:
<author>/<description>
<author>/<issue-id>-<description>
<author>/<type>/<description>
<author>/<type>/<issue-id>-<description>
Rules:
<author>: Your GitHub username (lowercase, alphanumeric, hyphens allowed)<issue-id>: Optional GitHub issue number prefix (e.g.,123-)<description>: Brief description (lowercase, alphanumeric, hyphens)<type>: Optional category prefix
Valid types: feature, bugfix, hotfix, release, docs, chore, test
Examples:
| Branch Name | Valid |
|---|---|
jsmith/add-login-feature |
β |
jsmith/123-add-login-feature |
β |
jsmith/feature/123-add-login |
β |
aagonzales/bugfix/456-fix-crash |
β |
dev-team/docs/update-readme |
β |
feature/add-login |
β Missing author |
JSmith/123-Add-Login |
β Must be lowercase |
All commits merged to main must follow the Conventional Commits specification:
<type>(<scope>): <description>
or without scope:
<type>: <description>
Rules:
<type>: Required, must be one of the valid types below<scope>: Optional, indicates the area of the codebase affected<description>: Required, brief description (max 100 characters)- Add
!after type/scope for breaking changes
Valid types:
| Type | Description |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation changes |
style |
Code style changes (formatting, no logic change) |
refactor |
Code refactoring (no feature or fix) |
perf |
Performance improvements |
test |
Adding or updating tests |
build |
Build system or dependencies |
ci |
CI/CD configuration |
chore |
Maintenance tasks |
revert |
Reverting previous commits |
Examples:
| Commit Message | Valid |
|---|---|
feat: add user authentication |
β |
fix(auth): resolve token expiration bug |
β |
docs: update API documentation |
β |
chore(deps)!: bump major dependencies |
β Breaking change |
Added new feature |
β Missing type |
fix - resolve bug |
β Wrong format |
FIX: resolve bug |
β Type must be lowercase |
Since we use squash merging, your PR title should follow this format as it becomes the commit message.
Release tags must follow Semantic Versioning:
MAJOR.MINOR.PATCH[-prerelease][+build]
Examples:
| Tag | Valid |
|---|---|
1.0.0 |
β |
2.1.3 |
β |
1.0.0-alpha |
β |
1.0.0-beta.1 |
β |
1.0.0-rc.1+build.123 |
β |
v1.0.0 |
β No v prefix |
release-1.0 |
β Wrong format |
The main branch has the following protections:
| Rule | Setting |
|---|---|
| Required approvals | 1 |
| Code owner review | Required |
| Dismiss stale reviews | No |
| Require conversation resolution | Yes |
| Linear history | Required |
| Force pushes | Blocked |
| Deletions | Blocked |
| Merge strategy | Squash only |
- Create an issue first (if one doesn't exist) to discuss the change
- Create a branch following the naming convention:
git checkout -b <username>/<issue-id>-<description>- Make your changes and commit using conventional commits
- Run tests locally:
make test- Push your branch:
git push origin <your-branch>- Open a Pull Request using the PR template
- Address review feedback β reviewers from CODEOWNERS will be automatically assigned
- Merge β once approved, your PR will be squash-merged and the branch auto-deleted
- All
srcandtestsfiles:@NVIDIA-NeMo/anonymizer-reviewers - All remaining files (
pyproject.toml,uv.lock,SECURITY.md,LICENSE,.github/, etc.):@NVIDIA-NeMo/anonymizer-maintainers
We provide structured issue templates:
- Bug Report β Report a bug with reproduction steps
- Feature Request β Propose a new feature
- Development Task β Track internal development work
For general questions, please use GitHub Discussions instead of opening an issue.
All contributions must be signed off to certify that you have the right to submit the code. This is done by adding a Signed-off-by line to your commit messages.
Sign off your commits:
git commit -s -m "feat: add new feature"This adds a line like:
Signed-off-by: Your Name <your.email@example.com>
By signing off, you certify the Developer Certificate of Origin:
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or
(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications...
See the full DCO file for details.
# Run unit tests
make test
# Run tests with coverage report
make coverage
# Run end-to-end tests
make test-e2e
# Run a specific test file
uv run pytest tests/engine/test_detection_workflow.pyBefore submitting a PR:
- All existing tests pass (
make test) - New features include tests
- Bug fixes include regression tests
We use Ruff for code formatting and import sorting, and ty for type checking. Both run on changed files against main.
# Format code and sort imports (auto-fixes in place)
make format
# Check formatting without modifying files (used in CI)
make format-check
# Type check with ty (advisory, non-blocking)
make typecheck
# Run all read-only checks (format-check + typecheck + lock-check)
make checkWe recommend setting up pre-commit hooks to catch formatting, linting, and type issues before committing:
make install-pre-commitThis installs hooks that run Ruff (format + lint), ty type checking, and uv lock verification on each commit.
Note: If
pyproject.tomlchanges anduv.lockis stale, the uv-lock hook regeneratesuv.lockand then fails the commit. Rungit add uv.lockand retry.
# Start local docs server with live-reload
make install-dev-docs # first time only
make docs-serve # visit http://127.0.0.1:8000
# Build docs locally (strict mode catches broken links)
make docs-buildThank you for contributing to NeMo Anonymizer!