-
Notifications
You must be signed in to change notification settings - Fork 12
Description
After exceeding the quota for my network home directory several times 🎉💾🥦, I learned about the XDG Base Directory Specification. This specification defines locations where programs should store and look for user-specific data and configuration files.
Probably the two most relevant environment variables would be:
$XDG_DATA_HOMEdefines the base directory relative to which user-specific data files should be stored. If$XDG_DATA_HOMEis either not set or empty, a default equal to$HOME/.local/shareshould be used.$XDG_CONFIG_HOMEdefines the base directory relative to which user-specific configuration files should be stored. If$XDG_CONFIG_HOMEis either not set or empty, a default equal to$HOME/.configshould be used.
My inclination would be for data files for a package to be located in $XDG_DATA_HOME/<package>, where <package> is replaced with the package name as it would be imported. For example, data for PlasmaPy would be in $XDG_DATA_HOME/plasmapy.
Some packages already have environment variables that define where to place stored data (like $SPEDAS_DATA_DIR). For backward compatibility, the existing variables should be given priority.
The benefits would be that users would only need to define this location once for all packages, and that it would be more convenient to find where the stored data files from all packages are.
This could be a standalone PHEP, or perhaps included in a standards doc.
See also: PlasmaPy/PlasmaPy#2600