Skip to main content

Module layout

Module layout 

Source
Expand description

Where this CLI keeps its files, and where releases before the visdom naming kept them.

Everything new is written under .visdom/ (in a repository or workspace folder) and visdom/ (in the user’s config and state directories). The older .tracevault/ and tracevault/ locations are still read: each file is looked for in the new place first, then in the old one, so an installation made by an earlier release keeps working without a migration step. Nothing is moved on its own — an earlier tracevault still on PATH keeps finding its files — except by init, which carries the old files over (see commands::relocate).

Constants§

LEGACY_REPO_DIR
What REPO_DIR was called before.
LEGACY_TRACING_CONFIG
The tracing config’s file name in the legacy directories.
LEGACY_USER_DIR
What USER_DIR was called before.
REPO_DIR
The directory in a repository (or workspace folder).
TRACING_CONFIG
The tracing config’s file name. config.toml in the same directories is the visdom launcher’s own (agent, tracing mode, gateway).
USER_DIR
The directory under the user’s config and state directories.

Functions§

existing_or_new
new unless only legacy exists: the path to read, or to keep using for something that is already there.
existing_or_twin
path, or its legacy_twin when path does not exist and the twin does: the file to read.
existing_sessions_dirs
Every sessions directory under root that exists, the new one first.
existing_tracing_config
root’s tracing config to read: the new file, else the legacy one.
existing_user_tracing_config
The user’s tracing config to read under user_dir: tracing.toml, else the legacy directory’s config.toml.
has_repo_dir
Whether root holds this CLI’s directory under either name.
is_set_up
Whether root has been set up for tracing: a legacy .tracevault/, or a .visdom/ with more in it than the config.toml a team commits for the visdom launcher — a checkout that only carries that file has not been.
legacy_repo_dir
<root>/.tracevault.
legacy_sessions_dir
.tracevault/sessions under root.
legacy_sibling
The legacy directory beside a user-level directory: <base>/tracevault for <base>/visdom. None for a directory with another name (an injected one, as tests use), which has no legacy sibling.
legacy_tracing_config
root’s tracing config as an earlier release wrote it: .tracevault/config.toml.
legacy_twin
Where an earlier release would have kept the file or directory path: the same path with its .visdom component spelled .tracevault, or — for a file directly in a visdom user directory — the one in the tracevault directory beside it. None for a path that is in neither.
legacy_user_sessions_dir
The legacy state directory matching a user-level sessions directory: <state>/tracevault/sessions for <state>/visdom/sessions. None for a directory laid out differently (an injected one).
repo_dir
<root>/.visdom.
repo_path
rel inside root’s directory: under .visdom/ unless it exists only under .tracevault/.
session_dir
The directory of session id under root: .visdom/sessions/<id>, or the session’s .tracevault/sessions/<id> when an earlier release started it there — a session keeps one directory for its whole life.
session_dir_root
The project root a session directory (<root>/.visdom/sessions/<id>, or the legacy spelling) lives under. None when the layout does not match.
session_entries
Every entry of sessions_dir and of the legacy directory beside it.
sessions_dir
Where new sessions under root are kept: .visdom/sessions.
tracing_config
Where root’s tracing config is written: .visdom/tracing.toml.
user_dir_in
The user-level directory under base (a config or state directory).
user_path
name inside the user-level directory user_dir, or inside the legacy directory beside it when it exists only there.
user_path_renamed
name inside the user-level directory user_dir, or — when it exists only there — legacy_name inside the legacy directory beside it.
with_legacy_sessions
sessions_dir (a checkout’s .visdom/sessions) and, when there is one, the .tracevault/sessions beside it: every directory to scan for the checkout’s sessions. A directory laid out differently is scanned alone.