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

Upload package assessments outside of app #730

Merged
merged 22 commits into from
Mar 25, 2024
Merged

Conversation

Jeff-Thompson12
Copy link
Collaborator

Addresses #691

Copy link

codecov bot commented Dec 15, 2023

Codecov Report

Attention: Patch coverage is 76.14679% with 26 lines in your changes are missing coverage. Please review.

Project coverage is 79.20%. Comparing base (c08b273) to head (68e699e).

Files Patch % Lines
R/utils_insert_db.R 78.26% 20 Missing ⚠️
R/mod_decision_automation_utils.R 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #730      +/-   ##
==========================================
- Coverage   79.34%   79.20%   -0.14%     
==========================================
  Files          33       33              
  Lines        5063     5112      +49     
==========================================
+ Hits         4017     4049      +32     
- Misses       1046     1063      +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Jeff-Thompson12
Copy link
Collaborator Author

I believe this PR does enough to justify merging. Inside the application itself there is not much of a change from a user experience point of view. I did update the shiny notification so that the details are on a separate line. Current functionality will allow an app deployer to pre-seed the database before server deployment. A test has also been included.

@Jeff-Thompson12 Jeff-Thompson12 marked this pull request as ready for review January 4, 2024 13:18
Copy link
Contributor

@Robert-Krajcik Robert-Krajcik left a comment

Choose a reason for hiding this comment

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

Hi @Jeff-Thompson12
I switched to the branch and did a build/install.
Then tried uploading three packages: glue, stringr, forcats
Getting an error:

image

@Jeff-Thompson12
Copy link
Collaborator Author

I can't replicate the issue but I can add in a try-catch for the tarball downloading.

@Robert-Krajcik
Copy link
Contributor

Hi @Jeff-Thompson12
I am not seeing the tarball downloading errors this morning.
package upload is working fine.

upload_pkg_lst function working

> pkg_list <- c("Tplyr", "pkglite", "dplyr", "forcats")
> riskassessment::upload_pkg_lst(pkg_list)
No encoding supplied: defaulting to UTF-8.
No encoding supplied: defaulting to UTF-8.
No encoding supplied: defaulting to UTF-8.
No encoding supplied: defaulting to UTF-8.
No encoding supplied: defaulting to UTF-8.
No encoding supplied: defaulting to UTF-8.
# A tibble: 4 × 4
  package version status    score
  <chr>   <chr>   <chr>     <dbl>
1 Tplyr   1.1.0   new        0.37
2 pkglite 0.2.1   new        0.32
3 dplyr   1.1.4   duplicate NA   
4 forcats 1.0.0   new        0.24

@Robert-Krajcik Robert-Krajcik self-requested a review January 9, 2024 15:05
Robert-Krajcik
Robert-Krajcik previously approved these changes Jan 9, 2024
Copy link
Contributor

@Robert-Krajcik Robert-Krajcik left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Merge branch 'dev' into jt-691-remote_upld_data

# Conflicts:
#	DESCRIPTION
#	NEWS.md
Copy link
Collaborator

@AARON-CLARK AARON-CLARK left a comment

Choose a reason for hiding this comment

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

Per discussion today:

# Don't export for now while these issues persist:
# Adding a vignette example, showing how to use
# Add check to make sure db is actually there
# Note: there will be no startup initializing Credential DB using QWERTY
# User should probably supply a username and password
initialize_raa(assess_db = "database.sqlite",
              cred_db =,
              configuration = # tied to env
              )

upload_pkg_lst("Tplyr")

@AARON-CLARK
Copy link
Collaborator

Per discussion on 2/27, ready for another review.

@AARON-CLARK
Copy link
Collaborator

Hey @Jeff-Thompson12! Can you make sure you open new issue(s) to tackle/ address the items identified below?

  • Don't export for now while these issues persist:
  • Adding a vignette example, showing how to use
  • Note: there will be no startup initializing Credential DB using QWERTY; User should probably supply a username and password

Copy link
Collaborator

@AARON-CLARK AARON-CLARK left a comment

Choose a reason for hiding this comment

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

Hi @Jeff-Thompson12, sorry it's taken me so long to re-look at this PR. In total, it's great! But one thing I noticed is that the local (external to the app) score is different than the app-derived score. So, see if you can reproduce the following:

image

Notice the score was 0.33. Then I launched the app, deleted the tidyr package from the db, then loaded it on the package uploads tab. Notice the new score below is 0.25.

image

Let me know what you find. Keep in mind that I'm on a new laptop and just installed hundreds of packages to my machine... but they should all fall in line with the renv lock file.

@AARON-CLARK
Copy link
Collaborator

AARON-CLARK commented Mar 12, 2024

@Jeff-Thompson12, this might help... I noticed that when tidyr was loaded locally (before deleting & re-uploading it in the app), I got the following error message on the Package Dependencies tab. However, when I loaded tidyr after launching the app, there was no error here.

image

Merge branch 'dev' into jt-691-remote_upld_data

# Conflicts:
#	NEWS.md
@Jeff-Thompson12
Copy link
Collaborator Author

@AARON-CLARK I will take a look. I will note that we moved external uploading to a different PR. So if we believe it is functioning correctly within the application, technically we don't have a problem (yet).

@Jeff-Thompson12
Copy link
Collaborator Author

@AARON-CLARK I cannot duplicate this issue. Can you verify this is still a problem on your end?

Copy link
Collaborator

@aclark02-arcus aclark02-arcus left a comment

Choose a reason for hiding this comment

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

Looks amazing! The problem (previously referenced) doesn't exist any more. Apologies if it was user error. Merging!

@aclark02-arcus aclark02-arcus dismissed AARON-CLARK’s stale review March 25, 2024 12:57

stale - issues fixed.

@aclark02-arcus aclark02-arcus merged commit 94c96c6 into dev Mar 25, 2024
3 checks passed
@jthompson-arcus jthompson-arcus deleted the jt-691-remote_upld_data branch June 12, 2024 12:52
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.

4 participants