Skip to content
This repository was archived by the owner on Jun 19, 2019. It is now read-only.

Migration to Events API #18

Merged
merged 16 commits into from
Dec 15, 2017
Merged

Conversation

AllenAnthes
Copy link
Member

No description provided.

@@ -0,0 +1 @@
worker: python run.py
Copy link
Member

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):
Copy link
Member

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
Copy link
Member

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:
Copy link
Member

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": [
Copy link
Member

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):
Copy link
Member

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.

@apex-omontgomery apex-omontgomery merged commit 78ae14a into OperationCode:master Dec 15, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants