Commit graph

135 commits

Author SHA1 Message Date
Tim Abbott 6395dc1a45 zephyr_mirror: Update process_cache for repository move.
This also has the side effect of stopping using the --root-path
argument, which should no longer be required.
2017-10-05 12:21:11 -07:00
Tim Abbott 807afd2032 zephyr: Use add_default_arguments in sync_public_streams. 2017-09-29 16:21:18 -07:00
Tim Abbott baa09bc26c log2zulip: Clean up extra config path and add comments.
That extra complexity isn't particularly valuable.
2017-09-15 07:04:36 -07:00
derAnfaenger b53dc5de4c log2zulip: Make paths Windows compatible. 2017-09-15 07:04:36 -07:00
derAnfaenger 761d4f44c1 log2zulip: Use default argparser. 2017-09-15 07:04:36 -07:00
derAnfaenger 3fb640a5d0 zulip: Use canonical way to require an arg in subscribe. 2017-09-15 13:24:32 +02:00
derAnfaenger a06437c4ee zulip: Use canonical way to require an arg in unsubscribe. 2017-09-15 13:24:28 +02:00
derAnfaenger 0a49638e82 mypy: Add annotations to api_examples.py 2017-09-15 13:24:24 +02:00
derAnfaenger 61de5578f2 mypy: Fix annotations in core zulip files. 2017-09-15 13:24:09 +02:00
derAnfaenger 59d65309c7 zulip: Exit with info after provisioning script. 2017-09-15 03:06:17 -07:00
derAnfaenger 091f532da6 zulip-api-examples: Check and print path to script. 2017-09-15 02:06:38 -07:00
derAnfaenger 6630deda6a twitter bots: Merge twitter-bot and twitter-search-bot. 2017-09-15 00:55:01 -07:00
derAnfaenger 623557d189 zulip: Install all example scripts in the package's dir. 2017-09-14 04:46:13 -07:00
derAnfaenger 2f044b44bd zulip: Move examples to zulip/examples. 2017-09-14 04:46:13 -07:00
derAnfaenger 2f62507987 api: Add script to print path of examples directory.
Partially fixes #92.
2017-09-14 04:46:13 -07:00
derAnfaenger ae4bf8bbf4 zulip: Store examples in the package's directory. 2017-09-14 04:46:13 -07:00
derAnfaenger 59320f6b28 zulip: Explain use cases for generate_option_group() method. 2017-09-14 11:39:11 +02:00
derAnfaenger 631c64ca6c zulip: Move from simplejson to json.
This removes the simplejson dependency.
2017-09-14 02:26:56 -07:00
derAnfaenger d05e932968 log2zulip: Replace ujson with json. 2017-09-12 02:14:51 -07:00
derAnfaenger c6e7ddfb03 zulip package: Make check for provision failsafe.
It is not guaranteed that the integration scripts in
the Zulip repository even specify a `provision` option.
Therefore, checking the value of this option would fail.
Updating this with getattr and a default value.
2017-09-12 11:08:58 +02:00
derAnfaenger cb770ffee9 irc-mirror.py: Allow optional provisioning.
To do so, we need to import all required internal modules after the
script had the option to provision. The provisioning itself is then
done by zulip.init_from_options().
2017-09-12 01:39:21 -07:00
derAnfaenger 61b609e6f2 irc integration: Make IRCBot a separate module.
This will allow us to import IRCBot at a later point
in the code, necessary for provsioning support.
2017-09-12 01:39:21 -07:00
derAnfaenger 9acd9d932c irc-mirror.py: Make zulip_client an argument of IRCBot.
This is the first step towards moving IRCBot to a
separate file.
2017-09-12 01:39:21 -07:00
derAnfaenger ec18cbff26 zulip package: Add provision option for scripts.
If enabled in a script, this option will try to install dependencies
in the requirements.txt in the script's directory.
2017-09-12 01:39:21 -07:00
derAnfaenger 50d8c5f7fe zulip package: Add requirements.txt for each integration. 2017-09-12 01:39:21 -07:00
derAnfaenger fb2aff4611 zulip package: Add unittest
As the first unittest, this creates a test directory and
abnd adds it tho the excluded pip package files.

