Contributingο
Contributing to the SML fMRI Preprocessing Templateο
Welcome!ο
Thank you for considering contributing to our labβs fMRI preprocessing pipeline. We created this template to be community-driven, as we believe the best preprocessing practices emerge from collective expertise and rigorous discussion.
How Can I Contribute?ο
Scientific Contributionsο
Identify potential issues in preprocessing steps
Suggest improvements based on recent literature
Share knowledge about best practices
Question assumptions in our implementation
Propose new validation checks
Technical Contributionsο
Bug fixes
Code optimization
Documentation improvements
Example additions
Test cases
Contribution Processο
Start with an Issue
Search existing issues first
Create a new issue to discuss your proposed changes
Wait for maintainer feedback before significant work
Fork & Create Branch
Fork the repository
Create a branch for your changes
Use clear branch names (e.g.,
fix-fieldmap-volumes,improve-distortion-correction)
Make Changes
Follow existing code style
Add comments explaining preprocessing decisions
Update documentation as needed
Add tests if applicable
Use conventional commit messages (see below)
Submit Pull Request
Provide clear description of changes
Link related issues
Include scientific rationale for preprocessing changes
Add before/after examples if possible
Pull Request Guidelinesο
Scientific Validity
Explain the scientific rationale for changes
Cite relevant literature
Describe impact on preprocessing quality
Code Quality
Follow Python (PEP 8) and Shell script conventions
Include comments explaining preprocessing decisions
Maintain existing error checking patterns
Add appropriate logging
Documentation
Update README (only if needed)
Add inline documentation
Update parameter descriptions
Include clear and generalizable examples
Testing
Add validation checks
Test with different data types
Verify BIDS compliance
Check edge cases
Commit Message Guidelinesο
This project uses Conventional Commits for automated changelog generation and semantic versioning.
Formatο
<type>(<scope>): <subject>
Typesο
feat: New feature (MINOR version bump)fix: Bug fix (PATCH version bump)docs: Documentation only changesstyle: Formatting changes (no code change)refactor: Code refactoringperf: Performance improvementstest: Adding or updating testsbuild: Build system changesci: CI configuration changeschore: Other changes (no src/test changes)
Breaking Changesο
Add ! after type or BREAKING CHANGE: in footer for MAJOR version bump:
feat!: remove deprecated API
BREAKING CHANGE: The old API endpoint has been removed.
Examplesο
Feature:
feat(preprocessing): add multi-echo support
Bug Fix:
fix(fieldmap): correct IntendedFor mapping
Fixes #123
Documentation:
docs: update configuration guide
Release Processο
Releases are automated via GitHub Actions:
Commits are analyzed on push to main
Version is determined from commit messages
Changelog is generated automatically
GitHub release is created
See Semantic Versioning for version numbering details.
Questions?ο
Feel free to:
Open an issue for discussion
Ask for clarification on existing issues
Request more detailed contribution guidelines
We appreciate your help in maintaining high-quality preprocessing standards!
cheers, shawn
Commit Message Guidelinesο
This project uses Conventional Commits for automated changelog generation and semantic versioning.
Commit Message Formatο
Each commit message should follow this structure:
<type>(<scope>): <subject>
<body>
<footer>
Typesο
feat: A new feature (triggers MINOR version bump)fix: A bug fix (triggers PATCH version bump)docs: Documentation only changesstyle: Changes that donβt affect code meaning (formatting, etc.)refactor: Code change that neither fixes a bug nor adds a featureperf: Performance improvementstest: Adding or updating testsbuild: Changes to build system or dependenciesci: Changes to CI configuration files and scriptschore: Other changes that donβt modify src or test files
Breaking Changesο
Add ! after the type or BREAKING CHANGE: in the footer to trigger
a MAJOR version bump:
feat!: remove deprecated API endpoint
BREAKING CHANGE: The /api/v1/old endpoint has been removed.
Use /api/v2/new instead.
Examplesο
Feature Addition:
feat(preprocessing): add support for multi-echo fMRI
Implement multi-echo fMRI preprocessing workflow with optimal
combination of echoes using tedana.
Bug Fix:
fix(fieldmap): correct IntendedFor field mapping
Fix issue where fieldmap IntendedFor fields were not properly
updated for runs with non-sequential numbering.
Fixes #123
Documentation:
docs: update configuration guide with new parameters
Add documentation for FMRIPREP_OUTPUT_SPACES and clarify
fieldmap mapping syntax.
Breaking Change:
feat!: update to fMRIPrep 24.0.0
BREAKING CHANGE: Update to fMRIPrep 24.0.0 which requires
different output space syntax. Update settings.template.sh
accordingly.
Scopeο
Optional, but recommended. Common scopes include:
preprocessingfieldmapconfigworkflowdocsci
Release Processο
Releases are automated using GitHub Actions. When commits are pushed to the main branch:
The workflow analyzes commit messages
Determines the appropriate version bump (MAJOR, MINOR, or PATCH)
Generates a changelog from commits
Creates a Git tag
Publishes a GitHub release
Manual Releaseο
To manually trigger a release with a specific version bump:
Go to Actions β Release workflow
Click βRun workflowβ
Select the version bump type (major, minor, or patch)
Click βRun workflowβ
Version Numberingο
This project follows Semantic Versioning:
MAJOR version: Incompatible API changes or breaking changes
MINOR version: New features in a backwards compatible manner
PATCH version: Backwards compatible bug fixes
Development Workflowο
1. Fork and Branchο
git clone https://github.com/your-username/fmri.git
cd fmri
git checkout -b feat/your-feature-name
2. Make Changesο
Follow the contribution guidelines in CONTRIBUTING.md:
Write clear, documented code
Add tests if applicable
Update documentation
Use conventional commit messages
3. Test Locallyο
Test your changes before submitting:
# Test with a single subject
./launch
# Verify BIDS compliance
bids-validator /path/to/test/data
4. Commit Changesο
Use conventional commit format:
git add .
git commit -m "feat(preprocessing): add new validation check"
5. Push and Create PRο
git push origin feat/your-feature-name
Then create a Pull Request on GitHub with:
Clear description of changes
Link to related issues
Scientific rationale (if applicable)
Before/after examples (if applicable)
Code Review Processο
Automated checks run on your PR
Maintainers review your changes
Address any feedback
Once approved, your PR will be merged
Release workflow will automatically handle versioning
Changelog Maintenanceο
The CHANGELOG.md file is automatically updated by the release workflow. You donβt need to manually edit it when contributing.
Documentationο
Documentation is built automatically on ReadTheDocs when changes are pushed.
To build documentation locally:
cd docs
pip install sphinx sphinx-rtd-theme myst-parser
make html
open _build/html/index.html
Questions?ο
Open an issue for discussion
Ask for clarification on existing issues
Contact maintainers through GitHub
We appreciate your contributions to maintaining high-quality preprocessing standards!