Skip to content
Thomas Manalil edited this page Jun 7, 2020 · 9 revisions

Welcome to the TwitterBot wiki!

Use

This bot generate a covid-19 death trend graph for a country.

Code

reply.py - start here.

covid_trend.api - generates reply to the tweet (calls other libraries listed below)

covid_api.py- api call to generate death trend data for country

chart_api.py - api call to Quick Chart to generate chart

twitter.py - twitter api call wrapper (uses tweepy)

Set up environment

Run pip install requirements.txt to install all required libraries.

Testing

  • Run python -m pytest -v to run all tests
  • Run coverage run --source=Bot -m pytest and then run coverage report to generate unit test code coverage report

Run Application

  1. Add twitter access tokens to Config\config.json
  2. Run python -m Bot.reply
  3. Verify log entries in Logs folder
Clone this wiki locally