There are two `tests` directories now, one in zulip_botserver and one in
zulip. This confuses the unittest runner, leading to failed test imports.
Therefore, we need to tell the package importer that there are multiple
tests directories, all of which should be considered for a search.
2017-09-12 01:27:09 -07:00
Eeshan Garg 390054da62 python-zulip-api: Upgrade versions (0.3.3 -> 0.3.4). 2017-09-11 21:09:28 -02:30
derAnfaenger b585bd2dfa zulip setup.py: Remove redundant directory forward slash.
The slash caused pip install ./zulip to fail on Windows with
Python 3.5.
2017-09-06 09:01:22 +02:00
Eeshan Garg 6e798f317f python-zulip-api: Upgrade versions (0.3.2 -> 0.3.3).
We now have "universal" wheel distributions. Universal wheels
support both Python 2 and Python 3.
2017-09-01 23:10:12 -02:30
Tim Abbott bbed4a625d log2zulip: Fix an extremely long line. 2017-08-30 10:01:48 -07:00
Greg Price 49fb205ae7 log2zulip: Fix to work on Python 3.
I'm not thrilled with the `replace` error handler losing information
if the logfile contains invalid UTF-8 for some reason; but that sure
beats a UnicodeDecodeError, and for this script I can't quite be
bothered to run the rather tricky riddle trail that Python 3 makes it
to pass arbitrary byte data through layers of ordinary text processing.
2017-08-30 09:57:57 -07:00
derAnfaenger 86729a862c api: Remove unnecessary API key details.
Fixes #1.
2017-08-29 14:24:19 -07:00
derAnfaenger 9d683e4669 api: Ensure automatic tilde expansion. 2017-08-29 14:20:48 -07:00
derAnfaenger 6db062ef75 api: Display help on wrong command-line arguments.
Fixes #93.
2017-08-29 14:18:53 -07:00
derAnfaenger 26a774503b twitter bots: Write internal config to separate file.
Tweaked by tabbott to remove duplicate write_config lines.

Fixes #88.
2017-08-27 19:27:13 -07:00
Tim Abbott 5bc98bfdf7 send_message: Remove unnecessary API key details.
This removes a lot of clutter from this example.

This is the send_message part of #1.
2017-08-24 10:58:29 -07:00
Alex Dehnert 5eaac7bfba api: Use requests.Session.
Using requests.Session allows the requests library to reuse HTTP
connections, which is potentially helpful for performance.

Fixes #3.
2017-08-24 10:39:42 -07:00
Tim Abbott 9c18c0b4ed twitter: Fix buggy handling of config_file in Python 3.
This fixes the most broken part of #88.
2017-08-22 17:20:54 -07:00
Ahmad Jarara 409bb58742 api: set event_types to empty list if not supplied in register.
Previously, if you didn't specify a list of `event_types` in either `register` or `call_on_each_event`, you'd get an exception due to the invalid event format.

This fixes #86.
2017-08-22 16:33:10 -07:00
Eeshan Garg 09060afcab integrations/rss: Upgrade to argparse. 2017-08-03 12:34:26 -07:00
Eeshan Garg c4480311d7 integrations/nagios: Upgrade to argparse. 2017-08-02 00:58:55 -02:30
Eeshan Garg 18a73324a9 integrations/twitter: Upgrade to argparse. 2017-08-02 00:51:25 -02:30
Eeshan Garg 3b04b55ffd integrations/irc: Upgrade to argparse. 2017-08-01 19:09:08 -02:30
Eeshan Garg 780ccb392e integrations/google: Upgrade to argparse. 2017-08-01 19:08:58 -02:30
Eeshan Garg 59c750707a python-zulip-api: Upgrade package versions (0.3.1 -> 0.3.2). 2017-07-31 15:33:34 -07:00
Eeshan Garg 61d84cd649 zulip/examples: Remove sys.path modifications.
With the new repo, doing a `pip install -e ./zulip` will be a part
of the core workflow. This mitigates the risk of developers
accidentally testing their changes against an installed copy of the
zulip package rather than the copy in their checkout. Therefore,
we can now get rid of the various `sys.path.inserts` in the examples.
2017-07-29 00:24:42 -02:30
Eeshan Garg 8fbb3700d2 zulip-send: Use argparse-based zulip.add_default_arguments. 2017-07-29 00:17:43 -02:30
Eeshan Garg 4a76284af1 zulip/examples: Use argparse-based zulip.add_default_arguments. 2017-07-29 00:17:34 -02:30
Eeshan Garg 38df8ef87b api: Recommend migrating to argparse-based add_default_arguments(). 2017-07-29 00:04:25 -02:30
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