glotzerlab / signac-dashboard

Rapidly visualize signac projects through a customizable dashboard interface.
https://signac.io
BSD 3-Clause "New" or "Revised" License
16 stars 6 forks source link

Add a warning when capitalized booleans (improper JSON) appear in query #213

Closed cbkerr closed 7 months ago

cbkerr commented 8 months ago

The warning from signac.filterparse._cast is burried in the shell and automatically searching for capitalized boolean string is likely not the expected result.

Description

Make the feedback when searching for booleans in incorrect JSON more like signac find:

$ signac find a True
Did you mean true?
Interpreted filter arguments as '{"a": "True"}'.
image

Motivation and Context

You would have to look at the shell to see these messages about casting of True-->true.

They come from signac.filterparse._cast

127.0.0.1 - - [14/Feb/2024 09:25:36] "POST /login HTTP/1.1" 302 -
Did you mean true?
Did you mean false?
Interpreted filter arguments as '{"a": "True"}'

Related to https://github.com/glotzerlab/signac-docs/pull/199

Checklist:

codecov[bot] commented 8 months ago

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 69.55%. Comparing base (0a65622) to head (44ce715). Report is 5 commits behind head on main.

:exclamation: Current head 44ce715 differs from pull request most recent head 0be77c8. Consider uploading reports for the commit 0be77c8 to get more accurate results

Files Patch % Lines
signac_dashboard/dashboard.py 0.00% 3 Missing and 3 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #213 +/- ## ========================================== - Coverage 70.02% 69.55% -0.48% ========================================== Files 21 21 Lines 884 890 +6 Branches 159 162 +3 ========================================== Hits 619 619 - Misses 220 223 +3 - Partials 45 48 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.