Skip to content

fix: add missing wait and ignore_incompletes parameters to pMincApply and qMincApply - #355

Merged
gdevenyi merged 5 commits into
Mouse-Imaging-Centre:developfrom
phamlk:fix/pMincApply-argument-passing
Jul 23, 2026
Merged

fix: add missing wait and ignore_incompletes parameters to pMincApply and qMincApply#355
gdevenyi merged 5 commits into
Mouse-Imaging-Centre:developfrom
phamlk:fix/pMincApply-argument-passing

Conversation

@phamlk

@phamlk phamlk commented Jul 8, 2026

Copy link
Copy Markdown
  • Add wait parameter to pMincApply signature (default TRUE) and pass through to qMincApply
  • Add ignore_incompletes parameter to pMincApply and qMincApply signatures (default FALSE) and pass through to qMincReduce

Without these fixes, wait and ignore_incompletes fall through into the user's voxel function causing 'unused argument' errors at runtime.

@gdevenyi

gdevenyi commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Can you describe the bug you discovered which requires this fix?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes argument passthrough in RMINC’s parallel apply wrappers so that wait and ignore_incompletes are handled by the batching/reduction pipeline (rather than falling through into the user’s voxel function and causing unused argument runtime errors).

Changes:

  • Adds wait (default TRUE) to pMincApply() and passes it through to qMincApply().
  • Adds ignore_incompletes (default FALSE) to pMincApply() and qMincApply(), passing it through to qMincReduce().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread R/minc_parallel.R
Comment thread R/minc_parallel.R Outdated
Comment thread R/minc_parallel.R Outdated

@gdevenyi gdevenyi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

The fix is correct in intent — thanks. wait and ignore_incompletes were being captured by ... and bound to the user's voxel function, which is the source of the unused argument errors. Promoting them to named params and threading them through to qMincReduce is the right fix. As a bonus it also resolves a pre-existing doc/signature mismatch — both params were already documented in the qMincApply roxygen block.

Requesting changes for formatting only (tabs vs spaces + trailing whitespace). See inline notes.

Verified

  • ignore_incompletes is a valid arg of qMincReduce (R/minc_parallel.R:569).
  • wait is already an arg of qMincApply (R/minc_parallel.R:414).
  • pMincApply inherits both param docs via @inheritParams qMincApply (R/minc_parallel.R:105), so no roxygen regeneration is strictly required.

Worth considering (non-blocking)

The local = TRUE branch calls mcMincApply (R/minc_parallel.R:160) without wait/ignore_incompletes. Now that they're named params they're silently dropped for local jobs. Probably fine since local is synchronous, but a one-line note in the details block would help users avoid surprises.

Comment thread R/minc_parallel.R Outdated
Comment thread R/minc_parallel.R Outdated
Comment thread R/minc_parallel.R Outdated
Comment thread R/minc_parallel.R Outdated
@gdevenyi

gdevenyi commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Can you please also rebase this PR against develop so we can stage changes for a new release there

@gdevenyi
gdevenyi changed the base branch from master to develop July 8, 2026 20:23
phamlk and others added 3 commits July 22, 2026 12:49
… and qMincApply

- Add wait parameter to pMincApply signature (default TRUE) and pass
  through to qMincApply
- Add ignore_incompletes parameter to pMincApply and qMincApply signatures
  (default FALSE) and pass through to qMincReduce

Without these fixes, wait and ignore_incompletes fall through ... into
the user's voxel function causing 'unused argument' errors at runtime.
removing trailing white space according to copilot's suggestion

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@gdevenyi

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

@gdevenyi
gdevenyi merged commit 68e6d08 into Mouse-Imaging-Centre:develop Jul 23, 2026
7 of 8 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.

3 participants