Commit graph

1364 commits

Author SHA1 Message Date
derAnfaenger cfb767ad0f zulip_bots: Make virtual_fs bot state fully JSON-able. 2017-10-31 23:15:28 +01:00
derAnfaenger e5576388dd botserver: Remove obsolete state_handler param from handle_message(). 2017-10-31 12:24:10 +01:00
derAnfaenger aef41de37a tools: Remove obsolete state_handler param from handle_message(). 2017-10-31 12:23:29 +01:00
Tim Abbott 075e368818 run-mypy: Document why certain files are not mypy-checked. 2017-10-26 23:02:52 -07:00
Alena Volkova 25d6c68d4d mypy: zulip_botserver: Fix errors in setup.py. 2017-10-27 00:56:16 -04:00
Alena Volkova ed51cabf1b mypy: zulip_botserver: Fix errors in zulip_botserver/server.py. 2017-10-27 00:56:16 -04:00
Alena Volkova 81205ea813 mypy: zulip_botserver: Fix errors in tests/__init__.py. 2017-10-27 00:56:16 -04:00
Alena Volkova fd519252d6 mypy: zulip_bots: Fix errors in zulip_bots/zulip_bot_output.py. 2017-10-27 00:56:16 -04:00
Alena Volkova 5e7f4c595f mypy: zulip_bots: Annotate zulip_bots/test_run.py. 2017-10-27 00:56:16 -04:00
Alena Volkova afb9886553 mypy: zulip_bots: Fix errors in zulip_bots/test_lib.py. 2017-10-27 00:56:16 -04:00
Alena Volkova 6546917088 mypy: zulip_bots: Annotate zulip_bots/run.py. 2017-10-27 00:56:16 -04:00
Alena Volkova 47d8ab8f9a mypy: zulip_bots: Fix errors in zulip_bots/provision.py. 2017-10-27 00:56:15 -04:00
Alena Volkova 3a20dee621 mypy: zulip_bots: Fix errors in zulip_bots/lib.py. 2017-10-27 00:56:15 -04:00
Alena Volkova ad050fc806 mypy: zulip_bots: Fix errors in setup.py. 2017-10-27 00:56:15 -04:00
Alena Volkova 3d282a12a7 mypy: zulip_bots: Fix errors in generate_manifest.py. 2017-10-27 00:56:06 -04:00
Alena Volkova fe6deb2e03 mypy: zulip: Fix errors in tests/test_default_arguments.py. 2017-10-27 00:56:06 -04:00
Alena Volkova 99785a1be4 mypy: zulip: Fix errors in tests/__init__.py. 2017-10-27 00:56:06 -04:00
Alena Volkova 671a078137 mypy: zulip: Fix errors in integrations/zephyr/process_ccache. 2017-10-27 00:56:06 -04:00
Alena Volkova 8becce7c98 mypy: zulip: Annotate integrations/svn/zulip_svn_config.py. 2017-10-27 00:56:06 -04:00
Alena Volkova ab192fe937 mypy: zulip: Annotate integrations/perforce/zulip_perforce_config.py. 2017-10-27 00:56:06 -04:00
Alena Volkova 7ad3324aaa mypy: zulip: Fix errors in integrations/log2zulip/log2zulip. 2017-10-27 00:55:54 -04:00
Alena Volkova 995dc33334 mypy: zulip: Fix errors in integrations/irc/irc_mirror_backend.py. 2017-10-26 17:02:14 -04:00
Alena Volkova af957c18fe mypy: zulip: Annotate integrations/git/zulip_git_config.py. 2017-10-26 17:02:14 -04:00
derAnfaenger 59f81845dd zulip_bots: Update StateHandler API to behave dict-like.
This matches the external StateHandler API with the embedded
StateHandler API.
2017-10-24 13:15:51 +02:00
derAnfaenger 32df4e097d tictactoe bot: Store game state in JSON-able format. 2017-10-24 13:03:41 +02:00
derAnfaenger 8761e47893 zulip_bots: Store testing conversations in lists.
This enforces the use of a list of tuples for
conversations, as opposed to dicts.
2017-10-24 11:14:09 +02:00
derAnfaenger 8179b30873 zulip_bots: Reify StateHandler testing.
This simplifies testing stateful bots by integrating the StateHandler
into the test library. As a side-effect, the mock bot handler gets
reused during a test, making the tests more realistic. The
StateHandler now keeps its state during a call to check_expected_responses,
forcing some stateful tests to be more verbose and explicit.
2017-10-24 11:07:58 +02:00
derAnfaenger e331426c64 zulip_bots: Rename state_handler to storage. 2017-10-23 12:24:41 +02:00
derAnfaenger eb6982e670 zulip_bots: Make state_handler property of bot_handler. 2017-10-23 12:17:46 +02:00
derAnfaenger 45c38d0dcf bot tests: Autospec mock bot handler.
This makes test development less error-prone and closer
to reality.
2017-10-23 11:56:01 +02:00
Eeshan Garg 4af8bcd46e packaging: Upgrade package version (0.3.5 -> 0.3.7). 2017-10-21 01:10:25 -02:30
Steve Howell 08e212138d Look for mentioned in flags.
The Zulip server, starting in 1.7, no longer sends
`is_mentioned` in the message payload, and it was buggy in
earlier versions, so now we check `flags`.
2017-10-20 17:33:59 -07:00
derAnfaenger 839bbf0db4 tools: Enhance output of run-mypy.
This removes the excessively verbose lists of files
to be tested, and flushes the output after every print
to update the user on the current status in real time.
2017-10-20 08:30:33 -07:00
derAnfaenger 0e6ea0a439 api: Add comments clarifying the request logic. 2017-10-11 22:24:12 -07:00
derAnfaenger a7bfe692fa api: Fix unused long-polling retry parameter.
This parameter was intended to control whether we give a long timeout
and related behavior, but it was accidentally not being passed into
the second layer of the library from the first.

