Harden CLD fallback paths to prevent R-CMD-check failure when multcompView is unavailable - #2
Merged
Merged
Conversation
Co-authored-by: PALP31 <180587161+PALP31@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix the failing GitHub Actions job R-CMD-check
Harden CLD fallback paths to prevent R-CMD-check failure when Aug 15, 2026
multcompView is unavailable
PALP31
marked this pull request as ready for review
August 15, 2026 03:22
There was a problem hiding this comment.
Pull request overview
This PR hardens Compact Letter Display (CLD) generation paths so CI (R-CMD-check) does not fail when multcompView is unavailable, while keeping downstream output/plot shapes stable.
Changes:
- Guard CLD execution behind a dual dependency check (
multcomp+multcompView) and fall back safely when unavailable. - Ensure post-hoc outputs always include a stable
Grupocolumn (withNA_character_fallback) to avoid schema breaks. - Add regression tests that mock missing CLD dependencies and assert stable behavior for
obtener_posthoc()andgraficar_predichos().
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
R/posthoc_emmeans.R |
Adds dual dependency gating for CLD and guarantees a Grupo column in fallback output. |
R/graficar_predichos.R |
Adds dual dependency gating for CLD labels so plots still render when CLD deps are missing. |
tests/testthat/test-tablas-graficos.R |
Adds tests to cover CLD dependency-missing fallbacks and output stability. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+82
to
+84
| }, error = function(e) { | ||
| NULL | ||
| }) |
Comment on lines
+104
to
+106
| }, error = function(e) { | ||
| NULL | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
R-CMD-check failed in CI because CLD generation (
multcomp::cld) could fail whenmultcompViewwas unavailable, which removed expected grouping output and broketest-tablas-graficos.R. This PR makes CLD-dependent paths degrade safely while preserving stable output shape.Post-hoc fallback stability (
R/posthoc_emmeans.R)multcompandmultcompView.Grupocolumn exists in fallback output (NA_character_) so downstream exporters/tests have consistent schema.Prediction plot CLD resilience (
R/graficar_predichos.R)multcomp+multcompView) before attempting CLD labels.mostrar_letras = TRUE.Regression coverage (
tests/testthat/test-tablas-graficos.R)obtener_posthoc(..., letras = TRUE)still returnsGrupo.graficar_predichos(..., mostrar_letras = TRUE)still returns aggplotwithout warning.Example of the new fallback contract: