File size: 896 Bytes
711bc31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
from typing import Callable, TypedDict, Optional
from plotly.graph_objects import Figure

class Plot(TypedDict):
    """Represents a plot configuration in the DRIAS system.
    
    This class defines the structure for configuring different types of plots
    that can be generated from climate data.
    
    Attributes:
        name (str): The name of the plot type
        description (str): A description of what the plot shows
        params (list[str]): List of required parameters for the plot
        plot_function (Callable[..., Callable[..., Figure]]): Function to generate the plot
        sql_query (Callable[..., str]): Function to generate the SQL query for the plot
    """
    name: str
    description: str
    params: list[str]
    plot_function: Callable[..., Callable[..., Figure]]
    sql_query: Callable[..., str]
    plot_information: Callable[..., str]
    short_name: str