Overview
GOV.UK Notify Admin is an open-source government project. We welcome contributions from the community while maintaining high standards for code quality, testing, and documentation.Getting Started
Prerequisites
- Python 3.13 - The version used in production
- Node.js - Install via Homebrew or use nvm for version management
- uv - Python dependency management tool
- pre-commit - For automated code quality checks
Initial Setup
-
Fork and clone the repository
-
Create environment configuration
Create a file called
environment.shwith the following content: -
Install uv for dependency management
-
Install pre-commit hooks
-
Bootstrap the project
Development Workflow
Creating a Feature Branch
Always create a new branch for your work:feature/- for new featuresfix/- for bug fixesrefactor/- for code refactoringdocs/- for documentation updates
Making Changes
-
Run the development server
The app will be available at localhost:6012.
-
Watch frontend changes
If working with JavaScript or CSS:
- Write tests All new features and bug fixes must include tests. See Testing Strategy for details.
Pre-commit Hooks
Pre-commit hooks automatically run before each commit to:- Remove trailing whitespace
- Fix end-of-file formatting
- Validate YAML syntax
- Check for debug statements
- Run Ruff linter and formatter on Python code
.pre-commit-config.yaml:
Running Tests
Before submitting a pull request:Committing Your Changes
Commit Message Guidelines
Write clear, concise commit messages:- Use the imperative mood (“Add feature” not “Added feature”)
- Keep the first line under 72 characters
- Reference issue numbers when applicable
- Explain the “why” not just the “what”
Commit Workflow
Pull Request Process
Before Submitting
- All tests pass locally
- Code follows the style guide
- New code has appropriate test coverage
- Documentation is updated if needed
- Pre-commit hooks pass without errors
Creating a Pull Request
-
Push your branch to your fork
-
Open a pull request on GitHub against the
mainbranch -
Write a clear PR description
Include:
- Summary of changes
- Why this change is needed
- Any breaking changes
- Screenshots for UI changes
- Testing steps
- Wait for review Maintainers will review your PR and may request changes.
Responding to Review Feedback
- Address all feedback promptly
- Push new commits to the same branch
- Reply to comments to confirm changes
- Don’t force-push unless requested
CI/CD Checks
Your PR must pass all automated checks:- Python linting (Ruff)
- JavaScript linting (ESLint)
- SCSS linting (Stylelint)
- Python tests (pytest)
- JavaScript tests (Jest)
Code Review Guidelines
What Reviewers Look For
- Correctness: Does the code work as intended?
- Testing: Is there adequate test coverage?
- Style: Does it follow project conventions?
- Security: Are there any security implications?
- Performance: Are there any performance concerns?
- Maintainability: Is the code readable and well-organized?
Review Etiquette
- Be respectful and constructive
- Assume good intent
- Explain the reasoning behind suggestions
- Approve PRs when all concerns are addressed
Getting Help
- Documentation Issues: Check the README and existing docs
- Technical Questions: Open a GitHub Discussion
- Bug Reports: Create a detailed issue with reproduction steps
- Security Issues: Follow responsible disclosure practices