Commit Graph

10829 Commits

Author SHA1 Message Date
Nathan Florea 5fe9076631 Remove some mutable default arguments.
These ones don't fix any bugs, because the mutable arg is never passed
outside of the callable or mutated.  But it's good practice to not use
them in case those invariants are changed in the future.
2016-06-03 09:16:56 -07:00
Nathan Florea 2e4283f60a api: Remove some mutable default arguments.
This could be more succinct with a conditional expression, but this is
easier to read.
2016-06-03 09:16:52 -07:00
Ashish Kumar 9b990e3bd0 Type annotation of zerver/views/alert_words.
[Tweaked by tabbott to annotate the REQ variables the new way]
2016-06-03 08:07:58 -07:00
Ashish Kumar 31bf6b8259 Type annotation of zerver/models.py
[Substantially revised by tabbott]

This probably still has some bugs in it, but having mostly complete
annotations for models.py will help a lot for the annotations folks
are adding to other files.
2016-06-02 23:28:34 -07:00
Tim Abbott 37015fd7c5 Run mypy on zerver/lib/test_auth_backends.py. 2016-06-02 23:01:15 -07:00
Tim Abbott 8cef9675c8 Run mypy on zerver/lib/test_events.py. 2016-06-02 23:00:04 -07:00
Tim Abbott e6d2b0cdbc Run mypy on zerver/lib/test_unread.py. 2016-06-02 22:59:00 -07:00
Tim Abbott f3b07ee9aa Run mypy on zerver/lib/test_subs.py. 2016-06-02 22:57:07 -07:00
Tim Abbott 1bdbdd1110 Run mypy on test files where it already passes. 2016-06-02 22:53:28 -07:00
Umair Khan 072551a94e Fix most redownloading in 'vagrant reload --provision'.
Fixes #264.
2016-06-02 22:32:56 -07:00
Oren Leaffer c2ce5119c6 Annotate zerver.views.tutorial. 2016-06-02 18:49:27 -07:00
Conrad Dean f8f2f45410 run-mypy: Add --linecount-report and --disallow-untyped-defs flags. 2016-06-02 18:45:52 -07:00
acrefoot cf15b0b4e6 Fix hanging nc and 'invalid wait time' error on Trusty.
Apparently, 0 isn't a supported wait time value in some versions of nc.
2016-06-02 18:02:13 -07:00
Rachel Kelly df36216914 Change instances of 'coworkers' to 'users'.
In order to genericize use of Zulip outside companies,
    all instances of coworkers have been changed to users.
    NOTABLE EXCEPTION: When the Zulip instance is domain-
    locked, the reference to coworkers remains.  The reason
    for this is twofold: first, the majority of Zulip instances
    which require a particular domain will be locked to a
    company, and second, the template variable for the domain
    necessary should be added to the alert so it is clear
    to the user what the domain needs to be for access.

