Skip to content

Commit 5023bab

Browse files
committed
Migrate explorer to streamlit
1 parent 2878d4e commit 5023bab

File tree

25 files changed

+763
-2402
lines changed

25 files changed

+763
-2402
lines changed

CHANGELOG.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Changelog
44
Development
55
***********
66

7+
- Migrate explorer to streamlit
8+
79
0.79.0 (21.03.2024)
810
*******************
911

README.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,12 @@ Features
122122
- Define general settings in Settings context
123123
- Command line interface
124124
- Web-API via FastAPI
125-
- Rich UI features like wetterdienst explorer and `streamlit app`_
125+
- Rich UI features like `wetterdienst explorer <https://wetterdienst.streamlit.app>`_
126126
- Run SQL queries on the results
127127
- Export results to databases and other data sinks
128128
- Public Docker image
129129
- Interpolation and Summary of station values
130130

131-
.. _streamlit app: https://wetterdienst.streamlit.app
132-
133131
Setup
134132
*****
135133

docs/img/wetterdienst_explorer.png

-1.39 MB
Loading

docs/usage/explorer.rst

Lines changed: 5 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,8 @@ Navigator for wetterdienst provided open data.
99
Introduction
1010
************
1111

12-
Welcome to Wetterdienst Explorer, your friendly web-based GUI for the
13-
Wetterdienst weather service library for Python. This web UI can easily be
14-
self-hosted.
15-
16-
The implementation is still in its infancy, so we are happy about further
17-
contributions.
18-
12+
Welcome to Wetterdienst Explorer, your friendly web-based GUI for the Wetterdienst library for Python. This web UI can
13+
easily be self-hosted. A hosted version is available `here <https://wetterdienst.streamlit.app/>`_.
1914

2015
Screenshot
2116
**********
@@ -31,10 +26,7 @@ Features
3126
Coverage
3227
========
3328

34-
Wetterdienst Explorer currently covers access to:
35-
36-
- Weather observation data from all providers that are implemented. Historical, recent and near real time.
37-
29+
Wetterdienst Explorer currently covers access to the entire Wetterdienst API. High resolution data may be slow to load.
3830

3931
Usage
4032
*****
@@ -51,33 +43,13 @@ Install Wetterdienst and invoke the user interface::
5143
wetterdienst explorer
5244

5345
# Navigate to web UI
54-
open http://localhost:7891
46+
open http://localhost:8501
5547

5648

5749
Invoke using Docker
5850
===================
5951

6052
Run the Wetterdienst user interface using Docker::
6153

62-
docker run -it --rm --publish=7891:7891 ghcr.io/earthobservations/wetterdienst wetterdienst explorer --listen 0.0.0.0:7891
63-
64-
65-
Serve Wetterdienst Explorer at non-root URL
66-
===========================================
67-
68-
If you are wrapping up Wetterdienst behind a reverse HTTP proxy, use the
69-
``DASH_URL_BASE_PATHNAME`` environment variable to configure the HTTP base URL
70-
the service is mounted on::
71-
72-
export DASH_URL_BASE_PATHNAME=/explorer/
73-
wetterdienst explorer --listen=localhost:8891
74-
75-
The gist of a corresponding Nginx configuration snippet is::
54+
docker run -it --rm --publish=7891:7891 ghcr.io/earthobservations/wetterdienst wetterdienst explorer --listen 0.0.0.0:8501
7655

77-
server {
78-
server_name wetterdienst.example.org;
79-
location ~ ^/explorer {
80-
proxy_set_header Host $host;
81-
proxy_pass http://localhost:8891;
82-
}
83-
}

docs/usage/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ Usage
1010
restapi
1111
explorer
1212
docker
13-
streamlit
1413
settings

docs/usage/streamlit.rst

Lines changed: 0 additions & 5 deletions
This file was deleted.

poetry.lock

Lines changed: 439 additions & 870 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,9 @@ tqdm = ">=4,<5"
127127
tzfpy = ">=0.15.2,<1"
128128

