Contributing to bidser
Source:.github/CONTRIBUTING.md
Thank you for your interest in contributing to bidser! This document outlines the development workflow and continuous integration setup.
Development Workflow
- Fork the repository and create a new branch for your feature/fix
- Make changes following the existing code style
- Add tests for any new functionality
- Update documentation if needed
- Submit a pull request with a clear description
Continuous Integration
This package uses GitHub Actions for continuous integration with the following workflows:
Core Workflows
- R-CMD-check.yaml: Comprehensive package checking across multiple operating systems (Ubuntu, macOS, Windows) and R versions (devel, release, oldrel-1)
- test-coverage.yaml: Runs test suite and uploads coverage reports to Codecov
-
lint.yaml: Code style checking using the
lintr
package
Code Style
- We use
lintr
for code style checking (configured in.lintr
) - Line length limit: 120 characters
- Follow existing naming conventions in the codebase
Testing
- All new functions should have corresponding tests in
tests/testthat/
- Tests are run automatically on all platforms via GitHub Actions
- Aim for good test coverage (current coverage tracked via Codecov)
Local Development
# Install development dependencies
devtools::install_dev_deps()
# Run tests locally
devtools::test()
# Check package
devtools::check()
# Check code style
lintr::lint_package()
Example Data
The package uses BIDS example datasets for testing and documentation. These are cached to improve performance:
- Don’t call
unlink()
on dataset paths in examples - Use
get_example_bids_dataset()
which has intelligent caching - Clear cache if needed with
clear_example_bids_cache()