-
-
Notifications
You must be signed in to change notification settings - Fork 406
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
spellcheck: complete rewrite #1164
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the requirements referencing enchant
to demand aspell
instead. This includes requirements.txt
, contrib/rpm/sopel.spec.in
, & .travis.yml
.
Once the requirements are up to date, Travis can test the changes. And speaking of tests, module tests come from @example
decorations, which you removed in the rewrite. Please put them back so the test coverage is maintained. :)
bf9ac78
to
9d1200e
Compare
9d1200e
to
8f73ca4
Compare
@alanhuang122 When you next have time to do code-y stuff, rebasing this would be much appreciated! |
c3c4d88
to
440f4e5
Compare
@dgw Rebased. |
@alanhuang122 I got excited, but there's still a conflict. Did you pull master before rebasing? Also why did AppVeyor try to build this? I haven't set that up yet lmao |
440f4e5
to
53afcd2
Compare
Yeahhh let's try that again. For the record, I tried |
That'd do it. Self-assigned to kick the tires one last time before merging. :) |
Hmm… Upon kicking the tires, and looking over the code once more, I have a few questions.
|
Acknowledged, agreed, will implement. |
Re: 3: The way to remove words from the aspell dictionary is apparently just to go in and edit the file - there's no utility or function to do so from within aspell or the python bindings. Possible solutions:
The only one I don't really hate is #2. |
#1 is what this rewrite currently does, and we seem to agree that that isn't the solution. I don't like #3 either. Sopel shouldn't be messing with that file (or any file outside its home directory, ideally), and I have no idea if the location is predictable in all cases. What if Sopel is run as a system service user with no home directory, for example? Best to let aspell do its thing and butt out. So… yeah, #2 is the only not-awful way to handle aspell's missing functionality. What we'll end up with, as I understand it so far:
Sound right? Good? (Side rant: GitHub doesn't even allow |
PR showing as "Approved" in the list is confusing, because we are still awaiting promised changes.
@alanhuang122 Did you fall off the edge of the |
ea104ee
to
8e6532e
Compare
Implemented everything I asked for and more, since @alanhuang122 appears to have gone quiet. In my opinion, I added or rewrote too much of the code to be an objective reviewer any more, so this should get a look from @Exirel, @HumorBaby, @kwaaak, and/or anyone else who's contributed recently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few (minor) changes needed to ensure Python 2 support (since it is meant to be supported through this PR). One suggestion about the conversation flow.
- Modified command names to match pull request feedback - Adding a word now stages it in a temporary list instead of saving directly to aspell dictionary - Added new commands to manipulate pending word list (remove one item, clear all items, commit changes to aspell)
@dgw, A+ |
OK, now this is really "Done in Feature Rewrites" (project board status since November 2018, wow). |
I had experimented with this module a bit, and had found that I was completely unsatisfied with its performance (namely, the corrections it suggested). As a result, I rewrote the module to use aspell instead of pyenchant. The resulting performance satisfied me.