Skip to content

spaceteams.path_utils

AssetPathAndCategory

AssetPathAndCategory(source_path_no_category: PathLike | str | bytes, category: AssetFileCategory)

category instance-attribute

category: AssetFileCategory

source_path_no_category property writable

source_path_no_category: Path

EnsureUserSpecificDirsExist

EnsureUserSpecificDirsExist() -> None

Ensure that the user-specific directories for assets, configs, output, etc exist.

GetFileCategoryOfAssetSource

GetFileCategoryOfAssetSource(source_path: PathLike | str | bytes) -> AssetPathAndCategory

GetLocalAssetsDir

GetLocalAssetsDir() -> pathlib.Path

Get user-modifiable assets directory. This is the default location for user-saved or user-downloaded assets.

GetLocalConfigDir

GetLocalConfigDir() -> pathlib.Path

Get per-user config directory. User settings files are typically saved here. Usually, you should not need to modify files here manually.

GetLocalLogsDir

GetLocalLogsDir() -> pathlib.Path

Get per-user logs directory. This is the default location for simulation log files from the "logger" AtomicLogger objects. User code may consider using GetLocalOutputDir() instead to ensure user-outputted files don't conflict with the automated logging.

GetLocalOutputDir

GetLocalOutputDir() -> pathlib.Path

Get per-user output directory. This is a good location for output files which need to be reused by another simulation.

GetRunLogsDirFromUUID

GetRunLogsDirFromUUID(sim_run_uuid: UUID) -> pathlib.Path | None

Get per-run logs directory from sim-run UUID. This is the directory for the sim's .log files. Returns None if the dir for the run UUID does not exist.

GetRunOutputDirFromUUID

GetRunOutputDirFromUUID(sim_run_uuid: UUID) -> pathlib.Path | None

Get per-run output directory from sim-run UUID. This is the directory for the sim's output files such as saved telemetry images, plots, etc. Returns None if the dir for the run UUID does not exist.

GetVersionInstallCacheDir

GetVersionInstallCacheDir() -> pathlib.Path

Get per-user version cache directory. This is used to store things like the spaceteams python virtual environment.

Internal_GetOrCreateRunOutputDirs

Internal_GetOrCreateRunOutputDirs(sim_run_uuid: UUID, run_name: str) -> pathlib.Path

Internal-use function to create the output dirs for a certain sim run UUID and name.