Commit Graph

1892 Commits

Author SHA1 Message Date
Tim Abbott 4040cadf7d coverage: Omit some test runner files from coverage.
These files are part of the test runner and can't realisitically have
test coverage due to being imported before coverage in the setup
sequence.
2017-05-29 15:30:49 -07:00
Tim Abbott ce26f0e086 integrations: Remove legacy basecamp integration.
Now that we have the webhook integration, there's no reason to
maintain the pre-webhook version.
2017-05-29 15:10:59 -07:00
Rohitt Vashishtha 2d73e03e37 ui-refactor: Rename modals.js to overlays.js.
Fixed #4702.
2017-05-29 11:24:46 -07:00
Tim Abbott 5ffdce9aab test-js-with-node: Set timezone to UTC for tests. 2017-05-29 08:47:26 -07:00
Steve Howell 5f48b51b60 provision: Add `cd /srv/zulip` to profile.
I didn't bump the provision version on this change, as it
won't break anything if somebody fails to make this change.
2017-05-29 08:40:49 -07:00
Pweaver (Paul Weaver) bbb3aad611 Add typescript support to asset compilation. 2017-05-28 17:28:28 -07:00
Tim Abbott 9b8641d9eb lint: Add iOS to list of valid weird capitalizations. 2017-05-26 20:59:32 -07:00
Umair Khan 7f43ec05f2 lint: Add rule to check alt arg for translation. 2017-05-26 15:28:46 -07:00
Umair Khan ad5780c03e lint: Mark alt argument for translation. 2017-05-26 15:28:46 -07:00
Reid Barton ccb4c5c26f bots: Move zephyr-related files to api/integrations/zephyr/. 2017-05-26 15:07:02 -07:00
rht a1f82e02d6 python: Replace os.system with subprocess.call.
Generally, we avoid os.system, since it shells out and thus can be
a cause of security issues.
2017-05-26 15:03:16 -07:00
derAnfaenger 024101be6b bots: Add mypy annotations for bots framework.
This commit adds mypy annotations for both the main
bots and the bots testing runner. It involves a change
to the BotHandlerApi send_message and update_message
funtions, which is compatible with every bot.

Tweaked by tabbott to use more expressive annotations.
2017-05-26 10:25:06 -07:00
Pweaver (Paul Weaver) cb311e99d8 Change backend tests to use a webpack stats stub file. 2017-05-25 16:15:32 -07:00
Pweaver (Paul Weaver) de98dd127d Remove webpack dependency from tools/minify-js. 2017-05-25 16:15:32 -07:00
Pweaver (Paul Weaver) fb0d2d6a8e webpack: Move assets to a separate JSON file so we can process in python. 2017-05-25 16:15:32 -07:00
Mehanig 2d5097868a webpack: Skip compilation for minified 3rd party libs. 2017-05-25 16:15:32 -07:00
Reid Barton 6d2a82ee3c build-release-tarball: Give helpful message on update-prod-static failure. 2017-05-24 19:17:00 -07:00
Mehanig 3f5d0e69fb Build and handle jsfiles using webpack instead of django-pipeline.
Also renames bundle.js to translations.js.
2017-05-24 18:38:03 -07:00
Mehanig 4f39d4fc22 Split webpack config into 3 files (base, dev, production). 2017-05-24 18:37:58 -07:00
Eeshan Garg e9b3b56105 webhooks/appfollow: Use parametric Markdown macros. 2017-05-24 17:00:19 -07:00
Reid Barton 2e4078cbd2 update-prod-static: Redirect update-authors-json stderr to log file. 2017-05-24 16:44:02 -07:00
Tim Abbott 8aaf9b1426 Revert "Fix emoji cache setup when not using provision.py."
This reverts commit ab2cfadcaa.

This broke production installation.
2017-05-24 10:35:41 -07:00
Mehanig 6038777891 npm: Upgrade webpack to 2.0 version dev and production. 2017-05-23 23:58:25 -07:00
Eklavya Sharma 2314c0fb1b tools/minify-js: Improve type checking.
* Use Optional where needed.
* Add type to variables because otherwise it'll be Any.
2017-05-23 22:02:41 -07:00
Eklavya Sharma b805e0ca10 mypy: Assert non-Noneness.
Convince mypy that an object cannot be None by using an assert.
2017-05-23 21:56:50 -07:00
Eklavya Sharma 7636972a6c mypy: Wrap return value in Optional. 2017-05-23 21:56:50 -07:00
Eklavya Sharma cc1937c8d5 mypy: Use Optional with strings where required. 2017-05-23 21:56:50 -07:00
Eklavya Sharma 481d14df39 mypy: Remove a type: ignore.
https://github.com/python/typeshed/pull/693 was merged.
2017-05-23 21:56:48 -07:00
Steve Howell 5003283b64 Enforce 100% test coverage for lib/avatar.py. 2017-05-23 20:07:07 -07:00
Jason Michalski a22d6d2c2a test-backend: Enable test coverage in multi-process mode.
We enable data_suffix option when creating Coverage instances which
causes the output files to include the hostname, pid, and random id.
Before each run erase is called which clears all existing coverage data
files. And then at the end of the test run use the combine method which
merges the reports.

