Commit graph

35 commits

Author SHA1 Message Date
Tim Abbott ed774fafcb provision: Fix usage to not have line-wrapping issues. 2017-08-24 12:38:14 -07:00
derAnfaenger 0984eae9b5 provision: Rewrite in Python. 2017-08-24 12:32:55 -07:00
derAnfaenger 735943379f provision: Add option to specify python version. 2017-08-22 11:39:11 -07:00
derAnfaenger a4d6c4700f provision: Refactor script variables and Windows support. 2017-08-22 11:39:11 -07:00
derAnfaenger 095cea7ab9 codecov: Document line capture issue in code. 2017-08-22 11:42:57 +02:00
derAnfaenger a5708e4dde testing: Add code test coverage reporting.
Fixes #38.
2017-08-21 15:03:47 -07:00
derAnfaenger 95021ebd56 testing: Add script for executing zulip_botserver tests. 2017-08-21 15:03:47 -07:00
derAnfaenger f5d01826f2 travis: Split test jobs into two files. 2017-08-21 15:03:47 -07:00
Tim Abbott 0eecf05226 provision: Fix detection of Windows. 2017-08-17 10:47:49 -07:00
Tim Abbott 2f7968e860 provision: Use 'cp -a' for copying requirements.txt.
It's generally best to preserve the metadata when copying files.
2017-08-17 10:47:00 -07:00
Tim Abbott 5e4c65f325 provision: Print out the command needed to activate venv. 2017-08-17 10:46:36 -07:00
Tim Abbott a744fd9316 provision: Fix shell quoting and whitespace. 2017-08-17 10:43:50 -07:00
Rohitt Vashishtha 3b95af3b63 tools: Add virtual-env path exception for CygWin. 2017-08-17 10:43:50 -07:00
Rohitt Vashishtha 4cd580d4fe tools: Diff with requirements.txt in tools/provision. 2017-08-17 10:43:50 -07:00
Eeshan Garg f9655266df python-zulip-api: Add tools/provision for setting up dev env. 2017-08-17 10:39:00 -07:00
derAnfaenger e4c34d77e7 packaging: Automatically generate zulip_bots MANIFEST.in.
Fixes #69.
2017-08-17 10:09:24 -07:00
derAnfaenger e1d1c490c8 Split too long line in server_lib/README.md. 2017-08-17 10:06:31 -07:00
derAnfaenger 14ebc24f59 travis: Move linter to a separate job. 2017-08-17 10:06:31 -07:00
Eeshan Garg c61d413f25 zulip_bots: Remove thesaurus bot.
This bot depends on PyDictionary, which isn't very well-implemented
or well-maintained. PyDictionary's dependency on goslate and
goslate's dependency on concurrent.futures has been known to cause
problems in Python 3 virtualenvs. This bot has also been the
source of disruptive BeautifulSoup warnings. Since this bot is only
meant to be an example bot, and for all the above reasons,
it makes sense to remove this bot. The cons of debugging the above
issues outweight the pros of having the bot at all.
2017-08-16 16:54:24 -07:00
derAnfaenger bcc1489bc5 testing: Make linter fail with exit code if any check fails. 2017-08-16 07:46:09 -07:00
Eeshan Garg a28fcbbaa9 zulip_bots: Add script to generate zulip_bots/MANIFEST.in.
As a package maintainer, I have to exclude the test fixtures in
MANIFEST.in so that they aren't shipped with the package release.
But for the repo, we need to include fixtures, logos and docs so
that Travis can run the tests after running
`pip install ./zulip_bots`.

Also, since we are installing zulip_bots off of this repo in our
main repo, docs and logos should be included so that they can be
rendered alongside our webhooks/integrations documentation, so we
need to include them in MANIFEST.in as well.

To automate this process, I just wrote this handy little script
that future bot contributors can run instead of having to manually
specify what to include in MANIFEST.in in the repo.
2017-08-15 19:30:13 -07:00
Eeshan Garg d63269ee6a zulip_bots: Rename bots/{bot}/readme.md -> bots/{bot}/doc.md.
doc.md better describes the style of documentation that will live
inside these files, since we want these to be similar to our
webhooks' doc.md files in terms of how these are rendered and
composed of Markdown macros.
2017-08-15 19:30:13 -07:00
derAnfaenger f0e00ce971 bot tests: Make test-bots fail with proper exit code.
Fixes #45.
2017-08-15 10:46:07 -07:00
derAnfaenger 0dfb405748 linter: Add open() call restriction for the john bot. 2017-07-27 10:35:31 -07:00
derAnfaenger 5dd359fd4d testing: Properly exclude files for linting in Windows.
For files to be excluded in Windows, their paths have to
be normalized, so that the string matching works.
2017-07-25 10:55:49 -07:00
derAnfaenger 428ded449e testing: Add custom linter rules. 2017-07-25 10:55:49 -07:00
Eeshan Garg d181d0192e zulip_bots: Use relative paths to find zulip_bots/bots/*. 2017-07-25 10:50:33 -07:00
Eeshan Garg 472c869efa test-bots: Load and discover unit tests from specific modules.
Instead of discovering unit tests using loader.discover() by passing
it a set of starting and top level directories, we now discover
unit tests by loading them from specific test module objects. This
makes it easier to include and exclude specific bots from testing.
2017-07-25 10:50:33 -07:00
Eeshan Garg 3d0f7955b6 api: Move the API package to a dedicated subdirectory.
In order to keep all three packages (zulip, zulip_bots,
zulip_botserver) in the same repo, all package files must now
be nested one level deeper.

For instance, python-zulip-api/zulip_bots/zulip_bots/bots/, instead
of python-zulip-api/zulip_bots/bots/.
2017-07-18 02:20:32 -02:30
Eeshan Garg 879f44ab3a bots: Move all bots and the bots API to separate package. 2017-07-18 02:20:27 -02:30
Rohitt Vashishtha 1c8d359546 tools: Add pep8 linter.
This commit adds the tools/lint script to run the pep8 linter
as well as modifies .travis.yml to run the linter in Travis.
2017-07-06 19:58:50 -04:00
Rohitt Vashishtha c1275fded6 tools: Add README.md file to explain this directory.
tools/server_lib contains files copied as-is, or with minor
modifications, from the zulip/zulip repository when the api
code was split into this separate repository.
2017-07-06 19:58:50 -04:00
Rohitt Vashishtha 677ff7f0ae tools: Modify pep8.py from zulip server. 2017-07-06 19:58:50 -04:00
Rohitt Vashishtha 35bcabd157 tools: Copy lister.py from zulip server. 2017-07-06 19:58:50 -04:00
Rohitt Vashishtha 5a2412a60b tools: Copy printer.py from zulip server. 2017-07-06 19:58:50 -04:00