Skip to content

chore: configure crates.io publishing, CI, and Codecov - #15

Merged
philippemnoel merged 2 commits into
mainfrom
claude/superkmeans-crates-deployment-9iqz3k
Jul 22, 2026
Merged

chore: configure crates.io publishing, CI, and Codecov#15
philippemnoel merged 2 commits into
mainfrom
claude/superkmeans-crates-deployment-9iqz3k

Conversation

@philippemnoel

Copy link
Copy Markdown
Member

Sets superkmeans-rs up for release to crates.io and continuous integration, mirroring the paradedb/decimal-bytes setup and adapting it to this crate's BLAS feature model.

What's included

Packaging & docs

  • Cargo.toml: publishing metadata — authors, repository, homepage, readme, categories, keywords, and rust-version = "1.85" (MSRV, matching edition 2024).
  • README.md: overview, quick-start usage, BLAS-backend matrix, and status badges (crates.io, Codecov, CI, docs.rs, license).
  • LICENSE (MIT) and CONTRIBUTING.md.

CI — .github/workflows/ci.yml

  • test: matrix of default features (Linux), openblas (Linux, installs libopenblas-dev), and accelerate (macOS).
  • clippy (default + openblas), fmt, docs (RUSTDOCFLAGS=-D warnings), msrv (checks against Rust 1.85), and coverage (uploads lcov to Codecov, slug paradedb/superkmeans-rs).
  • Note: unlike decimal-bytes, this does not use --all-features. accelerate (a macOS-only framework) and openblas (a system lib) are mutually exclusive and platform-specific, so enabling both at once fails to link. The matrix exercises each backend on a platform where it works.

Release — .github/workflows/release.yml

  • Tag-driven (v*): validate (tag == Cargo.toml version, tests, clippy) → cargo publish → GitHub release.

Dependabot — .github/dependabot.yml

  • Monthly cargo and github-actions updates.

Source changes to satisfy the new CI gates

  • rustfmt normalization (src/pdxearch.rs signature wrapping).
  • Two Clippy autofixes: div_ceil (src/utils.rs), is_multiple_of (src/layout.rs) — both semantics-preserving.
  • A doc-comment blank line in build.rs.
  • Crate-wide #[allow(...)] in src/lib.rs for the stylistic lints the numeric kernels intentionally trip (needless_range_loop, too_many_arguments, manual_memcpy, field_reassign_with_default, doc_lazy_continuation) — rather than reshaping the ports of the C++ kernels.

Verified locally (Rust 1.94)

cargo fmt --check, cargo clippy -- -D warnings (default and --features openblas), cargo doc, cargo test (16 pass), and cargo publish --dry-run (packages 27 files) all pass.

Required before release / green coverage

Two repo secrets must be configured in Settings → Secrets and variables → Actions:

  • CARGO_REGISTRY_TOKEN — crates.io publish token (release workflow).
  • CODECOV_TOKEN — Codecov upload token (coverage job; it currently runs with fail_ci_if_error: true).

Also confirm the crate name superkmeans-rs is available/owned on crates.io before the first v0.1.0 tag.

🤖 Generated with Claude Code


Generated by Claude Code

claude added 2 commits July 22, 2026 02:09
Set the crate up for release to crates.io and continuous integration,
mirroring the paradedb/decimal-bytes setup and adapting it to this
crate's BLAS feature model.

- Cargo.toml: add publishing metadata (authors, repository, homepage,
  readme, categories, keywords, rust-version/MSRV 1.85).
- README.md: overview, usage, BLAS-backend matrix, and status badges
  (crates.io, Codecov, CI, docs.rs, license).
- LICENSE (MIT) and CONTRIBUTING.md.
- .github/workflows/ci.yml: test matrix (default / openblas on Linux,
  accelerate on macOS), clippy, rustfmt, docs, MSRV check, and Codecov
  coverage upload. Avoids --all-features because accelerate and openblas
  are mutually exclusive and platform-specific.
- .github/workflows/release.yml: tag-driven validate -> cargo publish ->
  GitHub release.
- .github/dependabot.yml: monthly cargo and github-actions updates.

Also make the tree pass the new CI gates: rustfmt normalization, a
couple of Clippy autofixes (div_ceil / is_multiple_of), a doc-comment
fix in build.rs, and crate-wide allows for the stylistic lints the
numeric kernels intentionally trip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CfJLL9FP9VGyuWmsW6wttH
The pruning kernels use AVX512 intrinsics (e.g.
`_mm512_mask_compressstoreu_epi32`) and `u*::is_multiple_of`, both stable
since Rust 1.89. The initial `rust-version = "1.85"` was wrong: it broke
the MSRV compile check and tripped Clippy's `incompatible_msrv` lint.
Bump the declared MSRV (and its CI toolchain, README, and CONTRIBUTING
references) to 1.89.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CfJLL9FP9VGyuWmsW6wttH
@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

@philippemnoel
philippemnoel marked this pull request as ready for review July 22, 2026 19:16
@philippemnoel
philippemnoel merged commit cd4cb54 into main Jul 22, 2026
18 of 19 checks passed
@philippemnoel
philippemnoel deleted the claude/superkmeans-crates-deployment-9iqz3k branch July 22, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants