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
Modules: workflow.source_path()
does not respect tmpdir
#1435
Comments
This is not really a bug, but certainly highlighting an important corner case:
Of course a not writable temp folder is a misconfiguation, but at least one should get a proper error in such a case. What remains is case 1, which is still not optimal. |
Earlier, we discussed storing the files in a sub-directory of BTW, it does not seem to be respecting the $TMPDIR environment variable either. I tried setting it both inside and outside of the snakefile and no dice.
|
Snakemake just uses pythons tempfile module, the behavior is documented here: https://docs.python.org/3/library/tempfile.html#tempfile.gettempdir If that does not work with setting TMPDIR in your case, something must interfere there. |
However, solved properly in PR #1436. |
Just a quick thing: using .snakemake is (although I initially thought it) not the right solution because it can have problems in case the user sets |
Yeah, this seems like a lot more of a simple fix than I expected. Clearly the underlying python module was well designed! As for the TMPDIR env var problem, it's clearly on my end: |
Actually, my test command was broken because it needed |
Snakemake version
Version 7.0.0 (not a regression; exists on 6.13.1 too)
Describe the bug
When using
workflow.source_path('some/file')
, Snakemake copiessome/file
to the/tmp
directory, instead of respecting thetmpdir
resource. This is problematic because/tmp
is specific to particular nodes instead of shared across the cluster in many computing environments including mine.Logs
This log is from the below example, modified to not reflect the path of the example:
You can see that Snakemake is using the
/tmp/
directory instead of thetmpdir
.Minimal example
Snakefile (placed in root of pipeline directory instead of
workflow/
):Running:
Additional context
This functionality is necessary for modules that require resources unless the user copies the resources into the parent workflow directory. The fact that file extensions are not preserved is also potentially problematic.
I would be happy if somebody could provide a workaround, especially one that will work with module prefixes, before this is addressed in the code. I need this functionality in order to modularize workflows that have resources and
workflow.source_path()
doesn't work when submitting to my cluster.The text was updated successfully, but these errors were encountered: