Skip to content

Commit 186b4c2

Browse files
committed
save progress
1 parent 17846b2 commit 186b4c2

File tree

6 files changed

+1013
-169
lines changed

6 files changed

+1013
-169
lines changed

src/data_designer/cli/commands/list.py

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@
77
from rich.table import Table
88
import typer
99

10-
from data_designer.cli.ui import console, print_error, print_header, print_info, print_warning
10+
from data_designer.cli.ui import (
11+
console,
12+
print_error,
13+
print_header,
14+
print_info,
15+
print_success,
16+
print_warning,
17+
)
1118
from data_designer.cli.utils import get_default_config_dir, get_model_config_path, get_model_provider_path
1219
from data_designer.config.errors import InvalidConfigError, InvalidFileFormatError, InvalidFilePathError
1320
from data_designer.config.models import ModelConfig
@@ -27,7 +34,7 @@ def list_command(
2734
config_path = get_default_config_dir()
2835

2936
if not output_json:
30-
print_header("Data Designer Configuration")
37+
print_header("Data Designer Configurations")
3138
print_info(f"Configuration directory: {config_path}")
3239
console.print()
3340

@@ -51,9 +58,7 @@ def list_command(
5158
# Display summary
5259
console.print()
5360
if providers_data or models_data:
54-
print_info("Configuration loaded successfully")
55-
else:
56-
print_warning("No configuration files found. Run 'data-designer config' to see available commands.")
61+
print_success("Configuration loaded successfully")
5762

5863

5964
def load_providers(provider_path: Path, as_json: bool) -> dict | None:
@@ -122,10 +127,13 @@ def load_providers(provider_path: Path, as_json: bool) -> dict | None:
122127

123128
except InvalidFilePathError:
124129
if not as_json:
125-
print_warning(f"Provider configuration not found: {provider_path}")
126-
print_info("Run 'data-designer config providers' to create it")
130+
print_warning("Providers have not been configured. Run 'data-designer config providers' to configure them.")
127131
console.print()
128-
return {"file": str(provider_path), "valid": False, "error": "File not found"} if as_json else None
132+
return (
133+
{"file": str(provider_path), "valid": False, "error": "Providers have not been configured"}
134+
if as_json
135+
else None
136+
)
129137

130138
except (InvalidFileFormatError, InvalidConfigError) as e:
131139
if not as_json:
@@ -219,10 +227,11 @@ def load_models(model_path: Path, as_json: bool) -> dict | None:
219227

220228
except InvalidFilePathError:
221229
if not as_json:
222-
print_warning(f"Model configuration not found: {model_path}")
223-
print_info("Run 'data-designer config models' to create it")
230+
print_warning("Models have not been configured. Run 'data-designer config models' to configure them.")
224231
console.print()
225-
return {"file": str(model_path), "valid": False, "error": "File not found"} if as_json else None
232+
return (
233+
{"file": str(model_path), "valid": False, "error": "Models have not been configured"} if as_json else None
234+
)
226235

227236
except (InvalidFileFormatError, InvalidConfigError) as e:
228237
if not as_json:

0 commit comments

Comments
 (0)