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

[skip vbump] upversion to 0.4.0 #300

Merged
merged 5 commits into from
Jan 24, 2025
Merged

[skip vbump] upversion to 0.4.0 #300

merged 5 commits into from
Jan 24, 2025

Conversation

donyunardi
Copy link
Contributor

Related to #296

  • Update NEWS
  • Update DESCRIPTION and upversion rtables.office and rtables to released version

Copy link
Contributor

github-actions bot commented Jan 22, 2025

Unit Tests Summary

  1 files   19 suites   28s ⏱️
197 tests 197 ✅ 0 💤 0 ❌
337 runs  337 ✅ 0 💤 0 ❌

Results for commit 371f13f.

♻️ This comment has been updated with latest results.

@m7pr m7pr self-assigned this Jan 22, 2025
@donyunardi
Copy link
Contributor Author

donyunardi commented Jan 22, 2025

I removed Remotes entry for rtables.officer because the package is now available in CRAN.

@donyunardi
Copy link
Contributor Author

Got a NOTE when checking against R-oldrelease:
https://win-builder.r-project.org/9P7T8DL5kaJ3/00check.log

* checking examples ... [54s] NOTE
Examples with CPU (user + system) or elapsed time > 10s
          user system elapsed
Reporter 19.77   0.19   19.97
Renderer 15.83   0.68   17.48

But no NOTES in R-release and R-devel:
https://win-builder.r-project.org/o5xCZFZZW4ug/00check.log
https://win-builder.r-project.org/uV31AS5CA6hW/00check.log

I think we're good to go.

@donyunardi
Copy link
Contributor Author

Submitted to CRAN. Awaiting Feedback.

@donyunardi
Copy link
Contributor Author

donyunardi commented Jan 23, 2025

Got automated feedback not passing under Debian:
https://win-builder.r-project.org/incoming_pretest/teal.reporter_0.4.0_20250123_012612/Debian/00check.log

Dear maintainer,

package teal.reporter_0.4.0.tar.gz does not pass the incoming checks automatically, please see the following pre-tests (additional issue checks):
Windows: <https://win-builder.r-project.org/incoming_pretest/teal.reporter_0.4.0_20250123_012612/Windows/00check.log>
Status: OK
Debian: <https://win-builder.r-project.org/incoming_pretest/teal.reporter_0.4.0_20250123_012612/Debian/00check.log>
Status: 1 NOTE

Last released version's CRAN status: OK: 13
See: <https://cran.r-project.org/web/checks/check_results_teal.reporter.html>

CRAN Web: <https://cran.r-project.org/package=teal.reporter>

Please fix all problems and resubmit a fixed version via the webform.
If you are not sure how to fix the problems shown, please ask for help on the R-package-devel mailing list:
<https://stat.ethz.ch/mailman/listinfo/r-package-devel>
If you are fairly certain the rejection is a false positive, please reply-all to this message and explain.

More details are given in the directory:
<https://win-builder.r-project.org/incoming_pretest/teal.reporter_0.4.0_20250123_012612/>
The files will be removed after roughly 7 days.

*** Strong rev. depends ***: teal teal.modules.clinical teal.modules.general

Best regards,
CRAN teams' auto-check service
Flavor: r-devel-windows-x86_64
Check: *, Result: OK


Flavor: r-devel-linux-x86_64-debian-gcc
Check: examples, Result: NOTE
  Examples with CPU (user + system) or elapsed time > 5s
            user system elapsed
  Reporter 6.788  0.032   6.820
  Renderer 5.886  0.172   6.097

@donyunardi
Copy link
Contributor Author

donyunardi commented Jan 23, 2025

I see iris is being used on the test cases of Renderer and Reporter. One way that I could think of is to make a smaller subset of iris or use other dataset that are smaller like cars.

@insightsengineering/nest-core-dev what do you think?

@llrs-roche
Copy link
Contributor

I found this same problem on #299 , I explored it a bit and I think it is a problem with roxygen @examplesIf, see also #248. I don't think changing datasets will reduce computing time. We might be able to reduce (more)time if instead of having each method create a new card and reporter we reused one. It might be harder to follow individual methods examples but it will probably make the examples faster.

