Skip to content

Conversation

@Zhenglei-BCS
Copy link

@Zhenglei-BCS Zhenglei-BCS commented Jul 3, 2025

@JensBaalkilde , I opened the pull request but please to not yet pull to the master yet.

Summary of Repository Transformation to Roxygen Style with Devtools Workflow

1. Documentation Conversion

Converting .Rd Files to Roxygen Comments

  • Used Rd2roxygen package to convert existing .Rd documentation files to roxygen2-style comments
  • Placed roxygen comments directly above corresponding function definitions in R source files
  • Fixed issues with empty tags and incomplete conversions manually

Enhancing Roxygen Documentation

  • Added proper @param, @return, @examples, and other tags to all functions
  • Fixed S3 method documentation by adding proper @export tags

Package-Level Documentation

  • Created proper package documentation using the "_PACKAGE" approach
  • Fixed duplicate alias issues between package documentation and function documentation
  • Added comprehensive package description, imports, and metadata

2. NAMESPACE Management

Converting Static NAMESPACE to Roxygen-Generated

  • Replaced the manually maintained NAMESPACE file with roxygen-generated one
  • Added proper @export tags to all exported functions
  • Added @importFrom and @import tags for package dependencies
  • Ensured S3 methods were properly exported with @export tags

3. Vignettes Management

Converting Examples to Vignettes

  • Created vignettes to showcase package functionality by extracting examples from existing documentation
  • Potentially we could move complex examples from function documentation to vignettes
  • Fixed example execution issues in documentation

4. Package Structure Modernization

Implementing Devtools Workflow

  • Adopted devtools::document() for documentation generation
  • Used devtools::check() for package validation
  • Used devtools::test() for running unit tests
  • Set up devtools::build_vignettes() for vignette building

5. GitHub Pages Integration

Setting Up Package Website

  • Used pkgdown to generate a package website

This transformation has modernized the package development workflow, making it easier to maintain, extend, and document the package in the future. The roxygen2-based documentation system ensures that code and documentation stay in sync, while the devtools workflow simplifies package development tasks. The GitHub Pages integration provides accessible documentation for users of the package.

@Zhenglei-BCS
Copy link
Author

I opened pull request because I cannot create an issue within a fork.

@Zhenglei-BCS
Copy link
Author

Zhenglei-BCS commented Jul 4, 2025

Link to Notes

Need to solve before merging (talk to Jen):

  • encounter issues when using sandwich methods.

  • Do we need the cache folder to build the R package?

@Zhenglei-BCS Zhenglei-BCS marked this pull request as draft July 4, 2025 09:52
@Zhenglei-BCS
Copy link
Author

Further improvements $\rightarrow$ open another issue:

  • In the future we could configure GitHub Actions to automatically build and deploy the website
  • R folder can be organized by group functions with similar application scenario together.

@Zhenglei-BCS
Copy link
Author

I made a few changes to the functions to pass CRAN check. However, one important change is in the getFctDerivx Function:

I assumed transfe(e) should be log(e) based on the context, but you should verify this is correct. If transfe is supposed to be a different function. I cannot find a definition within or outside the package.

@JensBaalkilde JensBaalkilde marked this pull request as ready for review July 12, 2025 07:31
@Zhenglei-BCS
Copy link
Author

The R CMD check action has been passed, however, using internal functions from drc package is remaining a note in the check output. We can either get around this by adding eval(parse) wrapper or directly pull the internal functions into this repo, or try to use the upper level functions instead if possible.

Copy link
Collaborator

@JensBaalkilde JensBaalkilde left a comment

Choose a reason for hiding this comment

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

Great job on getting documentation up to date and addressing issues!

@JensBaalkilde JensBaalkilde changed the base branch from master to devel July 31, 2025 09:20
@JensBaalkilde JensBaalkilde merged commit 02d4b13 into DoseResponse:devel Jul 31, 2025
5 checks passed
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.

2 participants