129129
crate = { version = ">=0.30.1,<1", optional = true } # Export feature.
130-
dash = { version = ">=2.10,<2.16", optional = true } # Explorer UI feature.
131-
dash-bootstrap-components = { version = ">=1.4,<2", optional = true } # Explorer UI feature.
132-
dash-leaflet = { version = ">=1.0.8,<2", optional = true } # Explorer UI feature.
133-
duckdb = { version = ">=0.9", optional = true } # Export feature.
130+
duckdb = { version = ">=0.9", optional = true } # Export feature, Explorer UI feature.
134131
eccodes = { version = ">=1.5.2,<1.7", optional = true }
135132
fastapi = { version = ">=0.95.1,<0.111", optional = true } # HTTP REST API feature.
136-
geojson = { version = ">=3,<4", optional = true } # Explorer UI feature.
137133
httpx = { version = ">=0.24,<0.28", optional = true}
138134
h5py = { version = ">=3.1,<4", optional = true } # Radar feature.
139135
influxdb = { version = ">=5.3,<6", optional = true } # Export feature.
@@ -148,7 +144,8 @@ psycopg2-binary = { version = ">=2.8,<3", optional = true } # E
148144
scipy = { version = ">=1.9,<1.13", optional = true } # Interpolation feature.
149145
shapely = { version = ">=2,<3", optional = true } # Interpolation feature.
150146
sqlalchemy = { version = ">=2,<2.1", optional = true } # Export feature.
151-
streamlit = { version = ">=1.27,<2", optional = true, markers = "python_version != '3.9.7'" } # Streamlit app
147+
statsmodels = { version = ">=0.14.1", optional = true } # Explorer UI feature.
148+
streamlit = { version = ">=1.27,<2", optional = true, markers = "python_version != '3.9.7'" } # Explorer UI feature.
152149
utm = { version = ">=0.7,<1", optional = true } # Interpolation feature.
153150
uvicorn = { version = ">=0.14,<1", optional = true } # HTTP REST API feature.
154151
wradlib = { version = ">=2.0.1,<3", optional = true } # Radar feature.
@@ -173,7 +170,6 @@ optional = true
173170

174171
[tool.poetry.group.test.dependencies]
175172
coverage = { version = ">=7.3,<8", extras = ["toml"] }
176-
dash = { version = ">=2.10,<2.16", extras = ["testing"] }
177173
dirty-equals = ">=0.5.0,<1"
178174
freezegun = ">=1.2,<2"
179175
h5py = { version = ">=3.1,<3.11", optional = true}
@@ -188,9 +184,7 @@ pytest-dictsdiff = ">=0.5,<0.6"
188184
pytest-notebook = ">=0.10"
189185
pytest-rerunfailures = "<14"
190186
pytest-xdist = ">=3,<4"
191-
selenium = ">=4,<5"
192187
surrogate = "==0.1"
193-
webdriver-manager = ">=4,<5"
194188

195189
[tool.poetry.group.docs]
196190
optional = true
@@ -213,7 +207,7 @@ cratedb = ["pandas", "crate"]
213207
duckdb = ["pandas", "duckdb"]
214208
eccodes = ["eccodes"]
215209
excel = ["xlsxwriter"]
216-
explorer = ["dash", "dash-bootstrap-components", "dash-leaflet", "geojson", "plotly"]
210+
explorer = ["duckdb", "statsmodels", "streamlit", "plotly"]
217211
export = ["pandas", "sqlalchemy", "xarray", "xlsxwriter", "zarr"]
218212
import = ["xlsx2csv"]
219213
influxdb = ["influxdb", "influxdb-client", "influxdb3-python"]
@@ -226,7 +220,6 @@ radar = ["h5py"]
226220
radarplus = ["pybufrkit", "wradlib", "xradar"]
227221
restapi = ["fastapi", "httpx", "uvicorn"]
228222
sql = ["duckdb"]
229-
streamlit = ["streamlit"]
230223

231224
[tool.poetry.scripts]
232225
wetterdienst = 'wetterdienst.ui.cli:cli'
@@ -290,7 +283,7 @@ unfixable = ["ERA", "F401", "F841", "T20", "ERA001"]
290283
"wetterdienst/ui/restapi.py" = ["B008", "UP007"]
291284

292285
[tool.pytest.ini_options]
293-
addopts = "-rsfEX -p pytester --strict-markers --verbosity=3 --webdriver=Firefox --headless"
286+
addopts = "-rsfEX -p pytester --strict-markers --verbosity=3"
294287
#log_cli = true
295288
#log_cli_level = "DEBUG"
296289
log_date_format = "%Y-%m-%dT%H:%M:%S"
@@ -350,7 +343,6 @@ coverage = "pytest --cov=wetterdienst"
350343
coverage-parallel = "pytest --cov=wetterdienst --numprocesses=auto -m 'not (explorer or cflake)'"
351344
update = "poetry update"
352345
citation = "python -m tools.citation"
353-
streamlit = "streamlit run ./wetterdienst/ui/streamlit/app.py"
354346

355347
[build-system]
356348
build-backend = "poetry.core.masonry.api"

tests/ui/explorer/__init__.py

Whitespace-only changes.

tests/ui/explorer/conftest.py

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)