Skip to content

Latest commit

 

History

History
118 lines (71 loc) · 3.6 KB

CONTRIBUTING.md

File metadata and controls

118 lines (71 loc) · 3.6 KB

Contributing

All contributors and contributions are welcome! Please open an issue on GitHub if you have issues, questions or ideas.

GitHub

Pull requests

Substrait follows the Conventional Commits specification for commit messages. This allows for automation of releases based on commit messages that are merged to the default branch.

The Conventional Commits job of the Pull Request workflow check the Pull Request title and body and the resulting merge commit message.

Releases

Releases are published automatically with the Release workflow. The workflow is triggered for every commit to the main branch. cargo-smart-release is used to bump the version, create and publish the new release.

Dependabot

substrait-rs uses Depedendabot to update dependencies using the dependabot.yml configuration file.

Prettier

substrait-rs uses Prettier to format non-Rust source files. The Formatting job in the Check workflow checks this. To format your files locally (requires Node.js):

npm install prettier prettier-plugin-toml --save-dev --save-exact
npx prettier --write --no-config .

Governance

Please refer to the Substrait Governance page.

Community

Please refer to the Substrait Community page.

License

All contributions should be licensed under Apache License, Version 2.0. All source files must have a valid SPDX license header. The SPDX License Header job in the Check workflow checks this.

Substrait requires all contributors to sign the Contributor License Agreement (CLA). There is a GitHub app installed to help new contributors sign it.

Development

Requirements

In environments where no protoc is available the protoc feature can be enabled to build protoc from source:

cargo build --features protoc

Substrait submodule

There is a git submodule for Substrait that must be cloned when building from source.

git clone --recurse-submodules [email protected]:substrait-io/substrait-rs.git

When the Substrait version is bumped make sure to update your local submodule.

git submodule update

Formatting, lints and tests are checked in the Test workflow.

Docs

Rustdoc

The crate documentation is built with rustdoc:

cargo doc

Or to enable automatic feature information (requires a nightly toolchain):

cargo +nightly rustdoc -- --cfg docsrs

Or use cargo-doc-rs:

cargo +nightly docs-rs

Formatting

All Rust code is formatted using rustfmt:

cargo fmt

Linting

All Rust code passes Clippy lints without warnings:

cargo clippy -- -Dwarnings

Tests

To run tests and documentation tests:

cargo test