1
+ import contextlib
1
2
import csv
2
3
from enum import Enum
3
4
from pathlib import Path
@@ -79,8 +80,7 @@ def get_selected_backend_name():
79
80
return selected_backend_names
80
81
81
82
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 ):
84
84
selected_ops_categories = st .sidebar .multiselect (
85
85
'Operation category' ,
86
86
options = sorted (all_ops_categories ),
@@ -91,8 +91,10 @@ def get_selected_operation_categories():
91
91
return selected_ops_categories
92
92
93
93
94
+ all_ops_categories = {row ['OpCategory' ] for row in ops_data }
94
95
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 )
96
98
hide_supported_by_all_backends = st .sidebar .selectbox (
97
99
'Operation compatibility' ,
98
100
['Show all' , 'Show supported by all backends' , 'Hide supported by all backends' ],
@@ -108,6 +110,9 @@ def get_selected_operation_categories():
108
110
df = df .sort_index ()
109
111
110
112
# Show only selected operation
113
+ if not show_geospatial :
114
+ with contextlib .suppress (ValueError ):
115
+ current_ops_categories .remove ("geospatial" )
111
116
df = df [df ['OpCategory' ].isin (current_ops_categories )]
112
117
113
118
# Show only selected backend
0 commit comments