eegdash.paths module#

Path utilities and cache directory management.

This module provides functions for resolving consistent cache directories and path management throughout the EEGDash package, with integration to MNE-Python’s configuration system.

eegdash.paths.get_default_cache_dir() → Path[source]

Resolve the default cache directory for EEGDash data.

The first match wins:

  1. The EEGDASH_CACHE_DIR environment variable.

  2. An existing .eegdash_cache in the current working directory (the previous default), so an existing cache is not downloaded again.

  3. An eegdash directory inside $SCRATCH when it points to a writable directory (common on HPC clusters).

  4. The MNE_DATA configuration of MNE-Python.

  5. The platform user-cache directory (platformdirs.user_cache_dir()).

  6. .eegdash_cache in the current working directory (last resort).

The resolved path is logged once per process.

Returns:

The resolved, absolute path to the default cache directory.

Return type:

Path