ir.config¶
Filesystem locations and process-wide defaults for ir.
ir separates three kinds of on-disk state, each under an XDG-standard base
(overridable per-install via IR_CONFIG_DIR / IR_DATA_DIR /
IR_CACHE_DIR, then XDG_CONFIG_HOME / XDG_DATA_HOME /
XDG_CACHE_HOME, then ~/.config / ~/.local/share / ~/.cache):
config (
~/.config/ir) — the named-corpus registry and user settings.data (
~/.local/share/ir) — durable corpus stores (record metadata, vectors, ledgers). The source of truth; losing it means rebuilding the index.cache (
~/.cache/ir) — regenerable derived data, chiefly the embedding cache keyed by(model, content_hash).
Every path is a plain Path created on demand, so callers can
treat the directories as guaranteed to exist.
Functions
Regenerable cache directory (default |
|
User configuration directory (default |
|
|
Durable directory holding one corpus's stores. |
|
Durable data directory (default |
|
Cache directory for one embedding model's vectors. |
Local list of repo paths never to index (default |
|
The patterns in |
|
JSON file mapping registered corpus names to their build settings. |
|
|
Filesystem-safe slug for a corpus/model identifier. |
- ir.config.embeddings_cache_dir(model_id)[source]¶
Cache directory for one embedding model’s vectors.
- Return type:
- ir.config.exclude_path()[source]¶
Local list of repo paths never to index (default
~/.config/ir/exclude).One
fnmatchpattern per line, matched against a repo’s path relative to the projects folder (q/some-private-repo,projects/*) or its absolute path; blank lines and#comments are ignored. It is per-machine config, never committed, so a private repo’s name stays out of any shared file.- Return type:
- ir.config.excluded_patterns()[source]¶
The patterns in
exclude_path(), or[]when the file is absent.