Commit Graph

1331 Commits

Author SHA1 Message Date
Steve Howell 59750a1cb9 Move more unread logic out of stream_list.js.
There are two split-outs code of the code here:

    - Animation stuff is in unread_ui.js.
    - PM unread counts get handled by pm_list.js.
2016-11-14 17:50:55 -08:00
Umair Khan 3d3800314f Django 1.10: Setup django before running queue processors. 2016-11-14 16:09:12 -08:00
Steve Howell 7b0c6459b4 Extract static/js/pm_list.js.
This handles most of the details of building the Private Messages
section in the upper left corner of the app.
2016-11-11 12:12:13 -08:00
Umair Khan 07d73996d4 Django 1.10: Add tool to check urls.
Checking urls through linter was proving to be difficult as
the urls can span multiple lines.
2016-11-10 16:20:04 +05:00
Shashank 702d3cf103 Check provision version in run-dev.py.
Don't start run-dev.py if the provisioning version is
incorrect.
2016-11-09 16:06:16 -08:00
paxapy 6d93b3b60c lint: Fix E703 pep8 violations. 2016-11-09 15:18:35 -08:00
paxapy 456e761294 lint: Add pep8 checker to the project.
We set this up initially with all of the rules that Zulip violates
disabled.

Also, the pep8 linter is substantially slower than the other Zulip
linters, so we've put it behind an option to `tools/lint-all`.
2016-11-09 15:17:49 -08:00
Tim Abbott 44767c59a2 Coverage: Exclude migrations and management commands.
These are not particularly interesting to measure test coverage for,
since migrations are not run as the part of the test suite by
construction, and management commands aren't being tested by this test
suite.
2016-11-06 18:34:23 -08:00
Tomasz Kolek 704ac5aa6c Fix lint-all checker by adding "_" as a escape character before Github. 2016-11-05 22:12:25 -07:00
Tim Abbott ee361cbe30 js: Eliminate process_loaded_for_unread global. 2016-11-05 11:33:04 -07:00
sonali0901 df4b777b35 tests: Fix handling of subdirs and backup files in test-backend.
Fixes #1950.
2016-11-04 21:49:23 -07:00
umkay b5b8623f46 analytics: Update linter to ignore interpolation in test_counts.
Ignore whitespace error for % interpolation in sql queries.
2016-11-03 16:50:39 -07:00
Tim Abbott a93530e413 Remove unused route for development tornado proxy server.
This was a duplicate of the other sockjs line.
2016-11-03 10:46:18 -07:00
Tim Abbott 50361ca980 test-run-dev: Fix buggy site argument.
This bug was exposed by 9578908601.
2016-11-03 09:34:56 -07:00
K.Kanakhin b248a2c33e docs-test: Check only http 404 error for external links.
- Raise exception only for http 404 error rensponse, for other
  http error codes used logging to notify devs about wrong links.