@donyunardi donyunardi linked an issue Jan 23, 2025 that may be closed by this pull request
32 tasks
@donyunardi
Copy link
Contributor Author

donyunardi commented Jan 23, 2025

It turns out, we have the same message in our r-hub action as well in the main branch (Debian == gcc12):
https://github.com/insightsengineering/teal.reporter/actions/runs/12850103218/job/35829405265#step:8:119

After investigation, I decided to just remove the second append_table() method for iris dataset.

The pipeline is now completed without NOTE:
https://github.com/insightsengineering/teal.reporter/actions/runs/12940202534/job/36093952669#step:8:118

What I did was:

  • Removed duplicated getNamespace from examples
  • Removed append_table(iris) since we already another append_table() in the example

@donyunardi donyunardi requested a review from m7pr January 23, 2025 23:47
@pawelru
Copy link
Contributor

pawelru commented Jan 24, 2025

It would be the best to use profiler tools to identify performance bottlenecks. I think that you are guessing here.

pkgload::run_example("./man/Reporter.Rd") |> profvis::profvis()

Currently the main performance bottleneck is converting rtables to flextable (which is btw happening outside of this package). Hance I would rather remove / shorten rtables related example.

image

@pawelru
Copy link
Contributor

pawelru commented Jan 24, 2025

Sorry I was too fast and made mistake

rtables to flextable is responsible for this:
image

Whereas data.frame to flextable is responsible for this:
image

In this case - reducing examples with data.frames would actually help. I don't know if the size matter though...

BTW: why do force conversion of data.frame to flextable? It looks like an expensive operation.

@vedhav
Copy link
Contributor

vedhav commented Jan 24, 2025

why do force conversion of data.frame to flextable? It looks like an expensive operation.

I'd have to check, but it could be because of the output render formats. flextable renders in all the formats easily, I'm not sure about rtables.

@gogonzo
Copy link
Contributor

gogonzo commented Jan 24, 2025

BTW: why do force conversion of data.frame to flextable? It looks like an expensive operation.

data.frame needs to be converted to display it in the document. There are several design pitfalls, the most serious:

  • too early conversion during *Block initialization (via $set_content). It should rather be converted when object is rendered (in Renderer or previewer). Package needs refactor and some discussions took place in a hotel lobby during useR! last year ;] (with @chlebowa @averissimo )

I'd have to check, but it could be because of the output render formats. flextable renders in all the formats easily, I'm not sure about rtables.

flextable is used to "easily" convert object to Rmd and HTML (see Renderer$renderRmd, block_to_html())

@pawelru
Copy link
Contributor

pawelru commented Jan 24, 2025

too early conversion during *Block initialization (via $set_content). It should rather be converted when object is rendered (in Renderer or previewer).

Yeah that's exactly it. Probably not worth to postpone the release because of that but I think it's important.

Also posting this just to show you how to handle "examples takes too long" type of problems.

@gogonzo
Copy link
Contributor

gogonzo commented Jan 24, 2025

Yeah that's exactly it. Probably not worth to postpone the release because of that but I think it's important.

It is not justv about TableBlock. Plots for example are saved into file during PictureBlock initialization. I'm not a fan to do these changes now as we already know that the whole package needs to be revisited.

@donyunardi
Copy link
Contributor Author

donyunardi commented Jan 24, 2025

Thanks @pawelru! Your advise will come in handy moving forward if we run into this type of issue again when submitting to CRAN.

Also, as you mentioned, refactoring the examples is not worth to postpone the release, especially we're thinking about refactoring teal.reporter with this issue

I will move forward with the release.

@donyunardi
Copy link
Contributor Author

Submitted. Awaiting CRAN feedback.

@donyunardi
Copy link
Contributor Author

made it to CRAN
image

@donyunardi donyunardi merged commit 4930f11 into main Jan 24, 2025
62 checks passed
@donyunardi donyunardi deleted the release-candidate-v0.4.0 branch January 24, 2025 19:34
@github-actions github-actions bot locked and limited conversation to collaborators Jan 24, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CRAN Release]: 0.4.0
6 participants