Skip to content

Fix and standardize @examples (\dontrun{})#3798

Merged
infotroph merged 19 commits intoPecanProject:developfrom
S1DDHEY:fix/rethink-dontrun
Feb 18, 2026
Merged

Fix and standardize @examples (\dontrun{})#3798
infotroph merged 19 commits intoPecanProject:developfrom
S1DDHEY:fix/rethink-dontrun

Conversation

@S1DDHEY
Copy link
Copy Markdown
Contributor

@S1DDHEY S1DDHEY commented Feb 1, 2026

Description

fixes #3797
This WIP PR starts cleaning up Roxygen @examples across PEcAn packages.

So far this includes:

  • Fixing syntactic errors that cause pkgdown example parse failures
  • Making examples self-contained (no undefined symbols)
  • Converting non-R commands inside @examples to comments
  • Standardizing use of \dontrun{} vs \donttest{} based on side effects

Motivation and Context

Review Time Estimate

  • Immediately
  • Within one week
  • When possible

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • My name is in the list of CITATION.cff
  • I agree that PEcAn Project may distribute my contribution under any or all of
    • the same license as the existing code,
    • and/or the BSD 3-clause license.
  • I have updated the CHANGELOG.md.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@github-actions github-actions bot added the models label Feb 4, 2026
@S1DDHEY
Copy link
Copy Markdown
Contributor Author

S1DDHEY commented Feb 8, 2026

I've added most of changes to @examples here, only the make document step remains to update the .Rd files which I'll do after this is reviewed.

There are also a few functions whose examples require specific inputs or domain knowledge that I don’t currently have. For those, I plan to open a separate issue.

@S1DDHEY S1DDHEY marked this pull request as ready for review February 8, 2026 06:38
@S1DDHEY S1DDHEY changed the title WIP: Fix and standardize @examples (\dontrun{}) Fix and standardize @examples (\dontrun{}) Feb 10, 2026
Copy link
Copy Markdown
Member

@infotroph infotroph left a comment

Choose a reason for hiding this comment

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

Thanks for working through this! Overall this looks great. I left some minor suggestions inline.

Comment thread base/db/R/query.trait.data.R
Comment thread base/settings/R/get_args.R Outdated
Comment thread base/settings/R/read.settings.R Outdated
Comment thread base/utils/R/timezone_hour.R Outdated
Comment thread base/utils/R/utils.R Outdated
Comment thread models/fates/R/model2netcdf.FATES.R Outdated
Comment thread modules/data.land/R/IC_BADM_Utilities.R
Comment thread modules/data.land/R/soil2netcdf.R Outdated
Comment thread base/settings/R/read.settings.R Outdated
Comment thread base/settings/R/read.settings.R Outdated
@infotroph infotroph enabled auto-merge February 18, 2026 04:38
Comment thread base/settings/man/read.settings.Rd Outdated
Comment thread modules/data.remote/R/remote_process.R
Comment thread modules/data.remote/R/remote_process.R
Comment thread modules/data.remote/man/construct_remotedata_filename.Rd
Comment thread modules/data.remote/man/construct_remotedata_filename.Rd
@infotroph infotroph added this pull request to the merge queue Feb 18, 2026
Merged via the queue into PecanProject:develop with commit 5f1dba6 Feb 18, 2026
19 of 25 checks passed
@S1DDHEY
Copy link
Copy Markdown
Contributor Author

S1DDHEY commented Feb 19, 2026

@infotroph Thank You for the review, as mentioned earlier there are a few places where specific inputs are needed for which I don't have that domain specific knowledge (for this one I'll open an issue mentioning all of them).

If someone wanted to spend more time on this they could come up with a minimal settings that can be loaded for an example with no \dontrun needed, then store it in a path like base/settings/inst/settings_example.xml and call it in the example using system.file(). But meanwhile for thie PR let's just cut the whole section down to one example and move on.

Also I can look forward to implement something similar to this one as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rethink \dontrun in examples

2 participants