Thank you for your interest in contributing to fqtk! This document provides guidelines and information for contributors.
- Code of Conduct
- Getting Started
- Development Workflow
- Issue Tracker
- Pull Requests
- Coding Guidelines
- Testing
- Documentation
- Release Process
- License
This project follows the Fulcrum Genomics Code of Conduct. By participating, you are expected to uphold it. Please be respectful and considerate in all interactions.
- Rust — the required toolchain version is pinned in
rust-toolchain.tomland installed automatically byrustupwhen you build. Using a different toolchain may surfaceclippylints that are not enforced by CI. - Git
-
Fork the repository on GitHub
-
Clone your fork:
git clone https://github.com/YOUR_USERNAME/fqtk.git cd fqtk
-
Add the upstream repository as a remote:
git remote add upstream https://github.com/fulcrumgenomics/fqtk.git -
Build the project:
cargo build -
Run the tests to ensure everything is working:
cargo test
-
Sync your fork with upstream:
git fetch upstream git checkout main git merge upstream/main
-
Create a new branch for your changes:
git checkout -b feature/your-feature-name
-
Make your changes in your feature branch
-
Ensure your code follows the project's coding standards (see Coding Guidelines)
-
Write or update tests as needed
-
Run the pre-commit checks before committing:
./ci/check.shThis script runs:
cargo fmt- Code formattingcargo clippy- Lintingcargo test- Unit tests- README usage check - verifies the embedded
fqtk demuxusage is up to date
- Write clear, concise commit messages
- Use the imperative mood in commit messages (e.g., "Add feature" not "Added feature")
- Reference relevant issues in your commit messages when applicable (e.g., "Fix #123")
Bugs and feature requests are tracked on the GitHub issue tracker. Before opening a new issue, search existing issues to see if it has already been reported.
To open an issue, choose one of the issue templates and fill in the prompts:
- Bug report - for something that isn't working as expected
- Feature request - to propose new functionality
The templates prompt for the details maintainers need (such as reproduction steps, environment, and the motivating use case), so please fill them in as completely as you can.
bug- Something isn't workingenhancement- New feature or requestdocumentation- Documentation improvementsgood first issue- Good for newcomers
-
Run the full pre-commit checks locally and make sure they pass:
./ci/check.sh -
Push your branch to your fork:
git push origin feature/your-feature-name -
Open a pull request against the
mainbranch of the upstream repository.
When you open a pull request, the pull request template provides a checklist and prompts for the change description, related issues, and any breaking changes. Please complete it before requesting review.
- All PRs require review before merging
- CI checks must pass (formatting, linting, tests)
- Address reviewer feedback promptly
- Keep PRs focused and reasonably sized when possible
fqtk follows standard Rust conventions and uses automated tools to ensure consistency:
- Formatting: Use
cargo fmtto format your code - Linting: Use
cargo clippyand resolve all warnings
These, the tests, and the README usage check (see Updating the README) are all run by ./ci/check.sh, which mirrors the checks CI enforces; run it before pushing.
- Write idiomatic Rust code
- Prefer clarity over cleverness
- Document public APIs with doc comments
- Handle errors appropriately using
Resultandanyhow - Avoid
unwrap()in library code; use proper error handling - Keep functions focused and reasonably sized
- Be conservative when adding new dependencies
- Prefer well-maintained, widely-used crates
- Justify new dependencies in your PR description
# Run all tests
cargo test
# Run tests with output
cargo test -- --nocapture
# Run a specific test
cargo test test_name- Add tests for new functionality
- Add regression tests for bug fixes
- Place unit tests in the same file as the code being tested using
#[cfg(test)]modules - Use descriptive test names that explain what is being tested
The repository README contains a copy of the fqtk demux usage, which must be manually kept in sync with the tool.
When updating the tool's arguments or docstring, refresh the README by running the included script:
bash .github/scripts/update-docs.shGitHub Actions will verify that the README remains up-to-date, and commits with outdated usage will fail CI. Running ./ci/check.sh performs this same check locally.
- Add doc comments (
///) to public functions, structs, and modules - Include examples in doc comments where helpful; these are compiled and run as part of
cargo test:/// Returns the sum of two numbers. /// /// # Example /// ``` /// assert_eq!(add(2, 3), 5); /// ``` pub fn add(a: i32, b: i32) -> i32 { a + b }
- Keep documentation up to date with code changes
- Preview the rendered documentation locally with
cargo doc --open
Releases are automated by the maintainers using release-plz, which opens a release PR and publishes to crates.io when that PR is merged.
This project follows Semantic Versioning:
- MAJOR version for incompatible API changes
- MINOR version for backwards-compatible new functionality
- PATCH version for backwards-compatible bug fixes
release-plz derives the next version from the Conventional Commits merged since the last release, so following the commit conventions above directly drives versioning and the changelog.
See the README for the detailed release flow.
By contributing to fqtk, you agree that your contributions will be licensed under the MIT License.
All contributions must be compatible with the MIT license. Do not include code from sources with incompatible licenses.
Thank you for contributing to fqtk!