Your First Databend Pull Request
Databend is an open source project, you can help with ideas, code, or documentation, we appreciate any efforts that help us to make the project better!
This document is a short guide for the people who want to contribute to Databend.
Our goal is to make contributing to the Databend project easy and transparent.
Thank you.
tip
Once the code been merged, your name will be stoned in the system.contributors
table forever.
SELECT * FROM system.contributors
Prerequisitesβ
Databend is written in Rust, to build Databend from scratch you will need to install the following tools:
- Git
- Rust Install with rustup
Coding Guidelinesβ
Code Format and Analysisβ
$ make lint
Code Documentationβ
Any public fields, functions, and methods should be documented with Rustdoc.
Please follow the conventions as detailed below for modules
, structs
, enums
, and functions
. The single line is used as a preview when navigating Rustdoc. As an example, see the 'Structs' and 'Enums' sections in the collections Rustdoc.
/// [Single line] One line summary description
///
/// [Longer description] Multiple lines, inline code
/// examples, invariants, purpose, usage, etc.
[Attributes] If attributes exist, add after Rustdoc
Example below:
/// Represents (x, y) of a 2-dimensional grid
///
/// A line is defined by 2 instances.
/// A plane is defined by 3 instances.
#[repr(C)]
struct Point {
x: i32,
y: i32,
}
Pull Requestsβ
Submit a PRβ
- Fork the
databend
repo and create your branch frommain
. - Open a regular issue for binding the pull request.
- Submit a Draft Pull Requests, tag your work in progress.
- If you have added code that should be tested, add unit tests.
- Verify and ensure that the test suites passes,
make test
. - Make sure your code passes both linters,
make lint
. - Change the status to βReady for reviewβ.
- Watch out the replies from the @datafuse-bots, she will be your guide.
PR Templateβ
Databend has a Pull Request Template:
I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/
## Summary
Summary about this PR
## Changelog
- New Feature
- Bug Fix
- Improvement
- Performance Improvement
- Build/Testing/CI
- Documentation
- Other
- Not for changelog (changelog entry is not required)
## Related Issues
Fixes #issue
You should not change the PR template context, but need to finish:
Summary
- Describes what constitutes the Pull Request and what changes you have made to the code.Changelog
- Choose one or more, this is used for tagging label, then used to generate the changelog.Related Issues
- Fixes which issue, the issue will be closed once the commit is merged into the main brach.
PR Commit Messageβ
Format: <type>(<scope>): <subject>
<scope>
is optional
fix(functions): fix group by string bug
^--^ ^------------^
| |
| +-> Summary in present tense.
|
+-------> Type: chore, docs, feat, fix, refactor, style, or test.
More types:
feat
: (new feature for the user)fix
: (bug fix for the user)docs
: (changes to the documentation)style
: (formatting, missing semi colons, etc; no production code change)refactor
: (refactoring production code, eg. renaming a variable)test
: (adding missing tests, refactoring tests; no production code change)chore
: (updating grunt tasks etc; no production code change)
Testingβ
Unit tests
$ make unit-test
Stateless tests
$ make stateless-test
Issuesβ
Databend uses GitHub issues to track bugs. Please include necessary information and instructions to reproduce your issue.
Documentationβ
All developer documentation is published on the Databend developer site, databend.rs.
Code of Conductβ
Please refer to the Code of Conduct, which describes the expectations for interactions within the community.