Skip to main content

flodl_cli/config/
mod.rs

1//! fdl.yaml configuration loading and discovery.
2//!
3//! Walks up from CWD to find the project manifest, parses YAML/JSON,
4//! and loads sub-command configs from registered command directories.
5//!
6//! The implementation is split across topic files; this `mod.rs`
7//! re-exports the public surface so external callers can continue
8//! using `crate::config::Type` paths unchanged.
9
10mod cluster;
11mod command;
12mod loading;
13mod schema;
14mod validation;
15
16#[cfg(test)]
17mod tests;
18
19pub use cluster::{
20    ClusterConfig, ClusterController, ClusterWorker, DdpConfig, LocalDevices, OutputConfig,
21    SpeedHint, SshConfig, TrainingConfig, DEFAULT_CONTROLLER_PORT, DEFAULT_DATA_PATH,
22};
23pub use command::{load_command, load_command_with_env};
24pub use loading::{
25    cluster_dispatch_enabled, config_layer_sources, find_config, find_config_in,
26    load_merged_value, load_project, load_project_with_env, resolve_cluster_dispatch,
27    resolve_config_layers,
28};
29pub use schema::{
30    validate_schema, ArgSpec, CommandConfig, CommandKind, CommandSpec, OptionSpec,
31    ProjectConfig, Schema,
32};
33pub use validation::{
34    defaults_only, merge_preset, schema_to_args_spec, validate_preset_for_exec,
35    validate_preset_values, validate_presets_strict, validate_tail, ResolvedConfig,
36};