Commit graph

2069 commits

Author SHA1 Message Date
Eeshan Garg aaece51380 packages: Stop hardcoding version in dependency checks.
In zulip_bots/setup.py, we now don't specify a minimum version when
checking for dependency on the zulip package. We just want the
latest one.

In zulip_botserver/setup.py, we now don't specify a minimum version
when checking for dependencies on the zulip and zulip_bots package.
We just want the latest ones.
2017-10-05 12:01:37 -07:00
Eeshan Garg 07edd4aa9b zulip_bots: Add custom command for generating MANIFEST.in.
We now have a custom command in zulip_bots/setup.py to generate
a MANIFEST.in. To generate a MANIFEST for a PyPA release, we
can now run:

python setup.py gen_manifest --release

To generate a non-release MANIFEST, we can run:

python setup.py gen_manifest

This allows us to automate the MANIFEST generation in our
release automation script.
2017-10-05 12:01:37 -07:00
Eeshan Garg dfe4360108 zulip_bots/MANIFEST: Support generating MANIFEST for PyPA release.
The generate_manifest.py script now takes a --release argument
that generates a separate MANIFEST for a PyPA release that
include:

* doc.md files
* related assets/* files

A release MANIFEST doesn't include logos and fixtures.
A non-release MANIFEST includes everything.
2017-10-05 12:01:37 -07:00
Eeshan Garg a887692ae4 zulip_bots/MANIFEST: Include zulip_bots/bots/<bot>/assets/*. 2017-10-05 12:01:37 -07:00
neiljp (Neil Pilgrim) 8987ec23e2 bots: zulip_bot_output.py: Check for absence of handler_class in bot. 2017-10-05 11:59:56 -07:00
neiljp (Neil Pilgrim) 8e9c6cd22e bots: zulip_bot_output.py: Check for failed bot module import. 2017-10-05 11:59:56 -07:00
neiljp (Neil Pilgrim) dd283d88f6 bots: zulip_bot_output.py: Adjust examples in help text. 2017-10-05 11:59:56 -07:00
neiljp (Neil Pilgrim) 682ef81970 bots: zulip_bot_output.py: Use built-in argparse formatting for usage. 2017-10-05 11:59:56 -07:00
neiljp (Neil Pilgrim) 7835f1cc19 bots: zulip_bot_output.py: Add note to usage re using quotes. 2017-10-05 11:59:56 -07:00
neiljp (Neil Pilgrim) 4fff603f44 bots: zulip_bot_output.py: Switch message to being required. 2017-10-05 11:59:56 -07:00
neiljp (Neil Pilgrim) c33ac65ac9 define bot: add check & test to avoid sending words with non-letters. 2017-10-05 11:54:43 -07:00
neiljp (Neil Pilgrim) f862cf2222 wikipedia bot: encode urls correctly in http request & adjust tests. 2017-10-05 11:54:43 -07:00
Eeshan Garg 8adf51890a bots/xkcd: Improve and refactor doc.md to use Markdown macros.
This commit does the following:
* Minor improvements to the writing wherever possible.
* Replace links to screenshots with links that would work when
  rendering said screenshots on the main repo. This would mean
  the screenshots won't be rendered outside the main repo.
* Adds a section that links to our Bots Guide's How to run a bot
  tutorial by using a Markdown a macro.
2017-10-03 18:11:38 -07:00
Eeshan Garg 4a162ba625 bots/xkcd: Add a logo. 2017-10-03 18:11:38 -07:00
neiljp (Neil Pilgrim) 34515454b5 bots: Mark --message/-m argument to zulip_bot_output.py as required. 2017-09-30 21:53:51 +02:00
Tim Abbott 807afd2032 zephyr: Use add_default_arguments in sync_public_streams. 2017-09-29 16:21:18 -07:00
Alena Volkova c3a213269f provision: Make sure the correct version of pip is installed.
pip 8.0+ is required to successfully run the script (otherwise, the prefix
option doesn't work). pip 9.0+ is installed because of the safety features.
2017-09-29 16:00:01 -07:00
Alena Volkova e1def40edc provision: Remove unnecessary imports. 2017-09-29 15:58:00 -07:00
Alena Volkova 21bc4778b0 provision: Give a clear error message when virtualenv is missing.
Without this tweak, running the script results in a vague "No such file or
directory" error if the virtualenv package is not installed.
2017-09-29 15:57:23 -07:00
derAnfaenger 449d5faa59 mypy: Run mypy for each package separately. 2017-09-27 20:40:08 -07:00
derAnfaenger abe9338cfe mypy: Add erroring files to exclude list. 2017-09-27 11:44:28 +02:00
derAnfaenger 174d11ec36 lister: Make excluding directories work on Windows. 2017-09-27 11:44:20 +02:00
derAnfaenger 9ddb5518f4 tools: Remove duplicate lister.py 2017-09-27 10:49:41 +02:00
derAnfaenger 5ecc26886a travis: Run mypy and linter in a single job. 2017-09-27 10:27:37 +02:00
neiljp (Neil Pilgrim) 85f2a9e03d bots: Add basic metadata with failover, used on running only. 2017-09-25 14:39:02 -07:00
Eeshan Garg 5681b6e9e2 zulip_bots: Remove get_bot_doc_path and get_bot_logo_path.
These functions were rendered redundant by changes in our
approach on how the main repo renders docs and logos contained
in the zulip_bots package (see #6103). So, these should now be
removed.
2017-09-16 17:10:12 -02:30
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 3af373adc3 travis: Add mypy checker. 2017-09-15 13:24:42 +02:00
derAnfaenger 123c49291a provision: Don't fail on mypy install for Python 2. 2017-09-15 13:24:35 +02: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 035f0c3268 tools: Add mypy runner.
Unless otherwise specified, `tools/run-mypy` will right now only
check annotations in core files of the `zulip` package.
2017-09-15 13:24:20 +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 54eac5e125 codecov: Adjust failure threshold.
The previous threshold was taken over from the zulip repo,
which contains much more LOC. The new threshold reflects the
size of the `python-zulip-api` repo.
2017-09-14 04:26:12 -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 18157095c4 zulip_bots: Add unittests for run.py.
These are tests that assert the correct argument
parsing; the successful execution of bots is not verified.
2017-09-13 00:25:16 -07:00
derAnfaenger 20f01fec85 provision: Put venv activation path in quotes.
This makes the command work with Windows paths with spaces in them.
2017-09-12 16:48:37 +02:00
derAnfaenger 6aece20925 provision: Indent venv activation command. 2017-09-12 16:47:22 +02:00
derAnfaenger 3e1d9b17a4 zulip_bots: Import imp.load_source for Python < 3.5. 2017-09-12 05:21:00 -07:00