This replaces one case where the base ZulipError was raised, and another
where the original exception was re-raised.
This method, and so all API calls, should now only fail via raising this
Exception or by a non-'success' result in the return value dict; this
should avoid leaking any implementation detail and clarify expectations
in user code.
Since the botserver can be run directly after installation via pip,
and only supports Python 3, we definitely want the explicit shebang
lines there.
We only don't want this in zulip/, which supports Python 2+3.
Specify a version for Chessbot so that it will continue to function
properly if the library is updated. Also, update `test-bots` to remove
a temporary fix for Chessbot.
This will make it easier to run standalone
bots in containers like Heroku that prefer
env-var-style configuration.
For now this is undocumented, but we should
update the server docs once a few folks have
tried it out.
(The history behind requiring the config file
is that I wanted to keep things simple and
be strongly opinionated about how you run
bots, so that the docs didn't overwhelm folks,
but this use case has come up more frequently.)
It's important to run these tests if you're modifying
the bot library itself. The tests are really fast,
so there's no harm in regular users running them, so
they get a sanity check that the libraries themselves
are stable.
Previous tuple generation logic was throwing an error parsing version like 3.6.7rc1
because micro-versions (like '7rc1') cannot be converted into an integer.
Fixes#482.
A few users have complained about how hard it is to find the
Trello script on their systems after installing the `zulip`
package. Rishi and I decided that we should instead just ask
the users to download the script directly and run it without
having to install the `zulip` package.
This commit also ensures that the script can be run on both
py2 and py3.
The information logged to the CSV file is largely redundant, since
the ID of the webhook is already printed to the screen once a
webhook is setup correctly.
Since this is a script that the user is required to run
once, we should minimize its reliance on external files as much
as possible. This makes it easier to run the script when one
is SSH-ing into a server and doesn't really care about where
the script lives, for instance.