Skip to content

Interval editing helpers reject arguments they do not take - #715

Open
billdenney wants to merge 14 commits into
fix/interval-add-secondary-generatedfrom
fix/interval-add-param-start-end
Open

billdenney wants to merge 14 commits into
fix/interval-add-secondary-generatedfrom
fix/interval-add-param-start-end

Conversation

@billdenney

Copy link
Copy Markdown
Member

interval_add_param(intervals, "auclast", start = 0, end = 12) added auclast to every interval: start and end fell into ..., documented as ignored. The same held for interval_remove_param(), interval_add_impute(), interval_remove_impute(), and interval_add_secondary().

Fix

Every method of those five generics now stops with pknca_error_unknown_argument for anything in .... For start/end the message points at target_groups = data.frame(start = , end = ), which already selects intervals by time and is now documented as doing so. This is a behaviour change for code that passed extra arguments, which were silently ignored before.

Tests

Each helper (data.frame and PKNCAdata methods) errors for start/end with the hint; other named or unnamed extras error without it; target_groups with start/end restricts the edit.

Stacked on fix/interval-add-secondary-generated; this PR's diff is only this fix.

🤖 Generated with Claude Code

billdenney and others added 14 commits November 9, 2026 18:36
interval_add_param(start = , end = ) and the other interval editing helpers
took `...` only to share their generic's signature, so `start` and `end` were
silently dropped and the edit applied to every interval.  Every method of
interval_add_param(), interval_remove_param(), interval_add_impute(),
interval_remove_impute(), and interval_add_secondary() now stops with
pknca_error_unknown_argument for anything in `...`, and the message for
`start` or `end` points at `target_groups = data.frame(start = , end = )`,
which already selects intervals by time and is now documented as doing so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-add-param-start-end

# Conflicts:
#	tests/testthat/test-secondary-parameters.R
…m-start-end

Both sides added to tests/testthat/test-secondary-parameters.R; both are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The merge of fix/interval-add-secondary-generated kept both sides of
test-secondary-parameters.R, which brought back the tests of the
reverted clr.*.dn calculation; only this branch's own test is added.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@billdenney
billdenney added this pull request to stack #717 November 13, 2026 18:08

This branch has not been deployed

No deployments
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.

1 participant