Skip to content

feat: add dataset query and clustering wrappers#11

Merged
emuell merged 1 commit into
emuell:masterfrom
cristianvogel:codex/pr3-search-clustering
Mar 16, 2026
Merged

feat: add dataset query and clustering wrappers#11
emuell merged 1 commit into
emuell:masterfrom
cristianvogel:codex/pr3-search-clustering

Conversation

@cristianvogel

Copy link
Copy Markdown
Contributor

Why this PR

This PR adds the dataset-oriented search, query, clustering, and projection tools that fit together as one reviewable group.

What changed

  • add safe Rust wrappers for:
    • KDTree
    • DataSetQuery
    • Grid
    • KMeans
    • SKMeans
    • Mds
  • expose the relevant types through the public crate API
  • add the minimal flucoma-sys bindings required for these algorithms
  • include unit tests for the added wrapper surface

Merge

I did go through, rebase and merge with upstream

Intentionally not included

  • no docs
  • no STATUS changes
  • no examples

Validation

  • cargo clippy --lib
  • cargo test --lib

@cristianvogel cristianvogel force-pushed the codex/pr3-search-clustering branch from 586b900 to 855d914 Compare March 15, 2026 12:40
@cristianvogel

Copy link
Copy Markdown
Contributor Author

I refreshed after the merge of #10 and rebased onto current master.

Now keeps the upstream stats layer from #10 (BufStats, MultiStats, RunningStats) and only adds the dataset/query/clustering pieces from this PR:

  • DataSetQuery
  • Grid
  • KDTree
  • KMeans
  • SKMeans
  • Mds

The only shared touch-points are src/lib.rs and flucoma-sys/src/lib.rs, where the branch now merges the upstream stats exports/bindings with the new query/clustering bindings.

checks

  • cargo clippy --lib
  • cargo test --lib

@emuell

emuell commented Mar 15, 2026

Copy link
Copy Markdown
Owner

Docs are missing here, else this looks good to me.

This is in detail hard to test and verify though, so I'm wondering if adding a somewhat practical CLI too here makes sense here too, to show how all this dataset stuff can be used - in practice.

Any idea how such a CLI tool could look like?

@cristianvogel

Copy link
Copy Markdown
Contributor Author

Docs are missing here, else this looks good to me.

This is in detail hard to test and verify though, so I'm wondering if adding a somewhat practical CLI too here makes sense here too, to show how all this dataset stuff can be used - in practice.

Any idea how such a CLI tool could look like?

agreed. I had written something, and even made an interactive demo to show the clustering.

https://script.google.com/macros/s/AKfycbzOR8otksbdEl0Lg5uqDEIiuX_k8NHQlr0LqQWQtOI/dev

I was using Grid and Scalars in my Incline app, to great effect.

@cristianvogel cristianvogel force-pushed the codex/pr3-search-clustering branch from 855d914 to 7c30127 Compare March 15, 2026 15:50
@cristianvogel

Copy link
Copy Markdown
Contributor Author

added doc comments for
dataset_query.rs
grid.rs
kdtree.rs
kmeans.rs
mds.rs

@emuell

emuell commented Mar 15, 2026

Copy link
Copy Markdown
Owner

Please tell codex to use one of the existing wrapped structs as template for the documentation style. For example this one: https://github.com/emuell/flucoma-rs/blob/master/src/pca.rs

@cristianvogel

cristianvogel commented Mar 15, 2026

Copy link
Copy Markdown
Contributor Author

Ok I'll ask but I can't guarantee it'll do what I ask :/

Otherwise I can do it manually , but it will be a bit of a chore

@cristianvogel

cristianvogel commented Mar 16, 2026 via email

Copy link
Copy Markdown
Contributor Author

@Cristian-Vogel

Copy link
Copy Markdown
Contributor

main struct doc comments done, ready to merge

@emuell emuell merged commit 960b5cc into emuell:master Mar 16, 2026
1 check passed
@emuell

emuell commented Mar 16, 2026

Copy link
Copy Markdown
Owner

I'll fix them in a second pass. It would be great to work on some more practical tests (CLI example, as discussed before) to verify all the existing new stuff before adding more wrappers. Most of the new wrappers are pretty thin, but I haven't tested them in detail yet.

@Cristian-Vogel

Cristian-Vogel commented Mar 16, 2026 via email

Copy link
Copy Markdown
Contributor

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