2016-11-01 21:45:41 -07:00
K.Kanakhin 870de03ede run-dev: Add websockets support to tornado dev proxy server.
Fixes #1036.
2016-11-01 20:35:31 -07:00
K.Kanakhin 09e17fbe17 run-dev: Use tornado for dev proxy server for HTTP requests.
- Use tornado as proxy server for development environment,
  replacing twisted (this doesn't support websockets).
- Upgrade tornado version to 4.4.1 (needs to be coupled to the
  above since neither change works without the other)
2016-11-01 20:35:31 -07:00
Tim Abbott 6a8f8c2abf run-dev: Fix minor whitespace issues. 2016-11-01 20:27:44 -07:00
Tim Abbott 4fe5fc849e travis: Disable test-documentation temporarily. 2016-10-28 11:27:22 -07:00
Tim Abbott 9b7a3f040c Remove now-unused /json/get_events endpoint. 2016-10-27 21:34:58 -07:00
Steve Howell 4f38cfdc7f Extract topic_list.update_count_in_dom().
This creates the new topic_list.js module, and the first
function that we extract is topic_list.update_count_in_dom().

This function needed to be decoupled from some non-topic-list
stuff which was overly complicated.
2016-10-27 15:49:25 -07:00
Tim Abbott 76fd7c0735 provision: Fix creation of cache directories. 2016-10-27 12:05:43 -07:00
K.Kanakhin 63f0e04621 docs-test: Exclude remote servers internal response errors.
Sometimes remote servers are unavailable or on maintance
what is the cause of broken back-end tests. Such response errors
is excluded from raised exception cases and just notify about
wrong link in test log.
2016-10-26 01:00:33 -07:00
Tim Abbott 129f1472fb provision: Fix hardcoding of current user.
This fixes a regression in 8e82257444
and 2b8324b778.
2016-10-25 21:58:15 -07:00
Tim Abbott 2b8324b778 emoji: Fix caching permissions issues.
Previously, you needed to be root to update the emoji cache, which
caused problems with how Zulip is upgraded in production.
2016-10-25 17:52:19 -07:00
Tim Abbott 8e82257444 Fix node_cache code to not require root.
The previous code caused problems using a system where the zulip user
doesn't have sudo rights.
2016-10-25 17:52:19 -07:00
Tim Abbott 442f3a91e5 test-documentation: Add pretty success/failure output. 2016-10-25 11:41:12 -07:00
K.Kanakhin 455301ca13 docs-test: Add documentation test scripts to backend test case.
- Add script to compile documentation build and start crawler
  to check documentation.
- Add documentation test script to backend travis test case.
- Add log level argument to test-documentation script.

Fixes #1492
2016-10-25 11:36:43 -07:00
K.Kanakhin 6b31fcd63a docs-test: Add scrapy crawler to check documentation not having broken links.
- Add scrapy project with rewrited 'crawl' command and spider to check documentation.
  Command was rewrited due to return exit status by the exception existing,
  it returns exit code 0 if exception happens inside spider in standard behavour.

- Add scrapy requirements to for dev environment. It was added to twisted requirements list.

Fixes #1492
2016-10-25 11:35:16 -07:00
deekshaarul be903382f8 lint: Add rule to check for misspellings of 'GitHub'. 2016-10-22 17:09:55 -07:00
Umair Khan a2c57db630 Use argparse in provision.py 2016-10-21 08:35:30 -07:00
Prabhakar Gupta bc6421fbfb tools: Remove empty wrapper script build_emoji.
This renames the old `emoji_dump.py` to `build_emoji`, removing the
old shell essentially empty shell script.  `emoji_dump.py` was always
a weird name, and this makes it a bit easier to read the code for this
system.
2016-10-20 22:57:45 -07:00
Tim Abbott f9f8b18e2f lint: Ban use of json_success({}) instead of json_success(). 2016-10-20 22:34:04 -07:00
Umair Khan 041cd6c787 Add --force argument to provision.py.
Fixes: #2026
2016-10-20 22:04:52 -07:00
Umair Khan 35dea5246c Regenerate test DB only when template DB has changed. 2016-10-20 22:04:52 -07:00
Tim Abbott 4a4664d268 mypy: Remove a bunch of now-unnecessary type: ignore annotations.
Since mypy and typeshed have advanced a lot over the last several
months, we no longer need these `type: ignore` annotations.
2016-10-17 11:48:34 -07:00
Tim Abbott 36e336edc3 puppet: Rename zulip_internal to zulip_ops.
The old "zulip_internal" name was from back when Zulip, Inc. had two
distributions of Zulip, the enterprise distribution in puppet/zulip/
and the "internal" SAAS distribution in puppet/zulip_internal.  I
think the name is a bit confusing in the new fully open-source Zulip
work, so we're replacing it with "zulip_ops".  I don't think the new
name is perfect, but it's better.

In the following commits, we'll delete a bunch of pieces of Zulip,
Inc.'s infrastructure that don't exist anymore and thus are no longer
useful (e.g. the old Trac configuration), with the goal of cleaning
the repository of as much unnecessary content as possible.
2016-10-16 19:23:27 -07:00
Steve Howell 6e628e23aa Add --force option to test-backend. 2016-10-16 14:52:14 -07:00
Steve Howell 10667b3cdb Check provisioning status in tools/test-backend. 2016-10-16 14:52:14 -07:00
Steve Howell 8bc027e71b Add tools/lib/test_script.py w/get_provisioning_status(). 2016-10-16 14:52:13 -07:00
Steve Howell 37842d5d15 Have provision.py write to var/provision_version. 2016-10-16 14:44:45 -07:00
Tim Abbott df617225fd lint-all: Check for untranslated placeholders in handlebars templates. 2016-10-16 12:59:41 -07:00
Sumana Harihareswara a4ac09cb8f Clarify comment on empty json_rules list.
Fixes: #2030.
2016-10-16 12:28:16 -07:00
Sumana Harihareswara bef73be824 lint: Improve documentation lint check for JavaScript capitalization.
Move JavaScript capitalization rule to new ruleset for HTML and
Markdown checkers to run, and add exclusion to avoid catching
URLs and divs/hrefs. Also fix affected HTML pages, and remove
now-obsolete exclusion for doc that no longer exists.

For exhaustive thought-process on this change see:
https://zulip.tabbott.net/#narrow/stream/test.20suites/topic/watch.20over.20my.20shoulder.20as.20I.20improve.20the.20linter
2016-10-16 12:28:16 -07:00
Tim Abbott fc20c86d8d install: Move apt-get update into setup-apt-repo. 2016-10-16 01:13:50 -07:00
Tim Abbott cf6feac65f provision: Remove unnecessary second apt-get update.
Since we do this slightly later (after setting up our apt repository,
where it's actually required), there's no need to do this here.
2016-10-16 01:13:50 -07:00
Tim Abbott 217212b773 run-mypy: Use the experimental new mypy cache.
This makes iteratively running mypy approximately 5x faster.

Fixes #1981.
2016-10-15 22:57:11 -07:00
Tim Abbott 9e503f2dcf run-mypy: Check scripts by default.
Previously, we checked scripts in a separate run to work around mypy
not supporting multiple scripts with the same name.  Since we have
fixed that issue, we can restore the original behavior.

We leave the --scripts-only option available, though I'm not sure it's
particularly useful and we'll probably eventually remove it.
2016-10-15 22:53:29 -07:00
Tim Abbott 4dbdf7e373 run-mypy: Consolidate exclude lists. 2016-10-15 22:53:29 -07:00
Tim Abbott 67e9f35f6f run-mypy: Use new --scripts-are-modules argument.
This allows us to check all the Zulip scripts in just 3s, rather than
inefficiently looping through all the Zulip scripts.
2016-10-15 22:53:29 -07:00