Migration to Events API#18
Conversation
App migration
| @@ -0,0 +1 @@ | |||
| worker: python run.py No newline at end of file | |||
There was a problem hiding this comment.
When we transition fully to pythonanywhere will need to remove this file.
|
|
||
|
|
||
|
|
||
| def get_table(table): |
There was a problem hiding this comment.
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.
| 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.
Should probably include an example file for this so if anybody wishes to use they understand what this file looks like.
| new_member(event_dict) | ||
|
|
||
|
|
||
| def help_menu_interaction(data: dict) -> None: |
There was a problem hiding this comment.
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.
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.
| 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.
Before we write more tests, I'd like to know what tests we need to write.
No description provided.