Setup gitlint for developers to write well formatted
commit messages.
Note: .gitlint, gitlint-rules.py and lint-commits
are taken directly from zulip/zulip with minor changes.
- Replace virtualenv with python 3's native venv feature. The venv used is native to
python3.5+, so there's no need for a separate dependency.
- Remove redundant activation script. An activation script is required
to use the pip and python in the virtual environment, but because we're
calling the pip inside the venv, we don't need one.
Fixes#625.
Flake8 combines pycodestyle with pyflakes and automatically gives us
support for noqa comments, parallelism, configuration files, plugins,
and easy editor integration.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
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.
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 previous style was causing duplicate tests for the dropbox_share bot
for the unittest runner, due to globbing of test_*.py giving duplicates.
However, it also avoids unintentional duplication of bot names to test
on the command line being tested multiple times, though again only with
the unittest runner.
* Add pytest to requirements.txt
* Add pass-through option to run pytest in verbose mode
* Use various default pytest options
* Exclude merels bot for now
Previously the test-bots script filtered out base-class tests from
BotTestCase. With this change, BotTestCase continues to inherit from
unittest.TestCase, but the default test_* methods previously in this
class are now in a new DefaultTests class, which does not. Instead, each
bot needs to inherit from BotTestCase and DefaultTests *explicitly*.
This avoids the need to filter out the base-class tests, which
simplifies the test-bots script, and may ease any migration to eg.
pytest.
The DefaultTests class does require some non-implemented methods which
BotTestCase provides.
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.