Skip to content

Commit 459e832

Browse files
chore: update contributing.md (#1206)
## What changes are proposed in this pull request? update contributing.md to reflect out process and guide contributors to get some feedback early [link to rendered contributing.md](https://github.com/delta-io/delta-kernel-rs/blob/09957e00396a31374bcb0e43e8e38a7b4d927190/CONTRIBUTING.md) ## How was this change tested? N/A - docs
1 parent e9a4565 commit 459e832

File tree

1 file changed

+78
-13
lines changed

1 file changed

+78
-13
lines changed

CONTRIBUTING.md

Lines changed: 78 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,90 @@
1-
# How to contribute to Delta Kernel Rust
1+
# Contributing to Delta Kernel (Rust)
22

3-
Welcome! We'd love to have you contribute to Delta Kernel Rust!
3+
> [!NOTE]
4+
> **Found a bug?** Please first search [existing issues] to avoid duplicates. If you find a related
5+
> issue, add your details there. Otherwise, open a new issue with a reproducible example including
6+
> Rust version, delta-kernel-rs version, code executed, and error message.
47
5-
## Did you find a bug?
8+
[existing issues]: (https://github.com/delta-io/delta-kernel-rs/issues)
69

7-
Create an issue with a reproducible example. Please specify the Rust version, delta-kernel-rs version, the code executed, and the error message.
10+
## How to Contribute
811

9-
## Did you create a PR to fix a bug?
12+
For trivial fixes, etc. please feel free to open a PR directly. For larger changes, we follow a
13+
structured contribution process to ensure high-quality code:
1014

11-
Open a pull request and add "Fixes #issue_number" in the PR description.
15+
1. **Start with an issue and/or design sketch**: Open an issue describing what you want to
16+
contribute and why. Continue to step 2 after reaching some consensus. This helps us avoid wasted
17+
effort (perhaps you were building something that someone else was already pursuing or already
18+
explored and rejected). Including a design sketch will help drive consensus (often a simple
19+
diagram or bullet points outlining high-level changes is sufficient).
20+
2. **Prototype/POC**: Create a PR marked as prototype/draft (not intended to merge) and gather
21+
feedback to further derisk the design. This PR is not intended to be merged but will guide the
22+
implementation and serve as a proving ground for the design. Then, pieces are torn out into
23+
smaller PRs that can be merged.
24+
3. **Implementation**: Finally, create PR(s) to implement the feature (production code, tests,
25+
thorough docs, etc.). Often the initial POC will be split into multiple smaller PRs (e.g.,
26+
refactors, then feature additions, then public APIs specifically). Care should be taken to ensure
27+
each PR is easily reviewable and thoroughly tested.
1228

13-
We appreciate bug fixes - thank you in advance!
29+
## Forking and Setup
1430

15-
## Would you like to add a new feature or change existing code?
31+
1. Fork the repository into your account
32+
2. Clone your fork locally:
33+
```bash
34+
git clone [email protected]:YOUR_USERNAME/delta-kernel-rs.git
35+
cd delta-kernel-rs
36+
```
37+
3. Add the upstream remote:
38+
```bash
39+
git remote add upstream [email protected]:delta-io/delta-kernel-rs.git
40+
```
1641

17-
If you would like to add a feature or change existing behavior, please make sure to create an issue and get the planned work approved by the core team first!
42+
Now you have:
43+
- `origin` pointing to your fork
44+
- `upstream` pointing to the original repository
1845

19-
Always better to get aligned with the core devs before writing any code.
46+
## Development Workflow
2047

21-
## Do you have questions about the source code?
48+
Our trunk branch is named `main`. Here's the typical workflow:
2249

23-
Feel free to create an issue or join the [Delta Lake Slack](https://go.delta.io/slack) with questions! We chat in the `#delta-kernel` channel.
50+
1. Pull the latest main to get a fresh checkout:
51+
```bash
52+
git checkout main
53+
git pull upstream main
54+
```
55+
2. Create a new feature branch:
56+
```bash
57+
git checkout -b my-feature
58+
```
59+
(NB: Consider using `git worktrees` for managing multiple branches!)
60+
3. Make your changes and test them locally. See our CI runs for a full set of tests.
61+
```bash
62+
# run most of our tests, typically sufficient for quick iteration
63+
cargo test
64+
# run clippy
65+
cargo clippy --all-features --tests --benches -- -D warnings
66+
# build docs
67+
cargo doc --workspace --all-features
68+
# highly recommend editor that automatically formats, but in case you need to:
69+
cargo fmt
2470

25-
Thanks for reading! :heart: :crab:
71+
# run more tests
72+
cargo test --workspace --all-features -- --skip read_table_version_hdfs
73+
74+
# see ffi/ dir for more about testing FFI specifically
75+
```
76+
4. Push to your fork:
77+
```bash
78+
git push origin my-feature
79+
```
80+
5. Open a PR from `origin/my-feature` to `upstream/main`
81+
6. Celebrate! 🎉
82+
83+
**Note**: Our CI runs all tests and clippy checks. Warnings will cause CI to fail.
84+
85+
**Note**: We require two approvals from code owners for any PR to be merged.
86+
87+
## Resources
88+
89+
- [Delta Protocol](https://github.com/delta-io/delta/blob/master/PROTOCOL.md)
90+
- [Delta Lake Slack](https://go.delta.io/slack) - Join us in the `#delta-kernel` channel

0 commit comments

Comments
 (0)