Skip to content

Latest commit

 

History

History
101 lines (67 loc) · 4.58 KB

CONTRIBUTING.md

File metadata and controls

101 lines (67 loc) · 4.58 KB

Contributing

Thank you for thinking of contributing! We very much welcome contributions from the community. To make the process easier and more valuable for everyone involved we have a few rules and guidelines to follow.

Submitting Issues and Feature Requests

Before you file an issue, please search existing issues in case the same or similar issues have already been filed. If you find an existing open ticket covering your issue then please avoid adding "👍" or "me too" comments; GitHub notifications can cause a lot of noise for the project maintainers who triage the back-log. However, if you have a new piece of information for an existing ticket, and you think it may help the investigation or resolution, then please do add it as a comment! You can signal to the team that you're experiencing an existing issue with one of GitHub's emoji reactions (these are a good way to add "weight" to an issue from a prioritisation perspective).

Submitting an Issue

The New Issue page has templates for both bug reports and feature requests. Please fill one of them out! The issue templates provide details on what information we will find useful to help us fix an issue. In short though, the more information you can provide us about your environment and what behaviour you're seeing, the easier we can fix the issue. If you can push a PR with test cases that trigger a defect or bug, even better!

As well as bug reports we also welcome feature requests (there is a dedicated issue template for these). Typically, the maintainers will periodically review community feature requests and make decisions about if we want to add them. For features, we don't plan to support we will close the feature request ticket (so, again, please check closed tickets for feature requests before submitting them).

Contributing Changes

HoraeDB is written mostly in idiomatic Rust—please see the Style Guide for more details. All code must adhere to the rustfmt format, and pass all of the clippy checks we run in CI (there are more details further down this README).

Making a PR

To open a PR you will need to have a GitHub account. Fork the horaedb repo and work on a branch on your fork. When you have completed your changes, or you want some incremental feedback make a Pull Request to HoraeDB here.

If you want to discuss some work in progress then please prefix [WIP] to the PR title.

For PRs that you consider ready for review, verify the following locally before you submit it:

  • you have a coherent set of logical commits, with messages conforming to the Conventional Commits specification;
  • all the tests and/or benchmarks pass, including documentation tests;
  • the code is correctly formatted and all clippy checks pass; and
  • you haven't left any "code cruft" (commented out code blocks etc).

There are some tips on verifying the above in the next section.

After submitting a PR, you should:

  • verify that all CI status checks pass and the PR is 💚;
  • ask for help on the PR if any of the status checks are 🔴, and you don't know why;
  • wait patiently for one of the team to review your PR, which could take a few days.

Running Tests

The cargo build tool runs tests as well. Run:

cargo test --workspace

Enabling logging in tests

To enable logging to stderr during a run of cargo test set the Rust RUST_LOG environment variable. For example, to see all INFO messages:

RUST_LOG=info cargo test --workspace

Integration tests

We have integration test suits in the SQL level so any change that may have influence on the user-facing query execution should be covered by the integration test. Refer to this document for more information.

Running rustfmt and clippy

CI will check the code formatting with rustfmt and Rust best practices with clippy.

To automatically format your code according to rustfmt style, first make sure rustfmt is installed using rustup:

rustup component add rustfmt

Then, whenever you make a change and want to reformat, run:

cargo fmt --all

Similarly, with clippy, install with:

rustup component add clippy

And run with:

cargo clippy --all-targets --workspace -- -D warnings