feat(nfcoreInstall): use statefiles to track installs in a library#61
feat(nfcoreInstall): use statefiles to track installs in a library#61prototaxites merged 6 commits intomainfrom
Conversation
… avoid re-installing modules
|
Essentially, I'd do:
To fake the statefile:
To check nfcoreInstall:
|
|
Also, what is it you're trying to optimise ? The time it takes for |
It was running very slowly for me on the farm, for reasons I'm not sure why. It does have to query github each time, I think, which is not so ideal in any case? |
|
Added a test, using the install -> delete -> reinstall -> check for files method. |
maxulysse
left a comment
There was a problem hiding this comment.
could you add some documentation to reflect this new feature?
|
I've added some documentation and improved the error handling over MD5 sums, as well as a couple other places where I spotted the functions should probably throw an error and exit rather than continue. |
Running nfcoreInstall on a bunch of modules takes time. If you are caching the same library between multiple tests, this means calling nf-core install for modules that are already installed. Instead, now we write a state file for each module after a successful install (hashed from name, git commit SHA and remote), and check if it exists before trying an install later.
Not sure how to test this though as I don't think I can access the nf-test stdout in its own test...