[V3 Fuzzy search] fix several issues with this feature #1788

Merged
palmtree5 merged 9 commits from V3/bugfix/fix_fuzzy_cmd_search into V3/develop 2018-06-05 22:14:11 +02:00
palmtree5 commented 2018-06-03 05:25:37 +02:00 (Migrated from github.com)

Type

  • Bugfix
  • Enhancement
  • New feature

Description of the changes

This PR fixes several issues with the fuzzy command search functionality released in beta 15
Namely:

  • It can now be toggled (for the server by the server owner, and for DMs by the bot owner) (as requested in #1736)
  • It now doesn't try to suggest anything when a valid custom command or alias is run
  • It now checks that:
    • The user can run the suggested command and all parent commands of it
    • That the suggested command and all of its parents are not hidden
    • That the score for the match is >= 90
      Non-alphanumeric characters were already being replaced with whitespace by the default processor, which was leading to results that had a score of 0. With the score requirement, these won't display anymore.

The one thing that still needs to be done is something about the speedup extra, which is technically optional but I feel should be used if at all possible. I still need to look into how I'd want to handle this part of it, so don't merge this quite yet

### Type - [x] Bugfix - [x] Enhancement - [ ] New feature ### Description of the changes This PR fixes several issues with the fuzzy command search functionality released in beta 15 Namely: - It can now be toggled (for the server by the server owner, and for DMs by the bot owner) (as requested in #1736) - It now doesn't try to suggest anything when a valid custom command or alias is run - It now checks that: - The user can run the suggested command and all parent commands of it - That the suggested command and all of its parents are not hidden - That the score for the match is >= 90 Non-alphanumeric characters were already being replaced with whitespace by the default processor, which was leading to results that had a score of 0. With the score requirement, these won't display anymore. The one thing that still needs to be done is something about the `speedup` extra, which is technically optional but I feel should be used if at all possible. I still need to look into how I'd want to handle this part of it, so don't merge this quite yet
tekulvw (Migrated from github.com) reviewed 2018-06-03 05:25:37 +02:00
Tobotimus (Migrated from github.com) reviewed 2018-06-03 05:25:37 +02:00
palmtree5 commented 2018-06-03 06:42:22 +02:00 (Migrated from github.com)

I believe I have figured out a way of detecting compiler availability, however this will need testing on all platforms (to the point of literally pip installing this PR's branch).

I believe I have figured out a way of detecting compiler availability, however this will need testing on all platforms (to the point of literally `pip install`ing this PR's branch).
Eslyium commented 2018-06-03 18:58:39 +02:00 (Migrated from github.com)

Messed around with it for a good 15/20 minutes on a Ubuntu 16.04 server, I can say this is a whole lot better than what it was before in terms of searching and matching up with a command the user meant no issues so far.

Messed around with it for a good 15/20 minutes on a Ubuntu 16.04 server, I can say this is a whole lot better than what it was before in terms of searching and matching up with a command the user meant no issues so far.
mikeshardmind commented 2018-06-04 00:53:39 +02:00 (Migrated from github.com)

This seems to meet the stated goals, and I have not found any issues with it currently

This seems to meet the stated goals, and I have not found any issues with it currently
palmtree5 commented 2018-06-04 04:22:38 +02:00 (Migrated from github.com)

So we've now changed how we're handling compiler detection by using tempfile to create a file called dummy.c which is then compiled using distutils. If we can't compile that file for some reason, we'd drop fuzzywuzzy's extra

So we've now changed how we're handling compiler detection by using `tempfile` to create a file called `dummy.c` which is then compiled using `distutils`. If we can't compile that file for some reason, we'd drop `fuzzywuzzy`'s extra
Kowlin (Migrated from github.com) approved these changes 2018-06-05 22:01:42 +02:00
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot!1788
No description provided.