Contributing
Contributions welcome! Please follow this workflow to contribute to Aether.
Getting Started
Prerequisites
- Go 1.25+ (download)
- Make
- Git
- Docker & Docker Compose (for integration tests)
Setting Up Your Development Environment
- Fork and clone the repository:
bash
git clone https://github.com/YOUR_USERNAME/aether.git
cd aether- Add upstream remote:
bash
git remote add upstream https://github.com/trobanga/aether.git
git fetch upstream- Install dependencies and build:
bash
make build- Run tests to verify setup:
bash
make testDevelopment Workflow
Before Starting
- Ensure your repository is up-to-date:
bash
git checkout main
git pull upstream main- Run all tests to ensure baseline:
bash
make testCreating a Feature Branch
bash
# Create a descriptive branch name
git checkout -b feature/your-feature-name
# Examples: feature/add-validation-step, fix/retry-logic, docs/architectureTDD Development Cycle
Follow strict Test-Driven Development:
Write failing test (RED phase):
bashvim internal/pipeline/your_feature_test.go # Write test that describes desired behavior go test -v ./internal/pipeline/ -run TestYourFeature # Should failImplement minimum code (GREEN phase):
bashvim internal/pipeline/your_feature.go # Implement minimum logic to pass test go test -v ./internal/pipeline/ -run TestYourFeature # Should passRefactor (REFACTOR phase):
bash# Improve code quality while keeping tests green make test # All tests should still pass
Code Quality Checks
Before committing, ensure code quality:
bash
# Format and lint
make check
# Run all tests
make test
# Check coverage
make coverageCommit Message Format
Write clear, descriptive commit messages:
bash
# Good commit messages
git commit -m "feat: add validation step to pipeline"
git commit -m "fix: correct retry backoff calculation"
git commit -m "docs: update TORCH integration guide"
git commit -m "refactor: simplify state persistence logic"
git commit -m "test: add table-driven tests for TORCH import step"
# Avoid vague messages
# ❌ git commit -m "fix stuff"
# ❌ git commit -m "update code"
# ✅ git commit -m "fix: handle empty FHIR bundles gracefully"Pull Request Process
Before Opening a PR
- Rebase on main:
bash
git fetch upstream
git rebase upstream/main- Push your branch:
bash
git push origin feature/your-feature-name- Ensure all checks pass locally:
bash
make check # Format and lint
make test # Unit tests
make coverage # Check coverageCreating a Pull Request
Open a PR on GitHub with:
- Title: Clear description of what the change does
- Description: Reference the issue (if applicable), explain the change
- Examples:
- "Add validation step to pipeline"
- "Fix retry backoff exponential calculation"
- "Update TORCH integration documentation"
PR Description Template:
markdown
## Summary
Brief description of the change.
## Motivation
Why is this change needed?
## Changes
- Detailed list of changes
- One per line
## Testing
How was this tested?
- Unit test: `TestNewFeature`
- Integration test: Test with TORCH + DIMP
- Manual testing: Steps to verify
## Checklist
- [ ] All tests pass locally (`make test`)
- [ ] Code coverage maintained (`make coverage`)
- [ ] Follows functional programming principles
- [ ] No unnecessary external dependencies
- [ ] Documentation updated (if needed)Code Review Expectations
Your PR will be reviewed for:
- ✅ All tests pass - Including unit, integration, and contract tests
- ✅ Code coverage maintained - No decrease in coverage
- ✅ Functional programming - Immutability, pure functions, explicit side effects
- ✅ KISS principle - Simple, understandable code
- ✅ Documentation - Comments explaining "why", not "what"
- ✅ No unnecessary dependencies - Use standard library first
Review Cycle
- Submit PR → Automatic CI checks run
- Address feedback → Maintainers may request changes
- Update PR → Push additional commits with fixes
- Approval → PR approved and ready to merge
- Merge → Squash commits and merge to main
Development Tips
Running Specific Tests
bash
# Run tests for specific package
go test -v ./internal/pipeline/...
# Run specific test function
go test -v ./internal/pipeline/ -run TestImportStep
# Run with verbose output
go test -v -count=1 ./...
# Run with race detector
go test -race ./...Debugging
bash
# Enable debug logging
AETHER_LOG_LEVEL=debug ./bin/aether pipeline start test.crtdl
# Run with CPU profile
go test -cpuprofile=cpu.prof ./...
go tool pprof cpu.profTesting with Services
bash
# Start test environment
cd .github/test
make services-up
# Run full test suite
cd ../..
make test-with-services
# Stop services
cd .github/test
make services-downCommon Tasks
Adding a New Pipeline Step
Note: The import step types (torch, local_import, http_import) are already implemented. This section is for adding new processing steps after import.
- Create model in
internal/models/step.go - Write tests in
tests/unit/{step_name}_test.go - Implement step in
internal/pipeline/{step_name}.go - Update CLI in
cmd/pipeline.goif needed - Update docs in
docs/guides/pipeline-steps.md
Example:
bash
# 1. Write test first (TDD!)
vim tests/unit/validation_test.go
# 2. Run test (should fail)
go test -v ./tests/unit/ -run TestValidation
# 3. Implement
vim internal/pipeline/validation.go
# 4. Run test (should pass)
go test -v ./tests/unit/ -run TestValidation
# 5. Verify all tests still pass
make test
# 6. Commit with descriptive message
git commit -m "feat: add validation step to pipeline"Fixing a Bug
- Create test that reproduces the bug
- Verify test fails (confirms bug exists)
- Implement fix in the code
- Verify test passes
- Ensure no regressions with
make test
Updating Documentation
bash
# Update relevant .md files in docs/
vim docs/guides/torch-integration.md
# Build docs locally to verify (if available)
npm run docs:dev
# Commit documentation changes
git commit -m "docs: update TORCH integration guide"Code Standards
What We Value
- Clarity: Code should be easy to understand
- Simplicity: Simple solutions over complex ones
- Testability: Code is written to be tested
- Immutability: Data structures don't change
- Composability: Functions work well together
What We Avoid
- ❌ Unnecessary complexity
- ❌ Global state or side effects outside services
- ❌ Comments that just repeat the code
- ❌ External dependencies without discussion
- ❌ Inconsistent error handling
See Coding Guidelines for detailed standards.
Getting Help
- Questions? Open a discussion on GitHub
- Found a bug? Create an issue with reproduction steps
- Have an idea? Open an issue to discuss before implementing
Recognition
Contributors are recognized in:
- Commit history (your name in git)
- Project README (for significant contributions)
- Release notes (for features/fixes included in releases)
Next Steps
- Testing Guidelines - Write effective tests
- Coding Guidelines - Code style and standards
- Architecture - System design overview