Skip to content

Commit fac35db

Browse files
raphaelstyclaude
andcommitted
Add Contributing section to README
Document setup instructions and available make commands for developers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 2997c1d commit fac35db

File tree

1 file changed

+44
-1
lines changed

1 file changed

+44
-1
lines changed

README.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
<p align="center">
44
<a href="https://crates.io/crates/fastkmeans-rs"><img src="https://img.shields.io/crates/v/fastkmeans-rs.svg" alt="Crates.io"></a>
5-
<a href="https://github.com/lightonai/fastkmeans-rs/actions/workflows/ci.yml"><img src="https://github.com/lightonai/fastkmeans-rs/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
65
<a href="https://github.com/lightonai/fastkmeans-rs/blob/master/LICENSE"><img src="https://img.shields.io/crates/l/fastkmeans-rs.svg" alt="License"></a>
76
</p>
87

@@ -227,6 +226,50 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
227226

228227
<br>
229228

229+
## Contributing
230+
231+
### Setup
232+
233+
1. Clone the repository:
234+
235+
```bash
236+
git clone https://github.com/lightonai/fastkmeans-rs.git
237+
cd fastkmeans-rs
238+
```
239+
240+
2. Install the git hooks:
241+
242+
```bash
243+
make install-hooks
244+
```
245+
246+
### Development Commands
247+
248+
| Command | Description |
249+
| ------------------------ | ------------------------------------------------ |
250+
| `make build` | Build the project in debug mode |
251+
| `make release` | Build in release mode |
252+
| `make test` | Run all tests |
253+
| `make lint` | Run clippy and format checks |
254+
| `make fmt` | Format code |
255+
| `make doc` | Build documentation |
256+
| `make bench` | Run benchmarks |
257+
| `make example` | Run the basic example |
258+
| `make ci` | Run all CI checks locally |
259+
| `make compare-reference` | Compare output with Python fastkmeans (requires [uv](https://docs.astral.sh/uv/)) |
260+
261+
### Running CI Locally
262+
263+
Before submitting a PR, run all checks locally:
264+
265+
```bash
266+
make ci
267+
```
268+
269+
This runs formatting checks, clippy, tests, documentation build, and benchmark compilation.
270+
271+
<br>
272+
230273
## Acknowledgements
231274

232275
This crate is a Rust port of [FastKMeans](https://github.com/AnswerDotAI/fastkmeans) by Answer.AI. All credit for the algorithm design and optimization strategies goes to the original authors.

0 commit comments

Comments
 (0)