Skip to content

Commit 6e6a05e

Browse files
committed
tidy
1 parent b867d97 commit 6e6a05e

File tree

5 files changed

+8
-18
lines changed

5 files changed

+8
-18
lines changed

vizro-ai/pyproject.toml

-3
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ branch = true
5454
parallel = true
5555
source_pkgs = ["vizro_ai"]
5656

57-
[tool.hatch.metadata]
58-
allow-direct-references = true # TODO: remove once we have a proper package
59-
6057
[tool.pytest.ini_options]
6158
filterwarnings = [
6259
"error",

vizro-ai/src/vizro_ai/plot/_response_models.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def __new__(
231231
validate_code: bool = True,
232232
chart_type_examples: Optional[list[str]] = None,
233233
) -> type[BaseChartPlan]:
234-
"""Creates a chart plan model with additional enrichments.
234+
"""Creates a chart plan model with additional enhancements.
235235
236236
Args:
237237
data_frame: DataFrame to use for validation.
@@ -240,15 +240,14 @@ def __new__(
240240
chart_type_examples: List of chart type examples.
241241
242242
Returns:
243-
Chart plan model with additional enrichments.
243+
Chart plan model with additional enhancements.
244244
"""
245245
examples = chart_type_examples or []
246246
description = f"""
247247
{chart_plan.model_fields["chart_type"].description}
248248
249-
The examples list shows commonly available chart types.
250-
If none of them match the user's request,
251-
you may choose a different chart type if it better suits the user's needs.
249+
Select the most appropriate chart type from the examples list based on the user's
250+
data and visualization needs. If no example chart matches their request, recommend a suitable alternative.
252251
"""
253252

254253
chart_type_field = Field(description=description, examples=examples)

vizro-ai/src/vizro_ai/utils/helper.py

+4-8
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,10 @@
99
# Dictionary of general best practices for chart creation
1010
GENERAL_CHART_BEST_PRACTICES = {
1111
"color_usage": """
12-
1. AVOID using hard-coded colors.
13-
2. AVOID using plotly color palettes, color scales, or color sequence
14-
15-
If you must use colors:
16-
Use the default Vizro color palette by accessing `fig.layout.template.layout.colorway`.
17-
18-
When to make exceptions:
19-
Only if it's suggested by the visual vocabulary or the user request.
12+
- Default Vizro colors apply automatically if no colors are specified
13+
- If custom colors are needed, select from Vizro palette via `fig.layout.template.layout.colorway`
14+
- No hard-coded colors, background colors, or plotly color palettes/scales/sequences
15+
- Exception: Only when visual vocabulary or user explicitly requests specific colors
2016
""",
2117
# "data_aggregation": "When using px.bar or px.line charts,
2218
# aggregate the data appropriately rather than plotting raw values.",

vizro-ai/tools/copy_visual_vocabulary.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python3
21
"""Copy the visual vocabulary JSON file from vizro-core to vizro-ai."""
32

43
import shutil

vizro-core/examples/visual-vocabulary/tools/generate_vivivo_json.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/usr/bin/env python3
21
"""Generate visual vocabulary JSON from vivivo directory."""
32

43
import importlib

0 commit comments

Comments
 (0)