While we're fixing it, make it actually limit the length of a timeout
to something reasonable.
2017-10-11 22:24:01 -07:00
Eeshan Garg 1e8e1f17c4 release: Upgrade package versions (0.3.4 -> 0.3.5). 2017-10-09 14:13:32 -02:30
Eeshan Garg 5235892aef release-packages: Fix glob pattern for twine.upload. 2017-10-09 14:07:19 -02:30
Tim Abbott 297b62efc6 log2zulip: Use simpler code for accessing production venv.
The only problem with this resulting code is that setup_path_on_import
only works if the Python versions are the same, so you need to run
this with Python 3 in that case.

We try to resolve that for use on Zulip servers with
zulip/zulip:47c5aae5b242fb6d2f5e860602e0fc0af68419bb; since that's the
main case where the code path runs, that should be good enough.
2017-10-06 16:37:56 -07:00
Tim Abbott dc2132e629 zephyr_mirror: Eliminate --root-path arguments.
These were quite messy code, and now that almost nobody is running
their own zephyr mirroring script (vs. using webathena), making the
zephyr mirroring script deployable outside the package isn't super
valuable.
2017-10-05 13:24:59 -07:00
Tim Abbott 963e6d0ad8 zephyr_mirror: Always run backend script from current directory.
While this technically removes functionality, it's rare that it would
be useful to do this.
2017-10-05 13:17:10 -07:00
Tim Abbott 96f2100974 zephyr: Remove root-path import nonsense from check-mirroring.
We no longer need this in order to access the script's dependencies,
since it now is part of a proper package.
2017-10-05 13:02:58 -07:00
Tim Abbott bc4e54a35d zephyr_mirror: Restart self using __file__, not root-path.
This should do the same thing, but with less complexity.
2017-10-05 12:46:01 -07:00
Tim Abbott 7e5a320343 zephyr_mirror: Move stamp_path to not be based on root_path. 2017-10-05 12:37:49 -07:00
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
Eeshan Garg 81073f9234 packaging: Automate the package release process.
This commit adds a script to automate the PyPA release of the
zulip, zulip_bots and zulip_botserver packages.

The tools/release-packages script would take care of uploading
the packages to PyPA, and push commits to both repos updating the
package versions. If you have commit access to the repos, you
can --push upstream to master. If not, then you can --push
origin to a new branch on your fork and create a PR for those
changes.

Ideally, a release shouldn't take longer than however long it
takes one to type the above command. If you have SSH set up on
GitHub, you won't need to type in your GitHub username and
password. You can also store your PyPA credentials in a file
in your home directory; it isn't very secure, but it saves
time nevertheless.
2017-10-05 12:01:37 -07:00
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