The `BotStorage` Protocol is created to add a common type to all
storage classes.
Note: Protocol is imported from `typing_extensions` as `typing`
doesn't provide Protocol for python <= 3.7.
A lot of these bot dependencies are pretty hefty and shouldn't be
installed as part of the zulip_bots package. So the installation of
these belongs in tools/provision, not in setup.py.
The pip documentation recommends calling pip using a subprocess, instead of
importing it and using it's internal API. The API of pip==10.0.0 is different
from that of older versions, and provisioning is broken with this version.
[pip docs]:
https://pip.pypa.io/en/stable/user_guide/#using-pip-from-your-programCloses#370
This commit removes generate_manifest.py and package data files
are now included using the package_data kwarg to setup().
This is because, in certain situations, MANIFEST.in is a bit
finicky. For instance installing a package using:
python setup.py install
doesn't include files specified in MANIFEST.in, while using
pip install ./zulip_bots
does. package_data doesn't pose this problem, ergo it's better
for us.
Users can get an issue from Jira Bot using it's key, and get a response
like the following:
Issue BOTS-13: Create Jira Bot
- Type: Task
- Creator: skunkmb
- Project: Bots
- Priority: Medium
- Status: To Do
Users can create or edit an issue with Jira Bot with its
- summary,
- project,
- type,
- description,
- assignee,
- priority,
- labels, and
- due date
Wit.ai Bot communicates with the Wit.ai API. It can be configured with
any Wit.ai token and allows for setting up a custom handler function to
handle Wit.ai responses.
This commit was originally from @fredfishgames, but it
needed a big rebase due to use letting it sit too long.
Also, we decided not to have shebangs at the top of test
files.
Chess Bot is a bot that allows you to play chess against either another
user or the computer. Use `start with other user` or
`start as <color> with computer` to start a game.
In order to play against a computer, `chess.conf` must be set with the
key `stockfish_location` set to the location of the Stockfish program on
this computer.
Use `bot_handler.storage` to preserve game state across messages.
(@showell also did minor work here to have the test use verify_dialog()
and have the bot respond to empty messages)