Commit graph

88 commits

Author SHA1 Message Date
Robert Hönig
13d181cd09 Remove Python 2.7 testing for zulip_bots and zulip_botserver. 2017-11-28 15:42:22 -08:00
Steve Howell
80e4ef9f72 Create terminal.py to run bots in the terminal.
This program replaces zulip_bot_output.py, which had
gotten a little out of date.

It should be able to simulate a terminal conversation for
all of our bots, including those that use "advanced" features:

    third party config files: tested with giphy
    message updates: tested with incrementor
    storage: tested with virtual_fs and others
2017-11-28 10:52:13 -08:00
derAnfaenger
c264f7ef12 provisioning: Enhance warning for Python 2.7.
Color-highlight the warning. Use print instead
of warnings.warn (this omits unnecessary debug info).
2017-11-23 15:20:34 -08:00
derAnfaenger
819d5f6ebe provisioning: Fix real and venv Python version mixup. 2017-11-23 15:20:34 -08:00
Steve Howell
57f7088304 Ignore prior coverage data in tools/test-main.
Before this patch, we were reading in old coverage data every
time we ran test-main and had a .coverage file lying around.
This would cause inaccurate data when you changed code, and it
would cause crashes if you moved your working directory on the
file system.
2017-11-20 12:48:36 -08:00
derAnfaenger
9c37f92a01 zulip_bots: Add common tests.
unittest includes by default all module-level classes that inherit
from TestCase and implement at least one method starting with 'test'.
Since it doesn't provide a convenient way for excluding TestSuites,
we need to manually filter out the unwanted testing of our test base
class itself.
2017-11-14 09:39:00 -08:00
Eeshan Garg
0a70a6b46f test-static-analysis: Fix trailing whitespace errors. 2017-11-10 19:24:59 -03:30
Eeshan Garg
0590671fc6 tools/provision: Support specifying path to Python interpreter. 2017-11-10 17:42:38 -03:30
Steve Howell
bad8dccef7 provision: Make instructions to source venv more obvious.
(This cleans up the print formatting a bit in tools/provision
and adds an explicit step in README.md.)
2017-11-10 13:04:59 -08:00
derAnfaenger
80534a50b6 zulip_bots: Add directory for unmaintained bots. 2017-11-02 15:15:47 +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
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
Eeshan Garg
5235892aef release-packages: Fix glob pattern for twine.upload. 2017-10-09 14:07:19 -02:30
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
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
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
derAnfaenger
123c49291a provision: Don't fail on mypy install for Python 2. 2017-09-15 13:24:35 +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
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
ea105ffec5 tools: Add git utility scripts. 2017-09-12 02:54:10 -07:00
derAnfaenger
ef54ea2ea6 test scripts: Outsource common code of test-botserver and test-zulip. 2017-09-12 01:27:09 -07:00
derAnfaenger
af9178c4ed test suites: Add zulip package tests to Travis and Codecov. 2017-09-12 01:27:09 -07:00
derAnfaenger
b31cf2f9a9 zulip package: Add test runner script. 2017-09-12 01:27:09 -07:00