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, DEFAULT_CONTROLLER_PORT, DEFAULT_DATA_PATH,
21    DdpConfig, LocalDevices, OutputConfig, PublishBlock, SpeedHint, SshConfig, TrainingConfig,
22    WorkerJoin, WorkerSource,
23};
24pub use command::{load_command, load_command_with_env};
25pub use loading::{
26    cluster_dispatch_enabled, config_layer_sources, find_config, find_config_in,
27    find_project_config, load_merged_value, load_project, load_project_with_env,
28    resolve_cluster_dispatch, resolve_config_layers,
29};
30pub use schema::{
31    ArgSpec, CommandConfig, CommandKind, CommandSpec, OptionSpec, ProjectConfig, Schema,
32    validate_schema,
33};
34pub use validation::{
35    ResolvedConfig, defaults_only, merge_preset, schema_to_args_spec, validate_preset_for_exec,
36    validate_preset_values, validate_presets_strict, validate_tail,
37};