Skip to content
This repository was archived by the owner on Sep 29, 2025. It is now read-only.

Commit ab099f9

Browse files
committed
chore(pems_streamlit): remove default placeholder app
1 parent 470e03f commit ab099f9

File tree

3 files changed

+1
-23
lines changed

3 files changed

+1
-23
lines changed
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
import streamlit as st
2-
3-
st.write("https://pems.dot.ca.gov")

pems_streamlit/src/pems_streamlit/utils.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ def _convert_to_pages(apps: list[Path]) -> list[StreamlitPage]:
1414
return list(map(_make_app_page, apps))
1515

1616

17-
def _default_app_page() -> StreamlitPage:
18-
return st.Page(APP_DIR / "__init__.py", default=True, title="PeMS Streamlit apps")
19-
20-
2117
def _discover_apps() -> list[Path]:
2218
logger.info("Beginning streamlit app discovery")
2319

@@ -51,8 +47,6 @@ def _make_app_page(app_path: Path) -> StreamlitPage:
5147

5248

5349
def discover_apps() -> list[StreamlitPage]:
54-
default_app_page = _default_app_page()
5550
apps = _discover_apps()
5651
pages = _convert_to_pages(apps)
57-
pages.insert(0, default_app_page)
5852
return pages

tests/pytest/pems_streamlit/test_utils.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from pathlib import Path
22

33
import pytest
4-
from streamlit.navigation.page import StreamlitPage
54

65
from pems_streamlit import utils
76

@@ -34,13 +33,6 @@ def test_convert_to_pages(mocker, app_paths):
3433
assert mocker.call(path) in page_factory.mock_calls
3534

3635

37-
def test_default_app_page():
38-
page = utils._default_app_page()
39-
40-
assert page._default
41-
assert page.url_path == ""
42-
43-
4436
def test__discover_apps(app_paths):
4537
discovered = utils._discover_apps()
4638

@@ -70,12 +62,7 @@ def test_discover_apps(mocker):
7062
mock_discover = mocker.patch("pems_streamlit.utils._discover_apps", return_value=[])
7163
mock_convert = mocker.patch("pems_streamlit.utils._convert_to_pages", return_value=[])
7264

73-
result = utils.discover_apps()
65+
utils.discover_apps()
7466

7567
mock_discover.assert_called_once()
7668
mock_convert.assert_called_once()
77-
78-
assert len(result) == 1
79-
page = result[0]
80-
assert isinstance(page, StreamlitPage)
81-
assert page._default

0 commit comments

Comments
 (0)