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

Changes nf-core cache dir to user's home #381

Merged
merged 8 commits into from
Sep 20, 2019
Merged

Conversation

sven1103
Copy link
Member

@sven1103 sven1103 commented Sep 19, 2019

Fixes #379 .

PR checklist

  • This comment contains a description of changes (with reason)
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated
  • CHANGELOG.md is updated
  • README.md is updated

Learn more about contributing: https://github.com/nf-core/tools/tree/master/.github/CONTRIBUTING.md

@sven1103 sven1103 requested a review from ewels September 19, 2019 12:53
@lgtm-com
Copy link

lgtm-com bot commented Sep 19, 2019

This pull request introduces 1 alert when merging bd28114 into c34b04b - view on LGTM.com

new alerts:

  • 1 for Unused import

@apeltzer
Copy link
Member

The import temfile can be dropped according to:

https://lgtm.com/projects/g/nf-core/tools/rev/pr-78a866159bbc8065b95d1ea9b362de23429a32d8

nf_core/utils.py Outdated Show resolved Hide resolved
nf_core/utils.py Show resolved Hide resolved
@ewels
Copy link
Member

ewels commented Sep 19, 2019

In fact, instead of using the user's home directory, can we not just add in a user-specific subdir on the temp path? Needs to be persistent between runs though. Maybe os.getlogin()?

os.path.join(tempfile.gettempdir(), os.getlogin(), 'nfcore_cache')

@sven1103
Copy link
Member Author

In fact, instead of using the user's home directory, can we not just add in a user-specific subdir on the temp path? Needs to be persistent between runs though. Maybe os.getlogin()?

os.path.join(tempfile.gettempdir(), os.getlogin(), 'nfcore_cache')

I think the home dir is a better solution, because the tmp folder might not be persistent. Depending on the system setup, it might get deleted regularly. And we do not want that for the request cache imo :)

@lgtm-com
Copy link

lgtm-com bot commented Sep 20, 2019

This pull request introduces 1 alert when merging 03b507a into f71f037 - view on LGTM.com

new alerts:

  • 1 for Unused import

@sven1103
Copy link
Member Author

@ewels better?

@apeltzer
Copy link
Member

we're reviewing
@sven1103 you broke the tests!

@sven1103 sven1103 merged commit 5dcca6a into nf-core:dev Sep 20, 2019
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.

3 participants