Skip to content

Use XDG_CACHE_HOME to determine CACHE_DIR

Duncan Macleod requested to merge duncanmmacleod/pesummary:xdg-cache-home into master

This MR patches pesummary.utils.utils to look first at XDG_CACHE_HOME to determine the path of the user-configured global cache directory (defaulting to ~/.cache). This allows users to override the location of the pesummary cache as desired.

Examples:

$ python -c "from pesummary.utils import utils; print(utils.CACHE_DIR)"
/home/duncan/.cache/pesummary
$ XDG_CACHE_HOME="/tmp" python -c "from pesummary.utils import utils; print(utils.CACHE_DIR)"
/tmp/pesummary
Edited by Duncan Macleod

Merge request reports