Steve Howell
3b5c187f55
Add tools/check-css and tools/lib/css_parser.py.
...
`tools/lint-all` now calls the new `tools/check-css`
The css_parser library parsers CSS into a data structure
that remembers line numbers and columns of semantically
meaningful tokens and adjoining white space/tokens. It
is intended to be used for various linting tasks.
The file `tools/check-css` runs a few files through the
parser and makes sure they round trip. This has some value
right away, as files that fail to parse will cause an
exception to be thrown and thus alert developers to syntax
errors. We expect to grow this into more advanced linting
tasks eventually.
2016-08-02 16:22:46 -07:00
Taranjeet Singh
b82836a901
tools/setup/emoji_dump/emoji_dump.py: Move bitmaps & *.ttx to var/.
...
Also update .gitignore to remove the old .gitignore markings for
these files' old locations.
2016-08-02 15:18:36 -07:00
Tim Abbott
0ee3178167
Move update-deployment to scripts/deploy-zulip-from-git.
2016-08-02 14:31:07 -07:00
Tim Abbott
fef32af28c
update-deployment: Switch to using update-zulip-part-2.
2016-08-02 14:31:07 -07:00
Steve Howell
9151ee42e9
Extract tools/lib/template_parser.py.
2016-08-01 16:27:50 -07:00
Steve Howell
9951e92b3b
Extract tokenize() in tools/check-templates.
2016-08-01 16:05:07 -07:00
Steve Howell
7e772ed644
Clean up code in check-templates.
...
I extracted a few helper methods.
2016-08-01 16:05:07 -07:00
Tim Abbott
75b5d021fa
Remove unused puppet-common third-party module code.
2016-07-31 19:24:42 -07:00
Tim Abbott
143575a5bd
provision: Fetch tsearch_extras package from Zulip apt repository.
...
This fixes installing a Zulip development environment on Ubuntu Xenial.
2016-07-30 21:01:07 -07:00
Steve Howell
6a65b3482c
Move index.js to frontend_tests/zjsunit.
2016-07-30 14:54:30 -07:00
Tim Abbott
f0bf883772
provision: Retry node_modules setup on failures.
...
`npm install` fails nondeterministically occasionally, and this makes
such failures likely to be automatically resolved in most cases by
simple retrying.
2016-07-30 10:09:23 -07:00
Tim Abbott
315766ae02
provision: Provide a nice success message.
2016-07-30 10:09:23 -07:00
Tim Abbott
ed95c34b83
check-templates: Remove now-removed terms.html.
2016-07-30 09:56:54 -07:00
Steve Howell
8b13530712
Add tools/analyze-url-coverage
2016-07-29 21:23:33 -07:00
Steve Howell
21f83afe3a
Add --url-coverage option to ./tools/test-backend.
2016-07-29 21:23:33 -07:00
Steve Howell
4556bf528f
Add --report-slow-tests option to tools/test-backend.
2016-07-29 16:41:20 -07:00
Steve Howell
f3962994b5
Fix regression for running migrations during tests.
...
When running ./tools/test-backend, the script to generate
fixtures, ./tools/setup/generate-fixtures, looks for a file
called migration-status to determine whether it can short
circuit doing database migrations. This file got moved as
part of the effort to put files in "var," but the existence
check was still looking for that file in its old location.
2016-07-29 08:57:56 -07:00
Tim Abbott
568dd0e142
lint-all: Improve regular expression for json_error.
2016-07-28 16:19:55 -07:00
Umair Khan
1a6e8282c8
Run 'check_send_receive_time' as 'zulip' user.
...
Run '/puppet/zulip/files/nagios_plugins/zulip_app_frontend/check_send_receive_time'
script as 'zulip' user so that the connection to the database can be
made correctly.
2016-07-28 13:39:29 -07:00
Steve Howell
713797a65c
Add lint checks for self.client.{get,patch,put,post,delete}.
2016-07-27 20:50:54 -07:00
Tim Abbott
c2bed83a84
run-dev: Hardcode 127.0.0.1 rather than localhost.
...
Using "localhost" is problematic in Travis CI, where they have
/etc/hosts configured to make `localhost` resolve to both 127.0.0.1
and ::1.
2016-07-27 11:39:12 -07:00
Eklavya Sharma
97d877f49e
tools/: Make subprocess calls unicode-aware.
2016-07-26 12:06:41 -07:00
Taranjeet Singh
1328a10069
Move available-migration and migration-status to var/.
2016-07-25 14:39:35 -07:00
Taranjeet Singh
b143d6ca6e
Move test_credentials.js to var/casper.
2016-07-25 14:39:23 -07:00
Eklavya Sharma
29af1419db
Make tools/update-deployment pass mypy check.
2016-07-25 22:06:05 +05:30
Eklavya Sharma
b08d6769c1
tools/zulip-export/zulip-export: Fix how files are opened.
...
Instead of using codecs.open, use the builtin open in binary mode
and write data after encoding it in utf-8.
2016-07-24 22:32:08 +05:30
Eklavya Sharma
df7dcdda5f
Annotate tools/get-handlebar-vars.
2016-07-24 22:12:32 +05:30
Eklavya Sharma
61ffd835e1
Annotate tools/minify-js.
2016-07-24 21:58:02 +05:30
Eklavya Sharma
1e0a971178
Annotate tools/test-run-dev.
2016-07-24 21:33:40 +05:30
Eklavya Sharma
7edc38bbf7
Remove tools/test-js-with-casper from mypy exclude list.
2016-07-24 21:07:07 +05:30
Eklavya Sharma
e6264fa6fb
Annotate tools/compile-handlebars-templates.
2016-07-24 21:07:06 +05:30
Eklavya Sharma
1a77b599f6
Make tools/post-receive python 3 compatible.
2016-07-24 21:07:06 +05:30
Eklavya Sharma
00a120c34f
Improve a string in tools/post-receive.
2016-07-24 21:07:02 +05:30
Eklavya Sharma
ab8890b304
Annotate tools/check-templates.
2016-07-24 21:04:32 +05:30
Eklavya Sharma
2f889550cb
tools/check-templates: Use __init__ in Record.
...
Initialize Record by using __init__ instead of setting attributes
in validate. This is needed because mypy complains when we set
new attributes outside __init__.
2016-07-24 21:04:32 +05:30
Eklavya Sharma
ecf2249536
tools/check-templates: Set modified's default to False.
...
Set default value of options.modified to False.
2016-07-24 21:04:31 +05:30
Eklavya Sharma
9c177fcd1b
tools/check-templates: Remove unneeded return.
2016-07-24 21:04:31 +05:30
Eklavya Sharma
bd0fa3e77b
Annotate tools/lint-all.
2016-07-24 21:04:31 +05:30
Eklavya Sharma
ec6b630537
Make tools/run-mypy pass mypy check.
2016-07-24 21:04:22 +05:30
Eklavya Sharma
3d87c376c2
Make zulip-ec2-configure-interfaces pass mypy check.
2016-07-24 12:52:58 +05:30
Eklavya Sharma
0a5aa2ccc7
Make check_send_receive_time pass mypy check.
2016-07-24 12:41:06 +05:30
Eklavya Sharma
1820f961b3
frontend_tests/run-casper: Fix annotations.
2016-07-24 10:52:54 +05:30
Taranjeet Singh
5e34e5bf40
iframe-bot/show-last-messages: Fix line with length greater than 120.
2016-07-23 14:33:11 -07:00
Eklavya Sharma
11732f9ab0
Make all scripts in scripts/ pass mypy check.
2016-07-24 00:17:21 +05:30
Tim Abbott
226a57d2c8
travis: Disable test-queue-worker-reload temporarily.
...
It's failing nondetermistically pretty often, and I'd like to cut the
impact to other users' work.
2016-07-22 11:36:52 -07:00
Eklavya Sharma
fb59a07a89
Run mypy on extensionless python scripts in Travis.
2016-07-22 11:16:29 -07:00
Eklavya Sharma
f4c557d2a7
tools/run-mypy: Exclude scripts which don't pass mypy.
2016-07-22 11:16:29 -07:00
Eklavya Sharma
c12db5246d
Use separate exclude list for scripts.
2016-07-22 11:16:29 -07:00
Eklavya Sharma
102fcda4ab
tools/run-mypy: Add option --scripts-only.
...
This option is for checking only extensionless python scripts.
2016-07-22 11:16:29 -07:00
Eklavya Sharma
baa157344c
Patch activate script only in development.
2016-07-21 14:11:41 -07:00