File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
pems_streamlit/src/pems_streamlit/apps/stations Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 3
3
import pandas as pd
4
4
import streamlit as st
5
5
6
- from pems_data .sources .s3 import S3DataSource
7
- from pems_data .services .stations import StationsService
6
+ from pems_data import ServiceFactory
8
7
9
- BUCKET = S3DataSource ()
10
- STATIONS = StationsService (data_source = BUCKET )
8
+ FACTORY = ServiceFactory ()
9
+ STATIONS = FACTORY .stations_service ()
10
+ S3 = FACTORY .s3_source
11
11
12
12
13
13
@st .cache_data (ttl = 3600 ) # Cache for 1 hour
@@ -28,7 +28,7 @@ def get_available_days() -> set:
28
28
def match (m : re .Match ):
29
29
return int (m .group (1 ))
30
30
31
- return BUCKET .get_prefixes (pattern , initial_prefix = STATIONS .imputation_detector_agg_5min , match_func = match )
31
+ return S3 .get_prefixes (pattern , initial_prefix = STATIONS .imputation_detector_agg_5min , match_func = match )
32
32
33
33
34
34
@st .cache_data (ttl = 300 ) # Cache for 5 minutes
You can’t perform that action at this time.
0 commit comments