gkunter / coquery

Coquery is a free corpus query tool for linguists, lexicographers, translators, and anybody who wishes to search and analyse a text corpus.
GNU General Public License v3.0
18 stars 4 forks source link

Filter dialog should validate filters before adding them #251

Closed gkunter closed 7 years ago

gkunter commented 7 years ago

Currently, the filter dialog allows adding filters that have illegal filter values.

Test case: Buckeye corpus, filed as query string, output column Transcript, function MATCH(Transcript, "AH"). A filter MATCH(Transcript, "AH") does not equal "AH" is illegal, because MATCH() is a boolean function that doesn't match "AH".

Type ValueError
Message Filter value has to be either 'yes' or 'no'

 classes.py, line 83: run
   app.py, line 1295: <lambda>
     session.py, line 359: aggregate_data
       managers.py, line 685: process
         managers.py, line 471: filter
           filters.py, line 177: apply
             filters.py, line 152: get_filter_string
               filters.py, line 99: fix
               > raise ValueError(S)
gkunter commented 7 years ago

Fixed – the filter dialog now includes type checking.