core.paths¶
Platform-aware base directory resolution for taskclf.
TASKCLF_HOME resolution order¶
All data, model, and artifact paths are anchored to a single root
directory resolved by taskclf_home():
| Priority | Source | Example |
|---|---|---|
| 1 | TASKCLF_HOME env var |
export TASKCLF_HOME=~/my-taskclf |
| 2 | macOS default | ~/Library/Application Support/taskclf/ |
| 3 | XDG default (Linux) | ~/.local/share/taskclf/ |
| 4 | Windows default | %LOCALAPPDATA%/taskclf/ |
Directory layout¶
<TASKCLF_HOME>/
├── data/
│ ├── raw/aw/
│ └── processed/
├── models/
├── artifacts/
│ └── telemetry/
└── configs/
API reference¶
taskclf.core.paths
¶
Platform-aware base directory resolution for taskclf.
Provides :func:taskclf_home which resolves the root data directory
using the following precedence:
TASKCLF_HOMEenvironment variable (if set)~/Library/Application Support/taskclf/on macOS$XDG_DATA_HOME/taskclf/(or~/.local/share/taskclf/) on Linux%LOCALAPPDATA%/taskclf/on Windows
All DEFAULT_* path constants in :mod:taskclf.core.defaults are
derived from the value returned by this function.
logger = logging.getLogger(__name__)
module-attribute
¶
taskclf_home()
¶
Return the resolved base directory for all taskclf data.
The result is always an absolute :class:~pathlib.Path.
Source code in src/taskclf/core/paths.py
ensure_taskclf_dirs()
¶
Create the standard subdirectory tree under :func:taskclf_home.
Safe to call repeatedly — existing directories are left untouched. Returns the home path.