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

Hackathon project #37

Open
wants to merge 176 commits into
base: master
Choose a base branch
from
Open

Hackathon project #37

wants to merge 176 commits into from

Conversation

mgyucht
Copy link
Collaborator

@mgyucht mgyucht commented Dec 27, 2015

Yo @brandonshin, so I made a buttload of changes to get this thing to work in a slightly more modular way. I'm thinking that I'd be willing to take over the slackbot workout project if you feel like you don't want to maintain it anymore, since I'll probably be tinkering with it bit by bit and would be interested in keeping it up to date.

The big changes are that the different functional elements have been separated into different modules. Some new functionality has been added as well:

  • There's no need for the URL token, you can just use the user token to communicate with the slack channel. This token can be taken from the environment or hard-coded into the file.
  • There are a bunch of ways of logging exercises now, including using standard out and writing to a postgres database. This is useful for me since at my company we wanted to have a small dashboard showing people's participation, and it is easy to collect that from a database.
  • There's now a UserManager which is the main interface to the bot for looking up the users on a channel and seeing if they are active.
  • I got rid of the user cache since it doesn't really save all that much time, as you're still getting all of the information about users each iteration anyways, and past exercises are being logged.
  • The algorithm for selecting a user and the next exercise time is quite a bit different. The time is adaptive based on the number of users and the number of exercises they've done. When I used your version at work, we ran into an issue where if there were only one or two people on the channel, they would get blasted with exercises. This imposes a max cap on exercises so that doesn't happen. In the future per-user limits would be great!
  • This PR also adds a webserver which allows the bot to use outgoing webhooks to respond to messages from the channel. this lets people query the bot during the day and ask how people have been performing over the course of the day.
  • The setup.py file adds the ability to make wheels and upload them to PyPI.

@octosteve
Copy link

@mgyucht Any chance some of those fixes can get merged in?

@mgyucht
Copy link
Collaborator Author

mgyucht commented Jan 22, 2016

Yeah, so I guess I'd defer to @brandonshin on this. I've kind of taken this
project in my own direction, but if you guys like what I've done with it,
I'd be willing to merge my work into this repository as well.

On Thu, Jan 21, 2016, 3:42 PM Steven Nunez notifications@github.com wrote:

@mgyucht https://github.com/mgyucht Any chance some of those fixes can
get merged in?


Reply to this email directly or view it on GitHub
#37 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants