Skip to content

[feat] Check and fix duplicated figure/table chunk labels#486

Open
sbreitbart-NOAA wants to merge 2 commits into
mainfrom
plot-checks
Open

[feat] Check and fix duplicated figure/table chunk labels#486
sbreitbart-NOAA wants to merge 2 commits into
mainfrom
plot-checks

Conversation

@sbreitbart-NOAA
Copy link
Copy Markdown
Collaborator

What is the feature?

How have you implemented the solution?

  • Creating fix_duplicate_chunks() function in utils

Does the PR impact any other area of the project, maybe another repo?

  • No

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 28, 2026

Checklist

  • PR base branch is accurate
  • Is the code concise?
  • Comments are clear and useful.
  • Can you remove or combine any arguments?
  • Do argument contain defaults (if appliable)?
  • Code is documented and example provided (Roxygen).
  • Did you make a test (testthat)?
  • Was this tested under multiple scenarios?
  • Did you run devtools::check()?

@github-actions
Copy link
Copy Markdown
Contributor

New version checklist

  • Package version in DESCRIPTION has been updated
  • Release notes have been drafted/published
  • Cheatsheet content has been updated (if applicable)
  • Cheatsheet version has been updated

@sbreitbart-NOAA sbreitbart-NOAA changed the title Plot checks [feat] Check and fix duplicated figure/table chunk labels May 28, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Code Metrics Report

Coverage Code to Test Ratio Test Execution Time
37.4% 1:0.2 26s

Code coverage of files in pull request scope (55.2%)

Files Coverage
R/create_figures_doc.R 84.8%
R/create_tables_doc.R 53.9%
R/utils.R 31.6%

Reported by octocov

@Schiano-NOAA
Copy link
Copy Markdown
Collaborator

I'm going to tag team on this and make checks for duplicate rda's/images as well and have both issues solved in one. I tested this out and I think this is a good start, but it does a couple of thing

(1) I think the commenting out is a good solution, but I am going to add a check to see if the same image is loaded in. In the case it is, the the chunk will be removed/won't be added. In the case it's not, I think it would be better to rename the label with a 1 or other alternative so it's still accessible to the user

(2) I will adjust the lapply or a loop to go through the chunks and make sure ones that have already been added are not added

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.

[feat]: add check in create_figures/tables_doc to ensure chunk labels are unique

2 participants