You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When you !!/scan a message, it will also be reported if it triggers a reason. If that's not what you want, there is no way really to test whether the post will trigger, short of copying it into a local JSON representation and testing locally (which is harder than it needs to be, because different parts of Smoke Detector look at different representations of posts).
Describe the solution you'd like
It would be nice if there was an option to !!/scan, like the opposite of !!/scan-force, where you only want to get a report of the result.
In some ways, this is also similar to the !!/test command, so I'm thinking there should probably be an alias with that prefix.
Describe alternatives you've considered
I wanted to test a new expression I watched, but as outlined above, the only way to really know if it works as intended is to scan an actual post which contains the target phrase. Similarly, the only way to check against false positives is to scan posts which are not supposed to match (typically then posts which exhibit a corner case which you want to test you have covered adequately).
You can add a test case to tests/test_findspam.py but this again hinges on getting the representation of the post right in the test case. If you guess wrong what the API actually returns for the post you are targeting, the test proves nothing.
Hello and welcome, @priyankasaini69! We will be happy to add #hacktoberfest-approved to any PR we accept during October. Maybe a WIP pull request would be a good start, to let us comment early on your approach. If you need help setting up a testing instance, probably approach us in the chat room (you'll need a bit of reputation on one of the Stack Exchange sites to be able to participate in chat, but you can achieve that over a few days by submitting good suggested edits to old posts).
Is your feature request related to a problem? Please describe.
When you
!!/scan
a message, it will also be reported if it triggers a reason. If that's not what you want, there is no way really to test whether the post will trigger, short of copying it into a local JSON representation and testing locally (which is harder than it needs to be, because different parts of Smoke Detector look at different representations of posts).Describe the solution you'd like
It would be nice if there was an option to
!!/scan
, like the opposite of!!/scan-force
, where you only want to get a report of the result.In some ways, this is also similar to the
!!/test
command, so I'm thinking there should probably be an alias with that prefix.Describe alternatives you've considered
I wanted to test a new expression I watched, but as outlined above, the only way to really know if it works as intended is to scan an actual post which contains the target phrase. Similarly, the only way to check against false positives is to scan posts which are not supposed to match (typically then posts which exhibit a corner case which you want to test you have covered adequately).
You can add a test case to
tests/test_findspam.py
but this again hinges on getting the representation of the post right in the test case. If you guess wrong what the API actually returns for the post you are targeting, the test proves nothing.Additional context
https://chat.stackexchange.com/transcript/message/61838114#61838114 where I rescanned the wrong post, adding insult to injury.
The text was updated successfully, but these errors were encountered: