Skip to content

Commit 012da8c

Browse files
committed
docs: allow deselecting geospatial ops in backend support matrix
1 parent 9e61816 commit 012da8c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

docs/backends/app/backend_info_app.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import contextlib
12
import csv
23
from enum import Enum
34
from pathlib import Path
@@ -79,8 +80,7 @@ def get_selected_backend_name():
7980
return selected_backend_names
8081

8182

82-
def get_selected_operation_categories():
83-
all_ops_categories = {row['OpCategory'] for row in ops_data}
83+
def get_selected_operation_categories(all_ops_categories):
8484
selected_ops_categories = st.sidebar.multiselect(
8585
'Operation category',
8686
options=sorted(all_ops_categories),
@@ -91,8 +91,10 @@ def get_selected_operation_categories():
9191
return selected_ops_categories
9292

9393

94+
all_ops_categories = {row['OpCategory'] for row in ops_data}
9495
current_backend_names = get_selected_backend_name()
95-
current_ops_categories = get_selected_operation_categories()
96+
current_ops_categories = get_selected_operation_categories(all_ops_categories)
97+
show_geospatial = st.sidebar.checkbox('Include Geospatial ops', value=True)
9698
hide_supported_by_all_backends = st.sidebar.selectbox(
9799
'Operation compatibility',
98100
['Show all', 'Show supported by all backends', 'Hide supported by all backends'],
@@ -108,6 +110,9 @@ def get_selected_operation_categories():
108110
df = df.sort_index()
109111

110112
# Show only selected operation
113+
if not show_geospatial:
114+
with contextlib.suppress(ValueError):
115+
current_ops_categories.remove("geospatial")
111116
df = df[df['OpCategory'].isin(current_ops_categories)]
112117

113118
# Show only selected backend

0 commit comments

Comments
 (0)