Commit graph

2156 commits

Author SHA1 Message Date
Tim Abbott 8148b580ca lint: Fix pep-8 rules on recently added files. 2016-12-27 20:16:23 -08:00
Rafid Aslam db39b52d3f interactive bots: Create xkcd bot. 2016-12-27 22:52:51 +01:00
Vamshi Balanaga 2a8c57d77a Modify GitHub Issue bot to use new authentication module. 2016-12-27 11:58:36 -08:00
Vamshi Balanaga da256ef854 Modify GitHub comment bot to use new authentication module, and edit documentation accordingly. 2016-12-27 11:58:36 -08:00
Vamshi Balanaga 69b324229c Create GitHub authentication module. 2016-12-27 11:58:36 -08:00
Rishi Gupta eb983e0bbc mypy: Convert api/ and docs/ to use typing.Text. 2016-12-26 16:11:37 -08:00
Rafid Aslam 5d05703482 interactive bots: Create Giphy bot 2016-12-26 09:38:50 -08:00
Rafid Aslam 8d35f25fd6 contrib_bots: Expose some information about user profile
- Expose some information about user profile in `RestrictedClient`
class, like `full_name` and `email` of the user.

- Add `client` argument to `triage_message()`, now it's possible to
call bot with another method instead of calling the specified
keyword.
2016-12-26 09:38:50 -08:00
Abhay Kashyap 6df2450b60 Created DefineBot and document and added them 2016-12-26 09:07:10 -08:00
Tommy Ip 5ef742638e interactive bots: Create Howdoi bot.
This bot allows users to search technical questions from Stack
Overflow.
2016-12-24 08:22:44 -08:00
Jackson a654ba51e1 interactive bots: Create CommuteBot. 2016-12-21 18:46:59 -08:00
Steve Howell 5ad39e3971 Remove mypy exemption for api/zulip/__init__.py.
This required instead exempting these files:

    bots/jabber_mirror_backend.py
    tools/deprecated/iframe-bot/show-last-messages

Turning on mypy for the API exposes issues in the annotations
of other files.
2016-12-21 11:22:42 -08:00
Steve Howell 14ee40bf52 Simplify, document, and fix the API code.
We used to create endpoints with Client._register.

Now we now have explicit methods for the endpoints.

This allows us to add docstrings and stricter mypy annotations.

