Paths
paths
¶
Resolution of the local store's directory, [STORE_DIRNAME][dstrack.paths.STORE_DIRNAME].
Mirrors how git resolves .git/: absent an explicit override, it is found by
walking up from the current directory until a STORE_DIRNAME/ directory turns up.
Functions:
| Name | Description |
|---|---|
resolve_store_root |
Resolve the path to the local store, [STORE_DIRNAME][dstrack.paths.STORE_DIRNAME]. |
resolve_store_root(root=None)
¶
Resolve the path to the local store, [STORE_DIRNAME][dstrack.paths.STORE_DIRNAME].
Checked in order, the first one available wins:
1. root, e.g. forwarded from a CLI --root option: the directory
STORE_DIRNAME/ lives (or will be created) in.
2. The DSTRACK_ROOT_PATH environment variable: same meaning as
root.
3. Walking upwards from the current working directory until a
STORE_DIRNAME/ directory is found, the same way git resolves .git/.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
Path | str | None
|
Explicit parent directory of |
None
|
Returns:
| Type | Description |
|---|---|
Path
|
The path to the |
Raises:
| Type | Description |
|---|---|
StoreNotFoundError
|
|