Skip to content

[feat]: rerender_skeleton() - #569

Merged
Schiano-NOAA merged 28 commits into
feat-update-reportfrom
feat-rerender-fxn
Oct 2, 2026
Merged

Schiano-NOAA merged 28 commits into
feat-update-reportfrom
feat-rerender-fxn

Conversation

@Schiano-NOAA

Copy link
Copy Markdown
Collaborator

What is the feature?

  • Separate rerender_skeleton() and create_template()

How have you implemented the solution?

  • Removed all code associated with the argument rerender_skeleton within create_template and made it it's own function
  • repetitive code was made into their own functions within the utils.R file
  • functionality is exactly the same for users -- aka
    create_template(rerender_skeleton = TRUE, ...) == rerender_skeleton(...)-- arguments are the same

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

  • no

Note: this will be NOT be backwards compatible, so once this is merged, we will need to increase to asar v3.0.0

@Schiano-NOAA Schiano-NOAA added this to the September Release milestone Sep 17, 2026
@Schiano-NOAA Schiano-NOAA added the enhancement New feature or request label Sep 17, 2026
@Schiano-NOAA Schiano-NOAA self-assigned this Sep 17, 2026
@Schiano-NOAA
Schiano-NOAA added this pull request to stack #571 September 17, 2026 20:09
@Schiano-NOAA
Schiano-NOAA marked this pull request as ready for review September 22, 2026 13:41
@Schiano-NOAA
Schiano-NOAA removed this pull request from stack #571 September 22, 2026 13:42
@Schiano-NOAA
Schiano-NOAA added this pull request to stack #573 September 22, 2026 13:43
@sbreitbart-NOAA

Copy link
Copy Markdown
Collaborator

Before I review the code, a couple thoughts:

  1. This needs to be announced far and wide. Could you please update the documentation (vignettes, tutorial, etc.) to highlight this change, and explain how to alter one's workflow in accordance?
  2. Can this feature be released through a deprecation cycle?

@Schiano-NOAA

Copy link
Copy Markdown
Collaborator Author

@sbreitbart-NOAA all good points! On second thought, hold off on the review. I will re-ping when it's done. I have to do a bunch more then to make this ready.

@Schiano-NOAA
Schiano-NOAA marked this pull request as draft September 23, 2026 15:17
@Schiano-NOAA
Schiano-NOAA marked this pull request as ready for review September 25, 2026 19:04
@Schiano-NOAA

Copy link
Copy Markdown
Collaborator Author

Before I review the code, a couple thoughts:

  1. This needs to be announced far and wide. Could you please update the documentation (vignettes, tutorial, etc.) to highlight this change, and explain how to alter one's workflow in accordance?
  2. Can this feature be released through a deprecation cycle?

I have initiated deprecation of the argument rerender_skeleton and updated documentation to reflect this. Next week, I will update the tutorial in a PR, but I feel we should merge this without waiting for the update. I don't think it will take me long but I don't want to put the review of this on hold until another PR is made.

Could you review this one and update_report and I will hold off on merge until the tutorial and workshop is updated? I don't think this is mentioned in any vignettes since I did not find any mention of rerender_skeleton in them.

@sbreitbart-NOAA sbreitbart-NOAA left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👏 bravo!!
Even if this wasn't as difficult as you expected, I think this is a big achievement. I'm relieved that create_template() will be much easier to parse through/edit/test, and I'm hopeful that our code coverage will increase significantly since the main area missing tests was associated with rerendering a skeleton. I left a couple minor comments- two about removing what seems like outdated comments and one about having trouble updating the title with a new species. Once those are addressed, I'll check out the other stacked PR!

Comment thread R/rerender_skeleton.R Outdated
Comment thread R/rerender_skeleton.R
Comment thread R/create_template.R Outdated
@Schiano-NOAA

Copy link
Copy Markdown
Collaborator Author

@sbreitbart-NOAA this should be good to go now!

@sbreitbart-NOAA

Copy link
Copy Markdown
Collaborator

The rerender_skeleton functionality is working very well! One minor error that doesn't prevent rendering, but might be problematic: the title's quotes disappear when the skeleton has been rerendered.
Also, when I run create_template(bib_file = FALSE), the qmd doesn't render because of issues with the journals style file. I'll make a separate issue for that.

@Schiano-NOAA

Copy link
Copy Markdown
Collaborator Author

@sbreitbart-NOAA sounds good! I will fix the issue with the title and open a new PR with the fix for the render issue. I think it will be easy and straightforward.

@Schiano-NOAA

Schiano-NOAA commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator Author

Note: legacy replacement does not work on rerender

it does not rename these documents -- only in the skeleton

@Schiano-NOAA

Copy link
Copy Markdown
Collaborator Author

@sbreitbart-NOAA as long as the checks pass, this should be good now. One issue is that the testing for the legacy figs and tabs do not pass and won't be id'd since they only run locally. The issue is that there is no code to rename the files themselves, only those in the skeleton which creates a mismatch.

I am not sure where to put this. I could just rename them but in other template types, the number of these documents varies. Any ideas? Could you make this adjustment since you handled the change from tables & figures to figures & tables?

@sbreitbart-NOAA

Copy link
Copy Markdown
Collaborator

@sbreitbart-NOAA as long as the checks pass, this should be good now. One issue is that the testing for the legacy figs and tabs do not pass and won't be id'd since they only run locally. The issue is that there is no code to rename the files themselves, only those in the skeleton which creates a mismatch.

I am not sure where to put this. I could just rename them but in other template types, the number of these documents varies. Any ideas? Could you make this adjustment since you handled the change from tables & figures to figures & tables?

If it's too complicated to apply to this situation, I think it's ok to make sure it doesn't run. Instead, the user can manually change the files if needed; it's straightforward and fast.

@Schiano-NOAA

Copy link
Copy Markdown
Collaborator Author

@sbreitbart-NOAA I'm not sure if it's too complicated but just saying it's not changing them in rerender_skeleton

@sbreitbart-NOAA

Copy link
Copy Markdown
Collaborator

@sbreitbart-NOAA I'm not sure if it's too complicated but just saying it's not changing them in rerender_skeleton

Oh, I understand now. I'd go with correctly ordering the docs in the skeleton. Then, we can add code that 1) IDs other files in the skeleton's folder and evaluates if Figures appears before Tables, and if not, 2) reorders the files by changing the filenames. How about you merge this into the update-report branch, then I'll work on the above feature and merge it into update-report before merging into main?

@Schiano-NOAA
Schiano-NOAA removed this pull request from stack #573 October 2, 2026 18:48
@Schiano-NOAA
Schiano-NOAA merged commit 9fdfe74 into feat-update-report Oct 2, 2026
9 checks passed
@Schiano-NOAA
Schiano-NOAA deleted the feat-rerender-fxn branch October 2, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat]: separate rerender_skeleton fxnality from create_template

2 participants