This fix also introduces a call_endpoint() method that avoids
the need for manually building urls with API_VERSTRING when you
know the URL pattern of the endpoint you want to hit (and when
the API doesn't have a convenient wrapper).

I fixed a bug with create_users where it now uses PUT instead
of POST.

I also removed client.export(), which was just broken.

I had to change recent-messages and zulip-export, which were
using client.do_api_query and Client._register.

Now it's easier to just call client.call_endpoint() for
situations where our API doesn't have convenient wrappers,
so that's what I did with those scripts.
2016-12-21 11:22:42 -08:00
= 1b58c13d91 Interactive bots: Create Github Issues bot. 2016-12-19 21:57:21 -08:00
andrewallen00 e2ed990746 interactive bots: Create comment on issue GitHub bot.
interactive bots: Create comment on issue GitHub bot.

interactive bots: Create comment on issue GitHub bot.

interactive bots: Create comment on issue GitHub bot.

interactive bots: Create comment on issue GitHub bot.
2016-12-17 16:33:08 -08:00
Tim Abbott 42eaabf203 bots: Remove obsolete tddium-notify-humbug. 2016-12-15 12:16:26 -08:00
Tim Abbott ca12fd8009 bots: Remove old zulip.com configuration files. 2016-12-15 09:39:32 -08:00
Tim Abbott b7f29327b6 api: remove use of zulip.com domain in API bindings. 2016-12-15 09:35:37 -08:00
Rafid Aslam 746d9d2b6b contrib_bots: Allow to import code from subdirectory of lib
Allow to import code from subdirectory of `contrib_bots/lib`.
Because sometimes bot requires grouping in their directory,
especially for the bot that has configuartion file and documentation.
2016-12-14 16:35:49 -08:00
Steve Howell c96681eef5 contrib_bots: Add "Python dependencies" to docs. 2016-12-14 15:03:51 -08:00
Steve Howell f479a1ef37 contrib_bots: Add "Third Party Configuration" to docs. 2016-12-14 15:03:51 -08:00
Tim Abbott 0010b519fd api: Clean up the README.md somewhat. 2016-12-13 22:55:40 -08:00
Tim Abbott 9a6e0cf940 api: Require a recent version of the typing module. 2016-12-13 22:55:40 -08:00
Tim Abbott 677f828593 api: Update list of example scripts to include. 2016-12-13 22:55:40 -08:00
Tim Abbott b1e3ccd259 api: Update author to Zulip open source project. 2016-12-13 22:55:40 -08:00
Steve Howell 0272d6abe7 Remove deprecated get_messages() API.
This also eliminates a very short script that basically
does nothing but call the long-dead API, so there's not
much to salvage there.
2016-12-13 20:33:20 -08:00
lonerz a2aa1a117c interactive bots: Create Wikipedia bot. 2016-12-13 13:46:11 -08:00
reallyly 9d6e7cfea5 pep8: Fix E128 violations.
With some line-wrapping tweaks by tabbott.
2016-12-13 10:50:14 -08:00
anirudhjain75 92981590f5 Annotate zephyr_mirror_backend.py.
With some tweaks by tabbott to update tuple->Tuple and update comments.
2016-12-07 15:57:55 -08:00
Tudor Nazarie 476a591ef5 Annotate bots/jabber_mirror_backend.py 2016-12-06 09:52:08 -08:00
Joy Chen b4fc87745a mypy: Annotate *bots/githook-post-receive* 2016-12-03 15:58:22 -06:00
Joy Chen 77d11cd300 delete check_output backport: Python 2.6 no longer supported 2016-12-03 15:57:20 -06:00
nikolay cc5444a725 pep8: Fix many rule E128 violations.
[Tweaked by tabbott to adjust some approaches used in wrapping]
2016-12-03 13:33:31 -08:00
bulat22101 47488217b1 pep8: Fix E129 violations 2016-12-03 10:56:36 -08:00
bulat22101 dc48a41efe pep8: Fix E502 violations 2016-12-03 10:56:36 -08:00
Juan Verhook 25a8315f71 Annotate api/zulip/__init__.py.
Note that we still can't run mypy against this file and other files,
because of how the interface is dynamically created via _register.  We
will need to change that or use a stub file to make it possible to
annotate this.

This was tweaked by tabbott to fix some bugs.
2016-12-02 18:26:47 -08:00
Sidhant Bhavnani 2e2b8af9fd pep8: Fix E303 violations. 2016-12-02 15:34:11 -08:00
Alex Huang 6eb6016913 pep8: Fix E131. 2016-12-01 23:16:47 -08:00
Alex Huang 68f7dae482 pep8: Fix E122. 2016-12-01 23:16:35 -08:00
AZtheAsian e410264372 pep8: fix E201 violations 2016-12-01 23:06:02 -08:00
AZtheAsian 439dc8ca96 pep8: fix E202 violations 2016-12-01 23:06:02 -08:00
AZtheAsian 418f396b32 pep8: Fix E203 violations 2016-12-01 20:37:57 -08:00
AZtheAsian 73bd3572cf pep8: Fix E111 violations 2016-12-01 14:18:11 -08:00
Rafid Aslam fad4fbc733 lint: Fix E127 pep8 violations.
Fix pep8: E127 continuation line over-indented for visual indent
style issue.
2016-12-01 10:23:55 -08:00
Bickio bc9bb4287d pep8: Fix E125. 2016-11-30 20:03:29 -08:00
Tommy Ip 1cb7c41786 pep8: Fix E701 violations. 2016-11-30 20:45:09 +00:00
Heidi Dong 836e3379c9 mypy: Annotate bots/gcal-bot. 2016-11-29 20:49:11 -08:00
Rafid Aslam 1ae8ac85d8 pep8: Fix E301 pep8 violations.
Fix "E301: expected (1 or 2) blank line" pep8 violations.
2016-11-29 08:51:44 -08:00
Rafid Aslam d4410365ea pep8: Fix E225 pep8 violations. 2016-11-28 15:21:15 -08:00
Tim Abbott 245c05decd twitter-search-bot: Line-wrap very long lines. 2016-11-26 21:24:05 -08:00