-
Notifications
You must be signed in to change notification settings - Fork 9
Migration to Events API #18
Conversation
App migration
@@ -0,0 +1 @@ | |||
worker: python run.py |
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.
When we transition fully to pythonanywhere will need to remove this file.
|
||
|
||
|
||
def get_table(table): |
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.
Will probably want to segment items in this file from development use (pprint, get_table) and things that are permanent fixtures posting the response to airtable once we integrate this functionality with master branch.
import logging | ||
import time | ||
from slackclient import SlackClient | ||
from utils.log_manager import setup_logging | ||
from src.creds import TOKEN, PROXY | ||
from decouple import config |
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.
Should probably include an example file for this so if anybody wishes to use they understand what this file looks like.
event_dict['user'] = {'id': event_dict['user']} | ||
new_member(event_dict) | ||
|
||
|
||
def help_menu_interaction(data: dict) -> None: |
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.
Just a general comment. I think that naming this file app.py
is not correct now that we have so many moving parts. Usually that's what you name the flask handler. We should also start segmenting our files so that When we look at a file it's easier to understand what's going on.
I think a document that charts out the bot's flow from a new member event to the part where they stop interacting with the bot would be helpful.
"name": "skillset", | ||
"optional": "true", | ||
"placeholder": "Choose a service type", | ||
"options": [ |
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.
Lots of these things could be generalized by building the Json with a list of languages. And having a single create modal function call where we can insert the dictionary values.
@@ -4,7 +4,8 @@ | |||
import logging | |||
|
|||
from src import app | |||
from .test_data import * | |||
from src.messages import HELP_MENU, MESSAGE | |||
from .test_data import NEW_MEMBER, USER_INFO_HAS_REAL_NAME, USER_INFO_NO_NAME, USER_INFO_HAS_NAME | |||
|
|||
|
|||
class EventHandlerTestCase(unittest.TestCase): |
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.
Before we write more tests, I'd like to know what tests we need to write.
No description provided.