Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wishlist: !!/test-scan or !!/scan-test - non-reporting test of a post #7235

Open
tripleee opened this issue Aug 23, 2022 · 3 comments
Open
Labels
status: confirmed Confirmed as something that needs working on.

Comments

@tripleee
Copy link
Member

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.

@priyankasaini69
Copy link

hola!
please add hacktoberfest tag in the "Labels".

@priyankasaini69
Copy link

I would love to contribute to this.

@tripleee
Copy link
Member Author

tripleee commented Oct 16, 2022

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).

@stale stale bot added the status: stale label Jun 18, 2023
@Spevacus Spevacus added status: confirmed Confirmed as something that needs working on. and removed status: stale labels Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: confirmed Confirmed as something that needs working on.
Development

No branches or pull requests

3 participants