Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve roxygen2 documentation generation #3

Merged
merged 9 commits into from
Jul 30, 2023
Merged

Improve roxygen2 documentation generation #3

merged 9 commits into from
Jul 30, 2023

Conversation

dgkf
Copy link
Owner

@dgkf dgkf commented Jul 29, 2023

Closes #2

Changes

  • Ensure that generated documentation does not cause R CMD check issues
  • Improves opts() so that it returns all available options (for provided env)
  • Revamp testing so its less sensitive to loaded packages
  • Notably, add test to ensure that generate docs for the bundled example package pass R CMD check

@maxheld83 could I ask you to try regenerating your documentation after installing the dev version?

remotes::install_github("dgkf/options@2-rd-check-issues")

or

pak::pkg_install("github=dgkf/options@2-rd-check-issues")

@dgkf dgkf linked an issue Jul 29, 2023 that may be closed by this pull request
@maxheld83
Copy link

yes, works perfectly now!

The docs look different, but that's probably intended?
(I think the change is good!).

opts-fix

(I redacted the pkg name).

@dgkf
Copy link
Owner Author

dgkf commented Jul 29, 2023

yes, works perfectly now! The docs look different, but that's probably intended? (I think the change is good!).

Great! Thanks for the fast turnaround! Yes, using @usage triggers checks for consistency between the code in the \usage{} section and aliased objects. I don't think there's a way to use it without some pretty egregious hacks and this felt more true to the intention of the documentation purpose.

I'm going to fix up the failing tests, but once everything is squared away I'll merge the changes and try to get a new release pushed up to CRAN so that you don't have to rely on a dev dependency.

@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2023

Codecov Report

Merging #3 (22b419a) into main (cc9eb17) will increase coverage by 0.87%.
The diff coverage is 95.12%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main       #3      +/-   ##
==========================================
+ Coverage   88.47%   89.34%   +0.87%     
==========================================
  Files          10       10              
  Lines         399      413      +14     
==========================================
+ Hits          353      369      +16     
+ Misses         46       44       -2     
Files Changed Coverage Δ
R/options_spec.R 71.87% <ø> (ø)
R/options_env.R 90.90% <90.90%> (-0.52%) ⬇️
R/options_roxygen.R 95.52% <95.83%> (+0.44%) ⬆️
R/define_option.R 96.87% <100.00%> (ø)
R/options_get.R 80.00% <100.00%> (+6.92%) ⬆️
R/utils.R 80.00% <100.00%> (+20.00%) ⬆️

@dgkf
Copy link
Owner Author

dgkf commented Jul 29, 2023

still working on getting tests passing. Now that I'm running a full R CMD check for the example package bundled with options inside each R CMD check of options as a test case, I'm getting a few rather hairy test failures.

I think it's an important thing to test, but it will take a bit more work before I can get it to cooperate.

@dgkf
Copy link
Owner Author

dgkf commented Jul 30, 2023

Added an R CMD check test, but it produces false positive errors which seem to be due to running as part of a test suite inside another R CMD check.

Clearing relevant environment variables seems to fix it on ubuntu & macos, but the same false positive check failures remain on windows. I don't have a windows machine to test on, and I'm reasonably comfortable with this test just passing on a couple systems.

@dgkf dgkf merged commit 2a8a99d into main Jul 30, 2023
14 checks passed
@dgkf dgkf deleted the 2-rd-check-issues branch July 30, 2023 18:20
@dgkf
Copy link
Owner Author

dgkf commented Jul 30, 2023

@maxheld83 just to keep you updated. The package is updated here, but CRAN is temporarily disabling new submissions until Aug 7th. I'll plan to submit shortly after. I expect there will be a bit of a backlog initially, but I hope to have a new update out to you before mid-August.

@dgkf
Copy link
Owner Author

dgkf commented Aug 7, 2023

@maxheld83 - options v0.0.2 is now up on CRAN. Thanks again for your support and please continue to file bugs if you discover anything else!

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.

R CMD check issues warnings for #' @usage sections
3 participants