Skip to content

packageList() extracts github packages, w/ tests - #99

Merged
cebarboza merged 3 commits into
developfrom
93-lets-start-with-installing-github-packages
Aug 26, 2026
Merged

packageList() extracts github packages, w/ tests#99
cebarboza merged 3 commits into
developfrom
93-lets-start-with-installing-github-packages

Conversation

@cebarboza

@cebarboza cebarboza commented Aug 19, 2026

Copy link
Copy Markdown
Member

Comment thread R/getPkgZips.R
type = "github"
) {
requireInstall("jsonvalidate")
is_lockfile <- renv::lockfile_validate(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

renv::lockfile_validate() returns FALSE when running with mocklock(). Returns TRUE when it is run with a an actual existing renv.lock.

Loading the mocklock() with renv::lockfile_read() works fine, but never gets to that step because of FALSE status. A quick glance of the structure of the mock lock file doesn't reveal anything glaring, but perhaps there is a typo or something else that needs to replicated to be interpreted as an actual lockfile.

@ariannaa7

ariannaa7 commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Hi @cebarboza,

I attempted to use packageList() and here are my notes:

  • requireInstall() effectively prompted me to install jsonvalidate prior to running when I attempted to run packageList
  • extractGithubList() returned only the DarwinShinyModules package as expected

The only note is that I had to run packageList() in debug mode because of the issue with the mockLock as mentioned above. Some ideas for the mockLock to ensure that it passes renv::lockfile_validate:

  • Checking for small structural differences?
  • Creating a physical lockfile for testing and reading that in instead of creating a temporary one
  • If we want to continue using mockLock() and it still doesn't pass the validation, then perhaps bypassing the renv::lockfile_validate if reading from mockfile(). I personally would still be concerned that we are missing something and prefer creating an actual renv.lock for testing, but would trust your opinion @cebarboza !

Regarding the tests:
In the renv.lock included in tests/testthat/data, the DarwinShinyModules version is set to 0.3.2.
But the "packageList git repostitories" and "extractGithubListbut" tests expect 0.6.0 so they fail.
image

@cebarboza

Copy link
Copy Markdown
Member Author

Hi @ariannaa7 I couldn't replicate running 'mocklock' with packageList(). In the test I am writing a new one from scratch. I will merge and continue with the division and integration with more functions.

@cebarboza
cebarboza merged commit 91749e7 into develop Aug 26, 2026
2 of 5 checks passed
@cebarboza
cebarboza deleted the 93-lets-start-with-installing-github-packages branch August 26, 2026 22:10
@cebarboza cebarboza added the enhancement New feature or request label Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

2 participants