Files
PointsBot/docs/TODO.md

93 lines
3.7 KiB
Markdown
Raw Normal View History

2020-02-05 08:38:50 -08:00
# TODO
2020-03-06 16:25:06 -08:00
File-specific lists are in loose descending order of priority.
2020-02-05 08:38:50 -08:00
## Current
2020-03-06 16:25:06 -08:00
n/a
2020-08-25 22:23:16 -07:00
## Bugs
* [ ] Users can get multiple points for same solution
- Scenario:
- OP comments !solved
- OP deletes !solved comment
- OP comments !solved again
- Hopefully this will be easily solved once db migrations are working
2020-02-05 08:38:50 -08:00
## General
2020-03-06 16:25:06 -08:00
* [ ] Notifications
* Let admins know if a comment can't be properly handled
* Email preferable; could do Reddit message, too
* Maybe have both and make into a config option
2020-02-05 08:38:50 -08:00
* [ ] Testing
2020-02-08 00:42:48 -08:00
- Any PRAW model that inherits from `praw.PRAWBase` has a `parse` method
2020-03-06 16:25:06 -08:00
that could perhaps be used to make fake objects for testing
2020-08-25 22:23:16 -07:00
- Add regression tests for comments, etc.?
2020-02-05 08:38:50 -08:00
* [ ] GUI
- [ ] Create a GUI for configuring and running the bot, and performing other jobs
like adding or subtracting points for specific redditors
- [ ] Check for updates in the Github repo and prompt user to update
- Github API overview:
- https://developer.github.com/v3/
- https://developer.github.com/v4/
2020-02-05 10:57:11 -08:00
- It turns out that v4 might only be possible with a Github user
account to authenticate with the API.
2020-02-05 08:38:50 -08:00
- Useful links:
- https://developer.github.com/v3/repos/branches/#get-branch
2020-02-05 10:57:11 -08:00
- https://developer.github.com/v3/repos/contents/#get-archive-link
2020-02-05 08:38:50 -08:00
- https://developer.github.com/v3/repos/commits/
- https://developer.github.com/v3/repos/releases/
- https://developer.github.com/v3/#timezones
2020-02-05 08:38:50 -08:00
- Webhooks:
- https://developer.github.com/webhooks/
2020-02-05 10:57:11 -08:00
- https://developer.github.com/v3/repos/hooks/
2020-02-05 08:38:50 -08:00
- https://developer.github.com/v3/activity/events/types/#pushevent
* [ ] Determine whether and how to check "![Ss]olved" comments have been later
edited to remove the "![Ss]olved" string, and whether and how to remove or
reassign points
- If so, it could do that daily or something.
- This will be especially important if a "recovery mode" is implemented that
crawls through the whole subreddit to rebuild the database, since the
bot would only be able to see comments that haven't been removed, or
the newest version of edited comments.
- This could also just be encouraged through sub rules; e.g. "don't mark as
solved until you've actually tried the proposed solution"
* [ ] As mentioned in the previous section, implement a recovery mode
2020-02-08 00:42:48 -08:00
## File-Specific
2020-02-05 08:38:50 -08:00
### bot.py
2020-08-25 22:23:16 -07:00
* [ ] (Maybe) sanitize input text?
2020-03-06 16:25:06 -08:00
* [ ] Now that the date of each solution is being stored, can check for missed
submissions each time the bot is run by searching subreddit history until
last solution found
2020-02-05 08:38:50 -08:00
* [ ] Allow mods and/or bot owner to add or remove points from specific users
* [ ] Make the algorithm for determining the problem solver more sophisticated
- e.g. check entire comment tree instead of just ignoring if the OP also
authored the parent comment
- Ask OP for clarification only if solver cannot be sufficiently determined
- Again, this behavior could also perhaps be better enforced through
subreddit rules rather than algorithmically
### config.py
2020-03-06 16:25:06 -08:00
* [ ] Add list of emails to which notifications should be sent
2020-02-05 10:39:05 -08:00
* [ ] Switch from `toml` package to `tomlkit` package
- Preserves style, comments, etc.
2020-02-05 08:38:50 -08:00
### database.py
2020-03-06 16:25:06 -08:00
* [ ] For each solved submission, store:
- submission id
- solution comment id
- solved comment id
- date
- solver id
2020-02-05 08:38:50 -08:00
* [ ] Possibly refactor for a datastore type thing instead of database
- Maybe even make models like Redditor to combine data storage/access with
logic, e.g. determining current level
2020-03-06 16:25:06 -08:00
- Seems like overkill, though