Skip to content

Clarify Dataset mutation and return behavior - #528

Closed
ahbaqdadi wants to merge 1 commit into
RubixML:masterfrom
ahbaqdadi:docs/dataset-mutation-semantics
Closed

ahbaqdadi wants to merge 1 commit into
RubixML:masterfrom
ahbaqdadi:docs/dataset-mutation-semantics

Conversation

@ahbaqdadi

Copy link
Copy Markdown

The Dataset reference does not clearly distinguish methods that mutate the receiver from methods that return a new dataset. This makes filter() easy to read as an in-place operation, as reported in #348.

Add a mutation/return-value table, clarify the individual transformation, filtering, sorting, de-duplication and composition sections, and show retaining the filtered dataset separately. Also correct the reverseApply() signature and its Reversible link.

Fixes #348.

Validation:

  • 125 behavior checks across Labeled and Unlabeled datasets confirm the documented return identities and immediate mutation behavior.
  • Full PHPUnit suite: 2,141 tests, 51,310 assertions; 38 skips for optional extensions.
  • PHPStan and the 728-file code style check pass.
  • MkDocs builds successfully; the new table and corrected anchor are verified in the rendered HTML. An existing unrelated missing cross-entropy.md link warning remains.
  • git diff --check passes.

Documentation-only; runtime code and tests are unchanged. AI-assisted with Codex; the behavior statements were checked against the current implementations and runtime fixtures.

@ahbaqdadi ahbaqdadi closed this Oct 28, 2026
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.

Documentation improvements for Dataset

1 participant