Fixes: #861.
2016-06-02 16:05:27 -07:00
Pei-Wei Wu 8d2733ae8c Add mypy type annotations to zerver/views/streams.py. 2016-06-02 15:44:43 -07:00
Ashley Dunn 7826aa7e7f Type annotation of zerver/views/realm_emoji. 2016-06-02 14:01:28 -07:00
John Hampton d4dbcb80cc README.prod.md: Remove redundant unpacking of the tarball. 2016-06-02 10:32:52 -07:00
Taranjeet a45bde7822 Docs: Fix typos in docs. 2016-06-02 10:31:41 -07:00
Ashish Kumar cad342aff6 Correct annotation of generic_bulk_cached_fetch in zerver/lib/cache.py.
Previously, object_ids was tagged as an int, but it is called from
models.py with a string, so we make it an Any.
2016-06-01 14:00:49 -07:00
Tim Abbott 44929523d6 Harden extraction of AUTH_LDAP_BIND_PASSWORD. 2016-05-31 15:06:43 -07:00
Tim Abbott dac8f7d923 Fix buggy extraction of EMAIL_GATEWAY_PASSWORD.
EMAIL_GATEWAY_PASSWORD has a value of None in the defaults list, so it
will never fail to be in vars().
2016-05-31 15:06:17 -07:00
Tim Abbott fbc30c2914 test-all: Add a call to run-mypy.
Using mypy to check the codebase is stable and useful enough that it's
worth including it in the default tests run locally.
2016-05-31 15:00:15 -07:00
Tim Abbott c5b495b775 Update changelog with important changes since last release. 2016-05-31 11:39:47 -07:00
Sumana Harihareswara cb6ae3a766 Add anchor tags to README.md. 2016-05-31 11:27:21 -07:00
Tim Abbott d056b5601b docs: Add python-tyoing to RTD dependencies.
This should fix the RTD build having been broken since
d9c4be87d1.
2016-05-31 11:19:49 -07:00
Sumana Harihareswara 337155f280 Remove rST files to replace with Markdown.
Currently (https://github.com/rtfd/recommonmark/issues/3)
the recommonmark bridge (which allows Sphinx to read
Markdown) does not support tables, so the directory structure
doc is now a bulleted list instead of a set of tables.
2016-05-31 10:55:49 -07:00
Sumana Harihareswara e0bc57ddb1 Rearrange docs table of contents for coherence.
The order and structure of the Read The Docs documentation
was fairly arbitrary; here's a suggestion for how to change
its information architecture so it's more useful to a new
contributor. This adds a short Zulip overview, and a table
of contents and code contribution intro for new contributors.

Fixes: #668.

Signed-off-by: Sumana Harihareswara <sumanah@panix.com>
2016-05-31 09:07:09 -07:00
Sumana Harihareswara 3029b3681f Rearrange sections of testing doc for coherence. 2016-05-31 09:05:38 -07:00
Sumana Harihareswara f65778f1e2 Improve sub-headings in documentation.
Signed-off-by: Sumana Harihareswara <sumanah@panix.com>
2016-05-31 09:05:38 -07:00
Sumana Harihareswara 86f7695b8c Fix style, formatting in Bugdown docs. 2016-05-31 08:56:58 -07:00
Sumana Harihareswara ad644afa97 Improve code style guidelines. 2016-05-31 08:56:58 -07:00
Sumana Harihareswara 3631cf3078 Add links in front end build process doc.
Signed-off-by: Sumana Harihareswara <sumanah@panix.com>
2016-05-31 08:56:58 -07:00
Tomasz Kolek 0820ab591a Refresh page when message with /me is edited.
Fixes: #163.

Thanks to Catherine Nguyen (@cnguye11) for her work on this.
2016-05-31 08:29:07 -07:00
Tim Abbott 3ed78eb746 docs/testing: Clean up discussion of rebuilding database. 2016-05-31 07:48:00 -07:00
Christie Koehler e06492ec3a Improve first-time contributor docs.
Fixes #747. Fixes #748.

This updates README.dev.md to include clear, step-by-step instructions
for setting up the Zulip dev environment Windows 10, OS X El Capitan,
Ubuntu 14.04 Trusty, and Ubuntu 16.04 Xenial. It is aimed at first-time
contributors.

I tested these instructions multiple times on each of the target
systems.

Also added is a "trobleshooting and common errors" section which
documents the most common errors contributors are likely to encounter
during setup and how to fix them.

Improvements based on feedback from @timabbott.

- Fixes whitespace issues so linter will pass.
- Updates memory requirement.
- Re-orders so operating systems are listed alphabetically.
- Updates headings to be clearer.
- Updates and adds ToC entries for clarity.
- Adds screen shot of Zulip dev environment running in browser.
- Adds details about using dev environment, including about logging.
- Misc other minor changes for clarity.
- Adds a stub for docs/logging.md
- Adds details about configuring Cygwin for native symlinks.
2016-05-31 07:47:45 -07:00
Umair Khan bd4e471706 Check json_error and JsonableError in linter.
Mainly the check is to ensure that all the strings that pass through
these two functions are captured by `makemessages`.
2016-05-31 07:40:42 -07:00
Umair Khan 08fbd57245 [i18n] Make error messages translatable.
Make all strings passing through `json_error` and `JsonableError`
translatable.

Fixes #727
2016-05-31 07:40:42 -07:00
Umair Khan 4b28fcd2f3 Add option to linter to exclude lines from files. 2016-05-31 07:40:42 -07:00
Tim Abbott ab2d325a08 Update production default streams to be less engineering-centric. 2016-05-31 07:38:25 -07:00
Vishnu Ks 100d885f23 Change default announcement stream to announce.
Fixes #788.
2016-05-31 07:38:07 -07:00
Tim Abbott 960144a49e Desupport using uninstantiated REQ with has_request_variables.
This makes life difficult for doing static type annotations, and
didn't make the code look that much better anyway.
2016-05-31 07:31:15 -07:00
Tim Abbott 41336f3782 lint-all: Check for use of '== None'. 2016-05-31 07:02:04 -07:00
Umair Khan 9a57176ad6 Do shallow testing of backend templates.
Just render the templates without the actual workflow to see if they
don't return a 500 error; this lets us catch various classes of
template bugs automatically.

Fixes #784.
2016-05-31 05:42:17 -07:00
Umair Khan c884559ec6 Show templates rendered report.
Add two options to the `test-backend` script:

1. verbose
    If given the `test-backend` script will give detailed output.
2. no-shallow
    Default value is False. If given the `test-backend` script will
    fail if it finds a template which is shallow tested.
2016-05-31 16:46:11 +05:00
Umair Khan daf3d51d4b Send 'template_rendered' signal from Jinja2.
Send the signal only under DEBUG=True just like Django.
2016-05-31 14:31:13 +05:00
Umair Khan 29859c191d Call url correctly from password_reset_email.txt.
In Jinja2 the url function is called differently. We can't give keyword
arguments directly instead we need to pass them through kwargs argument.
2016-05-30 21:05:03 -07:00
Tomasz Kolek ff4e92dc3d settings: change tab indentation to space. 2016-05-30 20:16:00 -07:00
Greg Price 436499a129 Clean up some relative-path handling in lister using Git magic
This lets us cut out the line which hard-codes how deeply nested in
the tree the `run-mypy` script is, making it simpler to borrow these
scripts in other projects.
2016-05-30 20:01:37 -07:00
Tomasz Kolek 8e144a1f57 Add zip and absoulte_import to pass py3k test. 2016-05-30 22:28:05 +02:00
Tim Abbott baec0f12cf Add a proper annotation for REQ in streams.py. 2016-05-30 11:41:16 -07:00