Scratch.jl
Scratch.jl copied to clipboard
Override scratch directory with preference or environmental variable
Pursuant to a discussion on Slack, this PR adds the ability to specify an alternate location for scratch directories using Preferences.jl
or using an environmental variable. My personal reason for needing this is that for large files on HPC, I typically want to put stuff on filesystems that are specifically meant for scratch data / fast access, which is often a different
filesystem than $HOME
Possible sources of bikeshedding:
- Is it ok to take on
Preferences
as a dependency? If not, I still think this would be useful with just the environmental variable option (I couldn't think of a way to do this with a conditional dependency, but I'm happy to take suggestions there). - The names of the preference / env variable. I currently have
"scratch_dir"
andJULIA_SCRATCH_DIR
respectively, but don't feel strongly.
Obviously happy to take any other comments / suggestions, but if this approach is amenable, I can start working on docs and tests.