From cb2122ed3a5c7cad923ebd8015dbdc478de099eb Mon Sep 17 00:00:00 2001 From: Shauna Date: Sat, 13 Sep 2014 13:40:08 -0400 Subject: [PATCH] Update README --- README.md | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fab5bf8..e67e395 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,10 @@ staying in touch 2. If someone says hello to the bot, the bot says hello back. 3. If someone asks the bot for information (via key phrases like "help", "faq", etc) the bot explains what it is and links to this repository. +The repository also contains test_bot.py, which is a set of automated tests for the bot. To learn more about these, see __Testing__ below. test_nicks.csv, which is the set of nicks used for the automated tests. + +There are also some miscellaneous files that you can ignore for now. We'll clean them up eventually. :) + ## Setting up To run the bot: @@ -27,9 +31,33 @@ To run the bot: If you run into setup difficulties, ping shauna on freenode (via the #openhatch channel is preferred) and/or leave an issue in this repository's issue tracker. +In order to keep the bot continuously running, we put it on a server using the following command: + +nohup python bot.py & + +[Nohup](http://en.wikipedia.org/wiki/Nohup) keeps it from terminating when we close the terminal and & keeps it from printing the IRC messages to the terminal. + +## Testing + +We use [Python unittest](https://docs.python.org/2/library/unittest.html) to test the bot, and [Coverage](http://nedbatchelder.com/code/coverage/) to look at the test coverage. + +When running tests, use this command: + +python -m unittest test_bot + +The output should tell you how many tests you ran and if any of them are failures. + +When creating tests, you can use the following series of commands to see whether your test is testing the code you want it to test: + + +./bin/coverage run test_bot.py + + +_Note_: You will likely need to install coverage. The above command assumes you have installed it to a virtual environment. If you haven't, the command to use is: coverage run test_bot.py + ## How to help -The [issue tracker](https://github.com/shaunagm/oh-irc-bot/issues?state=open) lists improvements we want to make. Please feel free to submit pull requests to address these issues. If you're not familiar with how to do this using github, see [here](https://openhatch.org/wiki/Git_Basics). You can also ask me for clarification (again, I am shauna on the #openhatch IRC.) +The [issue tracker](https://github.com/shaunagm/oh-irc-bot/issues?state=open) lists improvements we want to make. I strongly encourage you to contact me and say hello before you get started (I am shauna on the #openhatch IRC). Please feel free to submit pull requests to address these issues. If you're not familiar with how to do this using github, see [here](https://openhatch.org/wiki/Git_Basics). You can also always ask me for help or clarification. ## Credit