Skip to content

Commit 7b5d441

Browse files
committed
docs: update README, CONTRIBUTING, Justfile
1 parent 2f847ca commit 7b5d441

File tree

3 files changed

+77
-20
lines changed

3 files changed

+77
-20
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This project and everyone participating in it is governed by the [Contributor Co
1919
1. **Fork the repository** and create your branch from `main`
2020
2. **Follow the development workflow** documented in the repository's [README.md](README.md)
2121
3. **Write clear commit messages** following [Conventional Commits](https://www.conventionalcommits.org/)
22-
4. **Ensure all tests pass** before submitting
22+
4. **Run `just` before submitting** to verify formatting, lints, and tests pass
2323
5. **Update documentation** if your changes affect public APIs or user-facing behavior
2424
6. **Submit a pull request** with a clear description of your changes
2525

Justfile

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# InferaDB Rust SDK - Development Commands
2+
# Run `just --list` to see all available recipes
3+
4+
# Default recipe: run all checks
5+
default: check
6+
7+
# Run all checks (format, lint, test)
8+
check: fmt-check lint test
9+
10+
# Format code (requires nightly)
11+
fmt:
12+
cargo +nightly fmt --all
13+
14+
# Check formatting without modifying files
15+
fmt-check:
16+
cargo +nightly fmt --all -- --check
17+
18+
# Run clippy lints
19+
lint:
20+
cargo +1.92 clippy --all-targets -- -D warnings
21+
22+
# Run clippy on minimal feature set
23+
lint-minimal:
24+
cargo +1.92 clippy --no-default-features -- -D warnings
25+
26+
# Run tests
27+
test:
28+
cargo +1.92 test --lib
29+
30+
# Run tests with all features
31+
test-all:
32+
cargo +1.92 test --all-features
33+
34+
# Run doc tests
35+
test-doc:
36+
cargo +1.92 test --doc --all-features
37+
38+
# Build the project
39+
build:
40+
cargo +1.92 build
41+
42+
# Build with all features
43+
build-all:
44+
cargo +1.92 build --all-features
45+
46+
# Check for unused dependencies (requires nightly)
47+
udeps:
48+
cargo +nightly udeps --workspace --all-features
49+
50+
# Build documentation
51+
doc:
52+
cargo +1.92 doc --all-features --no-deps
53+
54+
# Open documentation in browser
55+
doc-open:
56+
cargo +1.92 doc --all-features --no-deps --open
57+
58+
# Run code coverage
59+
coverage:
60+
cargo +1.92 llvm-cov --all-features --html
61+
62+
# Clean build artifacts
63+
clean:
64+
cargo clean

README.md

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -278,25 +278,18 @@ cargo run -p inferadb-examples --bin axum_middleware
278278

279279
```bash
280280
# Setup (one-time)
281-
mise trust && mise install
282-
rustup component add rustfmt clippy
283-
rustup toolchain install nightly --component rustfmt
284-
285-
# Build
286-
cargo build --workspace --all-features
287-
288-
# Run tests
289-
cargo test --lib
290-
291-
# Format and lint
292-
cargo +nightly fmt --all
293-
cargo clippy --workspace --all-targets -- -D warnings
294-
295-
# Generate documentation
296-
cargo doc --workspace --no-deps --open
297-
298-
# Code coverage
299-
cargo llvm-cov --lib --ignore-filename-regex 'proto|inferadb\.authorization\.v1'
281+
mise trust && mise install && mise run setup
282+
283+
# Common commands (via just)
284+
just # Run all checks (format, lint, test)
285+
just fmt # Format code
286+
just lint # Run clippy
287+
just test # Run tests
288+
just doc-open # Build and view documentation
289+
just coverage # Generate coverage report
290+
291+
# See all available commands
292+
just --list
300293
```
301294

302295
## Contributing

0 commit comments

Comments
 (0)