We collect coverage in the main process which collects data from
imports and also when running in single process mode. In the workers we
collect coverage in run_subsuite. This creates more stats files than
strictly required but I don't see a better place to save the stats when
stopping workers.

Note that this has the side effect of enabling parallel testing in
Travis CI.
2017-05-23 18:25:13 -07:00
Steve Howell ecdc500440 test-backend: Run only one process for --rerun option. 2017-05-23 16:59:22 -07:00
Eklavya Sharma 63cc8183ad tools/run-mypy: Add flags. 2017-05-23 12:02:57 -07:00
Eklavya Sharma bda5517b5c mypy: Upgrade to latest version of mypy. 2017-05-23 10:42:44 -07:00
umkay 09e1136cc8 mypy: Fix casing for List type. 2017-05-23 10:42:44 -07:00
Eeshan Garg ed8c6943f2 webhooks/airbrake: Use Markdown macros for documentation. 2017-05-22 18:19:14 -07:00
Jordan Gedney a9f4d56a95 mypy: Add type to info dictionary. 2017-05-22 11:19:06 -07:00
Carey Metcalfe ab2cfadcaa Fix emoji cache setup when not using provision.py.
Moves creating the emoji folder from the provisioning script to
the build_emoji script.

Fixes the fact that the emoji cache directory wasn't being created
when not using the provision.py script.
2017-05-22 11:08:43 -07:00
Aditya Bansal 521bdccb9d pep8: Add compliance with rule E261 to test-tools. 2017-05-18 03:00:32 +05:30
Aditya Bansal 8b219bea13 pep8: Add compliance with rule E261 to test-api. 2017-05-18 03:00:32 +05:30
Aditya Bansal 306e74c60d pep8: Add compliance with rule E261 to replace-tarball-shebang. 2017-05-18 03:00:32 +05:30
Aditya Bansal d6f97f09aa pep8: Add compliance with rule E261 to renumber-migrations. 2017-05-18 03:00:32 +05:30
Aditya Bansal 171a0ddd4e pep8: Add compliance with rule E261 to minify-js. 2017-05-18 03:00:32 +05:30
Aditya Bansal cd7fda993a pep8: Add compliance with rule E261 to lint. 2017-05-18 03:00:32 +05:30
Aditya Bansal 4d06c567f4 pep8: Add compliance with rule E261 to html-grep. 2017-05-18 03:00:32 +05:30
Aditya Bansal 151712b9cc pep8: Add compliance with rule E261 to get-handlebar-vars. 2017-05-18 03:00:32 +05:30
Aditya Bansal bc987c99ca pep8: Add compliance with rule E261 to create-test-api-docs. 2017-05-18 03:00:32 +05:30
Aditya Bansal 9c29da17fc pep8: Add compliance with rule E261 to compile-handlebars-templates. 2017-05-18 03:00:32 +05:30
Harshit Bansal a549013c50 emoji_pickers: Fix broken flag emojis.
Due to differences between the codepoints of flag emojis in
`emoji_map.json` and iamcal's dataset, we need to patch the
css classes for the flag emojis temporarily until the migration
to iamcal's dataset is complete inorder to render them properly.
There is a difference between the images of flag emojis in our
old emoji farm and iamcal's spritesheets and since we have not
yet switched to using spritesheets for displaying emojis in
messages, there is a difference between the flag emojis as
rendered in messages and in emoji pickers.
2017-05-17 08:09:50 -07:00
Tim Abbott b64a4f9291 minify-js: Fix failure to update JS files on Git deploys.
This fixes a significant static asset pipeline bug, which mean that
when we added `moment.js` to the Zulip npm dependencies, it wasn't
properly included in common.js; caching prevented common.js from ever
being rebuilt.
2017-05-16 17:57:20 -07:00
Harshit Bansal 0d28d5d808 build_emoji: Fix the spritesheet CSS generation code.
Modify the spritesheet generation code to account for the differences
between emoji_map.json and iamcal's dataset. Due to the differences
between the two mappings, some emojis like 1️⃣, 2️⃣ etc were not
getting rendered properly in the two emoji pickers where we are using
the iamcal's spritesheets for rendering them. This was so because there
was no CSS class corresponding to the codepoints of these emojis(as
mapped using emoji_map.json) in our spritesheet CSS(generated using
iamcal's dataset).

Fixes: #4775.
2017-05-16 13:06:12 -07:00