Skip to content

feat!: remove params_table; composed_to_table is the single table surface - #348

Merged
seabbs merged 2 commits into
feat/227-single-table-slice-1from
feat/227-remove-params-table
Aug 5, 2026
Merged

feat!: remove params_table; composed_to_table is the single table surface#348
seabbs merged 2 commits into
feat/227-single-table-slice-1from
feat/227-remove-params-table

Conversation

@seabbs-bot

Copy link
Copy Markdown
Collaborator

Stacked on #343 (retargets to main automatically when it merges). Sam's single-surface decision, folded into the unregistered 0.2.0 window: params_table is removed outright — function, export, docstring. The params view is the documented filter (role == :param) over composed_to_table; build_priors and update accept the full table directly, filtering internally, and build_priors gains the same DI-shape guard update has.

Hot paths did not regress: centred_pool_rows and required_parameters run the parameter-only sink walk directly, and the CountingLeaf test now pins those exact callers (not a lookalike helper). Both incidentally gained the leaf support their docstrings already claimed — the bare-leaf empty-path convention is pinned by tests and documented. The wrapper type is renamed ParamsTable -> ComposedTable to match the surface. DI's migration is its own to schedule (DI#96); unregistered DI absorbs the break at CD 0.2.0 registration.

Gates: test-fast 2070/2070, quality 242/242; docs rendering stages verified clean for the rename (the only build failure was the known external 429 linkcheck, EpiAwarePackageTools#378). Closes #227's removal decision thread.

This was opened by a bot. Please ping @seabbs for any questions.

…e table surface

BREAKING CHANGE: params_table(d) is removed. composed_to_table(d) is now
the only table-reading verb: it returns the full node/attribute/parameter
inventory, and the parameter-only view is a filter over it
(`filter(row -> row.role == :param, Tables.rows(composed_to_table(d)))`).
This folds into the unregistered 0.2.0 breaking window rather than a
deprecation cycle.

- build_priors and update now both accept a composed_to_table-shaped table
  directly, filtering to :param rows internally the same way, so
  build_priors(composed_to_table(tree)) and
  update(tree, composed_to_table(tree)) work without hand-filtering.
- centred_pool_rows (Pool.jl) and required_parameters (varying.jl) migrate
  to the _ParamSink walk directly, the same zero-extra-work path
  params_table used internally, so neither regresses to building the full
  table on their AD-adjacent call sites.
- ParamsTable's show header drops the now-dead params_table/composed_to_table
  branch.
- Tests recast the golden parity fixture as an explicit role == :param
  filter over composed_to_table, verified against an internal _param_rows
  helper that still runs the parameter-only walk independently (proving the
  filter reproduces the historical params_table output). Other tests move
  to composed_to_table directly where row count is not significant, or to
  _param_rows where a test's assertions depend on the historical five-column
  shape or exact row count.
- Docs and tutorials teach composed_to_table plus the role filter as the
  parameter-view idiom.
guards and tests

Reviewer follow-ups on the #227 params_table removal:

- extend the leaf hot-path testitem to exercise required_parameters and
  centred_pool_rows directly, not just _param_rows
- rename the composed_to_table wrapper type from ParamsTable to
  ComposedTable (breaking, same unregistered 0.2.0 window)
- add the missing # Arguments section to composed_to_table's docstring
- pin and document the empty-path/root-row convention that
  required_parameters and centred_pool_rows fall back to for a bare leaf
- give build_priors the same up-front Tables.istable/edge/param guard
  update already has, so a DI-shaped table is refused loudly
- dedupe the restated row-structure sentence in NEWS.md and fix an
  unrewrapped line
@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.39535% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/composers/introspection.jl 76.47% 8 Missing ⚠️
Flag Coverage Δ
ad-enzyme-forward 0.00% <0.00%> (ø)
ad-enzyme-reverse 13.74% <0.00%> (-0.02%) ⬇️
ad-forwarddiff 12.20% <0.00%> (-0.02%) ⬇️
ad-mooncake-forward 0.00% <0.00%> (ø)
ad-mooncake-reverse 12.39% <0.00%> (-0.02%) ⬇️
ad-reversediff 12.20% <0.00%> (-0.02%) ⬇️
unit 87.02% <83.33%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/TestUtils.jl 88.26% <100.00%> (ø)
src/composers/Choose.jl 70.78% <ø> (ø)
src/composers/Parallel.jl 81.81% <ø> (ø)
src/composers/Pool.jl 88.27% <100.00%> (-0.16%) ⬇️
src/composers/Resolve.jl 77.95% <ø> (ø)
src/composers/Sequential.jl 86.66% <ø> (ø)
src/composers/Shared.jl 63.41% <ø> (ø)
src/composers/Uncertain.jl 93.75% <ø> (ø)
src/composers/codec_gen.jl 99.33% <ø> (ø)
src/composers/compose.jl 89.00% <ø> (ø)
... and 6 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

📖 Documentation preview is ready!

View the docs for this PR at: https://EpiAware.github.io/ComposedDistributions.jl/previews/PR348/

This preview will be updated automatically when you push new commits.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Try this Pull Request!

Option 1: Julia Package Manager

Open Julia and type:

import Pkg
Pkg.activate(temp=true)
Pkg.add(url="https://github.com/EpiAware/ComposedDistributions.jl", rev="feat/227-remove-params-table")
using ComposedDistributions

Option 2: Local Checkout

If you have the repo locally:

git checkout feat/227-remove-params-table
julia --project=. -e "using Pkg; Pkg.instantiate()"

@seabbs
seabbs merged commit 5f9a8db into feat/227-single-table-slice-1 Aug 5, 2026
20 of 21 checks passed
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.

2 participants