Biogen-Inc / tidyCDISC

Demo the app here: https://bit.ly/tidyCDISC_app
https://biogen-inc.github.io/tidyCDISC/
GNU Affero General Public License v3.0
108 stars 38 forks source link

Access `inst/app/www` files #171

Closed AARON-CLARK closed 1 year ago

AARON-CLARK commented 1 year ago

Fixes #166 bug by using system.file() to access these files. Besides the issues with the red_x.png mentioned on #166, I also found an issue downloading reports on the Individual explorer tab (below). The first download was using the old method, and the second attempt was using system.file().

image

Note that the "old method" will work inside the tidyCDISC project, so if you're going to test, I recommend running the following in a fresh R session:

remotes::install_github("Biogen-Inc/tidyCDISC", ref = "ac-166-access-png") # May Require Rtools
packageVersion("tidyCDISC") # should be v0.2.0.90001
tidyCDISC::run_app()
AARON-CLARK commented 1 year ago

@AARON-CLARK in the "app_config.R" file, {golem} has created a wrapper for system.file() with the package argument pre-specified.

@Jeff-Thompson12. Ah, true. Updated.

codecov[bot] commented 1 year ago

Codecov Report

Merging #171 (5841e58) into devel (c9923f9) will increase coverage by 0.01%. The diff coverage is 28.57%.

:exclamation: Current head 5841e58 differs from pull request most recent head caaf6a2. Consider uploading reports for the commit caaf6a2 to get more accurate results

@@            Coverage Diff             @@
##            devel     #171      +/-   ##
==========================================
+ Coverage   19.81%   19.83%   +0.01%     
==========================================
  Files          50       50              
  Lines        4501     4502       +1     
==========================================
+ Hits          892      893       +1     
  Misses       3609     3609              
Impacted Files Coverage Δ
R/mod_indvExpPatVisits.R 0.00% <0.00%> (ø)
R/mod_dataComply_fct_helpers.R 76.51% <100.00%> (+0.17%) :arrow_up:
R/mod_tableGen.R 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

tdwils commented 1 year ago

@AARON-CLARK I followed your instructions above and ran the app in a new session. I was able to select datasets with missing variables, and the red X displayed correctly.

I was able to download an html file from the Individual Explorer, but attempting to save as PDF gave an error:

image

Warning in system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
  '"pdflatex"' not found
Warning: Error in : LaTeX failed to compile C:\Users\twilson4\AppData\Local\Temp\RtmpIz29Ua\file3e4077ba89f.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips.
  3: runApp
  2: print.shiny.appobj
  1: <Anonymous>

I also got a message when I first started the app:

The `name` provided ('chevron-down w3-tiny') does not correspond to a known icon
AARON-CLARK commented 1 year ago

Hi @tdwils, thanks for the review!

I was able to download an html file from the Individual Explorer, but attempting to save as PDF gave an error:

Hmmm, I think you just need to follow the instructions given in the error message. See https://yihui.org/tinytex/r/#debugging. The PDF renders great for me. I'm not sure we can fix this in renv.lock... tinytex is already in there. But running the debugging steps does a lot of mystical things that magically make things work again. Let me know how that goes.

I also got a message when I first started the app: The 'name' provided ('chevron-down w3-tiny') does not correspond to a known icon

That is strange. I got that message too. I'm not really sure why it's showing up on my branch, but not devel or master...