Skip to content

Latest commit

 

History

History
80 lines (64 loc) · 4.3 KB

Hand_Off_Lab39_for_HRF.MD

File metadata and controls

80 lines (64 loc) · 4.3 KB

From Lab 39 to HRF Brief Documentation of Remaining Issues

Highlight Feature Yet to Implement:

  1. A display on the Front End for all content provided by the /approval_reconciliation/ end point, which is currently a functional end-point unconnected to the front end. The corresponding function in the DS codebase is most likely the to_approve function in main.py.

Impact Assessment:

If the feature works as expected, the new feature may ameliorate issue number one to a great extent.




Where Are the Potentially Useful Codes?

Please check archive.py




Issues with the Current Version of the Codebase:

  1. Multiple tweets entries in the database may have the same incident ID

The current codebase may allow the option to send the tweet with the form so that many may provide the missing information regarding the incident. This means that we may have multiple input for the same incident ID, which would in turn populate the database as separate, stand-alone entries.

Ideal Goal:

a. One entry per incident ID, and another feature yet to be built would display all related tweets.

Possible Solution:

a. Look at #1 of Highlight Feature Yet to Implement b. Alter the approve function accordingly after adjusting the Backend or DS code.



  1. The reply must be by clicking the meta-data button in the DM (direct message), the app cannot process text information

Currently, our DM message does not specify to reply only by clicking the meta-data button generated by Twitter.

Possible Solutions Include:

a. Change the message in the codebase (twitter.py); and/or
b. Modify the process_dms function in twitter.py, which needs additional command to check none-metadata input. The goal should be that if there is no metadata, the app would send another message to remind the user to use the metadata button.



  1. Twitter Bot may need a name change and/or a new account, and a new welcome message function.

Twitter Bot Name:

Twitter bot has an environmental variable as its name currently not used in the code; it was intended to be the name during a real conversation. However, we never reach that stage.

Possible Solutions Include:

a. Change the environmental variable when it is necessary.

New Twitter Account and Welcome Function:

Currently, BloomTech's Twitter account was opened by a student. Should HRF not want to continue with the current account, HRF may need to consider opening a business/enterprise account on twitter.

Possible Solutions Include:

a. In conjunction with the new account, HRF may have to use its new credential to create new environmental variables to activate the welcome message function in twitter.py. The function would return a welcome message id and place that id, which is tied to the account, in bot.py, as it is in the codebase.



  1. HRF will need to determine the frequency of database refreshing

The advance_all end point would refresh the etnry of the status of each conversation in the conversations table. As is, advance_all call is not automated, because @app.on_event("startup") command was never placed above line 177 in main.py.

Possible Solutions Include:

@app.on_event("startup") needs to be added one line above the top of the advance_all function; namely, above the current line 177 in main.py.




Input for Testing the API to Send Forms Out

Input

End point form-out would send the forms out. Form 0 is a tweet, from 1 is a direct message. Below is a sample of input for the form-out end-point input

{ "form": 1, "incident_id": 0000 (number of your choice), "link": "https://twitter.com/(twitter user name)/status/(the id of the very tweet: 0000000000000000000)", "tweet_id": "(the id of the very tweet: 0000000000000000000 in one string)", "user_name": "(twitter user name in one string)" }

Ohter Testing Caveat

In HRF Twitter Account

Please make sure that you, on behalf of HRF, have left all conversation in DM and deleted all response tweets to the designated person or test object (in this case, most likely the personal account of the data science person conducting the test).

In Amazon Web Services

Please make sure that you have deleted all previous test entries of the same incident_id.