Skip to content

Latest commit

 

History

History
88 lines (63 loc) · 2.88 KB

CONTRIBUTING.md

File metadata and controls

88 lines (63 loc) · 2.88 KB

Contributing to scylla-rust-driver

Thank you for your interest in contributing to our driver!

Pre-review checklist

Before submitting a PR with your patch for review, make sure it will satisfy the following requirements:

  • Your patch is split into commits. Each commit introduces one, logically coherent change to the codebase.
  • Commit messages should clearly explain what is being changed in the commit, and what is the reason for the change.
  • New features and bug fixes are covered with tests.
  • Every commit in your patch compiles, passes static checks and passes all tests.
  • The description of your PR explains the reason and motivation for the patch.
  • If patch fixes an issue, there should be a Fixes: #XYZ line at the end of PR's description.

In case any of those requirements can't be met, please include the reason for this in your PR's description. A maintainer can make an exception and merge the PR if the reason is justified.

Review and merging

After submitting a PR which meets all criteria from the previous section, it will be reviewed by one or more maintainers. When the maintainers become satisfied with your contribution, one of them will merge it.

Currently, the list of people maintaining the fork include:

  • Piotr Sarna (@psarna)
  • Piotr Dulikowski (@piodul)

Static checks

Currently, we require new PRs to compile without warnings, pass cargo fmt and cargo clippy checks.

Testing

The easiest way to setup a running Scylla instance is to use the Scylla Docker image: You need a running Scylla instance for the tests.

Execute the commands below to run the tests:

# Downloads and runs Scylla in Docker
docker run --name scylla-ci -d scylladb/scylla

# Run all tests
SCYLLA_URI="$(docker inspect --format='{{ .NetworkSettings.IPAddress }}' scylla-ci):19042" cargo test -- --test-threads=1

Contributing to the book

The documentation book is written using mdbook
Book source is in docs/source
This source has to be compatible with Sphinx so it might sometimes contain chunks like:

```eval_rst
something
```

But they are removed when building the book

mdbook can be installed using:

cargo install mdbook

Build the book (simple method, contains Sphinx artifacts):

mdbook build docs
# HTML will be in docs/book

To build the release version use a script which automatically removes Sphinx chunks:

python3 docs/build_book.py
# HTML will be in docs/book/scriptbuild/book

Or serve it on a local http server (automatically refreshes on changes)

mdbook serve docs

Test code examples (requires a running scylla instance):

# Make a clean debug build, otherwise mdbook has problems with multiple versions
cargo clean
cargo build --examples

mdbook test -L target/debug/deps/ docs