Skip to content

Commit ec5a813

Browse files
committed
Add module-level docstrings to dashboard components and routes for improved documentation and clarity
1 parent 14e541d commit ec5a813

File tree

20 files changed

+131
-7
lines changed

20 files changed

+131
-7
lines changed

dashboard/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,12 @@
22

33
- [`app.py`](app.py): [FastHTML](https://fastht.ml/) dashboard for the project (WIP).
44
- [`charts.py`](charts.py): Chart manager for the dashboard.
5-
- [`components.py`](components.py): Components for the dashboard.
5+
- [`components/`](components/): Components for the dashboard.
66
- [`constants.py`](constants.py): Constants for the dashboard.
77
- [`data.py`](data.py): Data manager for the dashboard.
8-
- [`routes.py`](routes.py): Routes for the dashboard.
8+
- [`routes/`](routes/): Routes for the dashboard.
9+
- [`batch_stats.py`](batch_stats.py): Batch stats for the dashboard.
10+
- [`static/`](static/): Static files for the dashboard.
911
- [`state.py`](state.py): State manager for the dashboard.
1012
- [`utils.py`](utils.py): Utility functions for the dashboard.
1113

dashboard/app.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""
2+
dashboard/app.py
3+
24
Anomstack Dashboard
35
46
This is a dashboard for the Anomstack project. It is a web application that allows you to view and analyze metrics from the Anomstack project.

dashboard/batch_stats.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
"""
2+
dashboard/batch_stats.py
3+
4+
Batch Stats
5+
6+
This module contains functions for calculating statistics for a batch of metrics.
7+
8+
"""
9+
110
from datetime import datetime, timezone
211
import pandas as pd
312
from typing import Dict, Any

dashboard/charts.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
"""
2+
dashboard/charts.py
3+
24
Chart manager for the dashboard.
5+
6+
This module contains the ChartManager class, which is responsible for creating charts for the dashboard.
7+
38
"""
49

510
from fasthtml.common import *

dashboard/components/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
"""
2+
dashboard/components/__init__.py
3+
24
Components module initialization.
5+
6+
This module contains the components for the dashboard.
7+
38
"""
9+
410
from .toolbar import create_toolbar_buttons
511
from .search import create_search_form, create_last_n_form
612
from .batch import create_batch_card
@@ -16,4 +22,4 @@
1622
'create_settings_dropdown',
1723
'create_header',
1824
'create_controls',
19-
]
25+
]

dashboard/components/batch.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
"""
2+
dashboard/components/batch.py
3+
24
Batch-related components.
5+
6+
This module contains the components for the batch view.
7+
38
"""
9+
410
from fasthtml.common import *
511
from monsterui.all import *
612
from dashboard.state import get_state

dashboard/components/common.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
"""
2+
dashboard/components/common.py
3+
24
Common components shared across the dashboard.
5+
6+
This module contains the common components for the dashboard.
7+
38
"""
9+
410
from fasthtml.common import *
511
from monsterui.all import *
612
from .search import create_search_form, create_last_n_form
713
from .toolbar import create_toolbar_buttons
814

15+
916
def create_controls(batch_name: str) -> Card:
1017
"""Create the main controls for the dashboard."""
1118
return Card(

dashboard/components/header.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
"""
2+
dashboard/components/header.py
3+
24
Header components.
5+
6+
This module contains the components for the dashboard header.
7+
38
"""
9+
410
from fasthtml.common import *
511
from monsterui.all import *
612

dashboard/components/search.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
"""
2+
dashboard/components/search.py
3+
24
Search and filtering components.
5+
6+
This module contains the components for the search and filtering functionality.
7+
38
"""
9+
410
from fasthtml.common import *
511
from monsterui.all import *
612
from dashboard.app import app

dashboard/components/settings.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
"""
2+
dashboard/components/settings.py
3+
24
Settings-related components.
5+
6+
This module contains the components for the settings dropdown menu.
7+
38
"""
9+
410
from fasthtml.common import *
511
from monsterui.all import *
612
from dashboard.state import get_state

0 commit comments

Comments
 (0)