Skip to content

Commit

Permalink
restructure files
Browse files Browse the repository at this point in the history
  • Loading branch information
lingyielia committed Jul 16, 2024
1 parent 77e6903 commit 4b09fac
Show file tree
Hide file tree
Showing 16 changed files with 324 additions and 387 deletions.
24 changes: 24 additions & 0 deletions vizro-ai/src/vizro_ai/dashboard/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"""Define constants for the dashboard module."""

from typing import Literal

# For unsupported component and control types, how to handle them?
# option 1. Ignore silently
# option 2. Raise a warning and add the warning message into langgraph state. This gives the user transparency on why
# a certain component or control was not created.
# option 3. Raise a warning and suggest additional reference material
component_type = Literal[
"AgGrid", "Card", "Graph"
] # Complete list: ["AgGrid", "Button", "Card", "Container", "Graph", "Table", "Tabs"]
control_type = Literal["Filter"] # Complete list: ["Filter", "Parameter"]

# For other models, like ["Accordion", "NavBar"], how to handle them?


IMPORT_STATEMENTS = (
"import vizro.plotly.express as px\n"
"from vizro.models.types import capture\n"
"import plotly.graph_objects as go\n"
"from vizro.tables import dash_ag_grid\n"
"import vizro.models as vm\n"
)
12 changes: 5 additions & 7 deletions vizro-ai/src/vizro_ai/dashboard/graph/dashboard_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@
from langgraph.constants import END, Send
from langgraph.graph import StateGraph
from tqdm.auto import tqdm
from vizro_ai.dashboard.nodes._pydantic_output import _get_pydantic_output
from vizro_ai.dashboard.nodes.build import PageBuilder
from vizro_ai.dashboard.nodes.data_summary import DfInfo, _get_df_info, df_sum_prompt
from vizro_ai.dashboard.nodes.plan import (
DashboardPlanner,
PagePlanner,
)
from vizro_ai.dashboard._pydantic_output import _get_pydantic_output
from vizro_ai.dashboard.build.page import PageBuilder
from vizro_ai.dashboard.data_preprocess.df_info import DfInfo, _get_df_info, df_sum_prompt
from vizro_ai.dashboard.plan.dashboard import DashboardPlanner
from vizro_ai.dashboard.plan.page import PagePlanner
from vizro_ai.dashboard.utils import DfMetadata, MetadataContent, _execute_step

try:
Expand Down
109 changes: 0 additions & 109 deletions vizro-ai/src/vizro_ai/dashboard/nodes/build.py

This file was deleted.

Loading

0 comments on commit 4b09fac

Please sign in to comment.