Migrate all MARSS docs to Roxygen2 (bulk .Rd → Roxygen2 conversion)#2
Migrate all MARSS docs to Roxygen2 (bulk .Rd → Roxygen2 conversion)#2
Conversation
Co-authored-by: eeholmes-uw <66437309+eeholmes-uw@users.noreply.github.com> Agent-Logs-Url: https://github.com/eeholmes-uw/MARSS/sessions/00fc5ffb-dcc6-47b6-9a7e-7528d933fc41
|
@copilot Can you test that the package builds and run the documentation using I want you to look at the html created for the CSEGriskfigure function and also look at the pdf. Ideally I want to look at these but I am not sure you can show those to me. I am also concerned that this is not going to look right. Like I am concerned it will all be one line, but I don't know that. @details |
Co-authored-by: eeholmes-uw <66437309+eeholmes-uw@users.noreply.github.com> Agent-Logs-Url: https://github.com/eeholmes-uw/MARSS/sessions/e5275a26-859f-4e7e-bcd5-f0f1a55a20eb
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
…ifacts Co-authored-by: eeholmes-uw <66437309+eeholmes-uw@users.noreply.github.com> Agent-Logs-Url: https://github.com/eeholmes-uw/MARSS/sessions/20e969b6-2399-4812-90f2-04bee8133b1f
|
@copilot ok get rid of the GitHub action. I just want you to be able to test the html produced from the Rd file. Can you install R and then run something like this Install roxygen2 if it isn't already installedif (!requireNamespace("roxygen2", quietly = TRUE)) install.packages("roxygen2", repos = "https://cloud.r-project.org") Generate the .Rd file strictly from the Roxygen headers (skipping full package load if possible)roxygen2::roxygenize(roclets = "rd") Convert the resulting .Rd file to a standalone HTML filetools::Rd2HTML("man/CSEGriskfigure.Rd", out = "CSEGriskfigure_preview.html") |
Co-authored-by: eeholmes-uw <66437309+eeholmes-uw@users.noreply.github.com> Agent-Logs-Url: https://github.com/eeholmes-uw/MARSS/sessions/8d74b81d-528d-4ae0-a4c3-83098a0c7deb
Done in commit
The <h3>Details</h3>
<ul>
<li>Panel 1: Time-series plot of the data.</li>
<li>Panel 2: CDF of extinction risk.</li>
<li>Panel 3: PDF of time to reach threshold.</li>
<li>Panel 4: Probability of reaching different thresholds during forecast period.</li>
<li>Panel 5: Sample projections.</li>
<li>Panel 6: TMU plot (uncertainty as a function of the forecast).</li>
</ul>You can view the full HTML at: |
|
Can you add a pdf? if (!requireNamespace("tinytex", quietly = TRUE)) install.packages("tinytex", repos = "https://cloud.r-project.org") Generate the Rd file: Build the PDF: Run this in the terminal: or similar |
Co-authored-by: eeholmes-uw <66437309+eeholmes-uw@users.noreply.github.com> Agent-Logs-Url: https://github.com/eeholmes-uw/MARSS/sessions/1e9bf6d3-ae43-49d7-806f-7796c254837f
Done in commit You can download it from: The only warnings during PDF generation were |
|
Now repeat for the rest of the files in the R directory. If conversion is ambiguous and you really cannot figure out what to do, skip that file and report the ambiguity. But do the rest of the files. At the end, create a PDF of the documentation using You can remove the CSEGriskfigure_preview files. Remember that markdown=TRUE and ensure that lines will not run into each other, for example |
…_marss, MARSS_marxss, MARSSaic, MARSSapplynames to Roxygen2 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…n, MARSShessian_numerical, MARSSinfo, MARSSinits, MARSSkem, MARSSkemcheck to Roxygen2 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ternal These functions use ::: in examples and are not in NAMESPACE, confirming they are internal utilities not intended for direct user access. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… MARSSparamCIs, MARSSresiduals, MARSSresiduals.tT to Roxygen2 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…2; delete converted Rd files
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Migrates hand-written
.Rddocumentation files inman/to inline Roxygen2 comment blocks in their correspondingR/*.Rfiles, then deletes the original.Rdfiles. The preview files from the initial single-file test have been removed.Documentation migration
Each
.Rdfile is fully translated to a Roxygen2 block inserted directly before the corresponding function definition. Key conversion rules applied throughout:\usage{}blocks omitted — auto-generated by Roxygen2.Rdmarkup converted to Roxygen2 Markdown (\strong{}→**text**,\emph{}→*text*,\code{}→`text`)\eqn{}{}/\deqn{}{}math macros preserved exactly (not converted to$/$$)Roxygen: list(markdown = TRUE)respected throughout — blank#'lines added between paragraphs to prevent line concatenation; lists use* itemmarkdown syntax\keyword{internal}→@keywords internal(no@export); otherwise@exportadded\describe{\item{}{}}blocks inside@paramdescriptions → indented markdown bullet lists\value{\item{name}{desc}}→@returnwith* name: descbullet listsCompleted batches (30 of ~73 files):
Batch 1 — CSEGtmufigure, MARSS, MARSSFisherI, MARSS_dfa, MARSS_marss, MARSS_marxss, MARSSaic, MARSSapplynames
Batch 2 — MARSSboot, MARSSharveyobsFI, MARSShatyt, MARSShessian, MARSShessian_numerical, MARSSinfo, MARSSinits, MARSSkem, MARSSkemcheck
Batch 3 — MARSSinnovationsboot, stdInnov, MARSSkf, MARSSoptim, MARSSparamCIs, MARSSresiduals, MARSSresiduals_tT, MARSSresiduals_tt1, MARSSresiduals_ttt, MARSSsimulate, MARSSvectorizeparam
Remaining (in progress):
R CMD Rd2pdf . --output=MARSS_Manual.pdfNotes
MARSScv.RdandMARSSfit.Rdwere already auto-generated from existing Roxygen2 sources (R/MARSScv.RandR/MARSS-methods.R) and are left as-isCSEGriskfigure_preview.htmlandCSEGriskfigure_preview.pdffiles used during initial testing have been removed from the branchOriginal prompt
man/CSEGriskfigure.Rdto a Roxygen2 Markdown header in `R/CSEGriskfigure.R #1💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.