Drexel-UHC / analytics-corner

https://drexel-uhc.github.io/analytics-corner/
Other
1 stars 0 forks source link

API Key for UCH ShinyApps.io - Gianni Anfuso (A546A3CC96F5076249876013528E209D) #13

Open giannianfuso opened 1 year ago

giannianfuso commented 1 year ago

Name

Gianni Anfuso

Job title

Research Fellow

Department

Urban Health Collaborative

Request type

Dashboard

Request description

I created a dashboard for a project on my own shinyapp account and now we are ready to move it over to the UHC account

Example

No response

Data

No response

Notes

No response

ran-codes commented 1 year ago

UHC Shinyappsio Protocol

@giannianfuso I am assigning you token id CF8C0451BED84DFF553141A12B2BAAD5. I will email you the associated API key aka secret for this token.

The plan is to have you use it deploy your app yourself to the UHC shinyappsio account and control any necesary redeployments or staging... etc. Once you are done with the deployment process and no longer need access to the UHC shinyappsio account just let me know and I will invalid your particular token.

Using the emailed token

You should recieve and email with a script ( as shown below). Just run it in your Rstudio console and it should connect your local Rstudio to the UHC Shinyappsio account; you can deploy as you do regularly just select the UHC account instead.

image

ran-codes commented 5 months ago

@giannianfuso just a note your token is invalided as we cleaned up tockens for 2024. Please reopen if you need a new one. Thanks!

giannianfuso commented 2 months ago

Hi Ran,

Looks like I need a new token. Could you help set that up?

ran-codes commented 2 months ago

hey gianni. Sorry abotu that. I invalidated all tokens a few weeks ago.

I just made a new one and emailed you the secret. Will keep this issue open until your done with it.

giannianfuso commented 2 months ago

Thanks!

When I try to publish, I get this error:

── Preparing for deployment ──────────────────────────────────────────────────── ✔ Re-deploying "Congress-Mortality" using "server: shinyapps.io / username: drexel-uhc" ℹ Looking up application with id "9339731"... ✔ Found application https://drexel-uhc.shinyapps.io/Congress-Mortality/ ℹ Bundling 24 files: '.Rprofile', 'app.R', 'CSS/Header.css', 'CSS/Home.css', 'CSS/NavbarPage.css', 'DoD_byEducCD_2.Rdata', 'DoD_byEducCD_absDisparity_2.Rdata', 'DoD_byRace2CD_2.Rdata', 'DoD_byRaceCD_2.Rdata', 'DoD_byRaceCD_absDisparity_2.Rdata', 'DoD_Maps_byCD_2.Rdata', 'HTML/FontAwesomeLoader.html', 'HTML/Footer.html', 'HTML/Header.html', 'HTML/Home.html', 'IMR_byCD_byRace_2.Rdata', 'IMR_byCD_byRace_absDisparity_2.Rdata', 'IMR_Maps_byCD_2.Rdata', …, 'www/favicon.ico', and 'www/logo.png' ℹ Capturing R dependencies from renv.lock Error in FUN(X[[i]], ...) : subscript out of bounds Calls: ... computePackageDependencies -> parseRenvDependencies -> unlist -> lapply In addition: Warning message: In packageDescription(name, lib.loc = lib_dir, encoding = "UTF-8") : no package 'markdown' was found Execution halted

Could this be an issue with the renviron file?

ran-codes commented 2 months ago

try deleting .Rproject from the repo then publishing. or moving your app into a child folder within your project. just publishyour app from somewhere without he .Rproject file ... i remember it does strange things to shinyappsio.

giannianfuso commented 2 months ago

It was already in a subfolder, but the app had its own project, which I deleted. Tried publishing again but it didn't work. There still is a ".Rproj.user" folder -- should I delete that?

ran-codes commented 2 months ago

okay. We are getting closer. Thanks for sharing that info.

Next steps is: dont open your shiyn app within an R project (as this activates renv); Shinyappsio uses packrat and if you deploy from a rstuido session that has an active renv it may cause issues. So try the following:

giannianfuso commented 2 months ago

Now, when I do this, I am getting a new error:

image

ran-codes commented 2 months ago
giannianfuso commented 2 months ago

Still get that error

ran-codes commented 2 months ago

where is your directory? show me your console.

getwd()
list.files()
giannianfuso commented 2 months ago

image

ran-codes commented 2 months ago

delete the /rsconnect folder and try publishing again

giannianfuso commented 2 months ago

Still get the Forbidden error -- publish is greyed out

ran-codes commented 2 months ago

thanks for your patience gianni. A few more things:

if it still doesn't work please snip the 'deploy' tab from Rstudio for me. image

giannianfuso commented 2 months ago

Unchecking those still does not let me click publish. Also, should it say publish to drexel uhc? I am only seeing publish from drexel uhc but to giannianfuso

giannianfuso commented 2 months ago

And I do not currently have a deploy tab