Commit Graph

2419 Commits

Author SHA1 Message Date
Vishnu Ks
36f29764cb emails: Add option to forward mails send in dev env to external email.
Fixes #7085.
2017-11-14 15:27:29 -08:00
Tim Abbott
ac763d6eed tools: Remove obsolete build-deb tool.
This hasn't been used in ages, and isn't useful with the current
codebase.
2017-11-14 15:22:26 -08:00
rht
72ce1c6501 Use a more concise mkdir -p when the situation permits. 2017-11-14 09:47:09 -08:00
Steve Howell
ba51078418 Simplify CSS linter and clean up CSS.
The CSS linter was pretty hard to reason about.  It was
pretty flexible about certain things, but then it would
prevent seemingly innocuous code from getting checked in.

This commit overhauls the pretty-printer to be more composable,
where every object in the AST knows how to render itself.  It
also cleans up a little bit of the pre_fluff/post_fluff logic
in the parser itself, so comments are more likely to be "attached"
to the AST node that make sense.

The linter is actually a bit more finicky about newlines, but
this is mostly a good thing, as most of the variations before
this commit were pretty arbitrary.
2017-11-13 12:43:43 -08:00
Vishnu Ks
50eb3be0c2 droplets: Remove ip_address default value from create_dns_record.
I forgot to remove the default value 172.31.1.4 from
ip_address which was used only for testing purpose.
2017-11-11 17:05:14 -08:00
rht
f397e15128 tools: Text-wrap long lines exceeding 110. 2017-11-10 16:24:09 -08:00
rht
7a96b8c7ad tools/lib: Text-wrap long lines exceeding 110. 2017-11-10 16:24:09 -08:00
Vishnu Ks
07e6a4fb2d droplets: Add wildcard A records to support realm subdomains. 2017-11-10 16:13:53 -08:00
rht
5ff690d486 zulip-export: Convert to using argparse from optparse. 2017-11-10 15:54:02 -08:00
rht
f689813f38 test-js-with-node: Port from optparse to argparse. 2017-11-10 15:52:43 -08:00
Cynthia Lin
0b800b0a7d icons: Create framework for custom icons and add new bot icon. 2017-11-10 11:18:42 -08:00
neiljp (Neil Pilgrim)
fec59b29cd Tools/mypy: Enforce typed generics in tools/run-mypy.
This adds the "--disallow-any=generics" option to run-mypy, which no
longer permits:
- inheriting from "list"; use "List[sometype]" (or a TypeVar)
- generic types with no following square brackets specifying the type
  (even if initially 'Any')

Any (and '...' for Callable) is a lot easier to search for than an
absence of square brackets, and should improve overall typing quality.
2017-11-08 12:40:40 -08:00
derAnfaenger
c9d438d149 linter: Add example lines for several python rules. 2017-11-08 11:18:37 -08:00
derAnfaenger
dbc1f83d3a linter: Make string formatting custom rule more complete. 2017-11-08 11:16:18 -08:00
derAnfaenger
88794ea361 linter: Fix tests ignoring rules with include_only. 2017-11-08 11:16:18 -08:00
rht
9c7d5812ce refactor: Remove six.moves.urllib.parse import. 2017-11-07 10:51:44 -08:00
rht
ccf2792c1c refactor: Remove six.moves.configparser import. 2017-11-07 10:51:44 -08:00
rht
6b12fe24b6 refactor: Remove six.moves.input import. 2017-11-07 10:51:44 -08:00
rht
6cce0e346e refactor: Remove six.moves.filter import. 2017-11-07 10:51:44 -08:00
rht
80a8d4f9f3 refactor: Remove six.moves.map import. 2017-11-07 10:46:42 -08:00
rht
549a26860f refactor: Remove six.moves.range import. 2017-11-07 10:46:42 -08:00
rht
ec5120e807 refactor: Remove six.moves.zip import. 2017-11-07 10:46:42 -08:00
Vishnu Ks
c5ff020246 droplets: Garbage collect A records before creating droplet. 2017-11-06 12:20:39 -08:00
Rishi Gupta
dec4b9ed93 remote dev: Add code and instructions for creating digital ocean droplets.
Mostly copied from the zulip/zulip-gci repository, but with some changes to
wordings and code cleanup for linters.
2017-11-06 12:20:39 -08:00
rht
e3eebf3be0 Remove inheritance from object. 2017-11-06 08:53:48 -08:00
neiljp (Neil Pilgrim)
737408f741 mypy: Add explicit flexible type parameters for Callable in run-dev.py. 2017-11-04 19:47:44 -07:00
neiljp (Neil Pilgrim)
9f90a3174b mypy: Add explicit Any as Dict parameters in check_line_coverage in test-js-with-node. 2017-11-04 19:47:44 -07:00
neiljp (Neil Pilgrim)
abc0d5e79b mypy: Add type parameter for Set in check_help_documentation.py. 2017-11-04 19:47:44 -07:00
neiljp (Neil Pilgrim)
a5d1fdf0d6 mypy: Add type parameter for IO in test-queue-worker-reload. 2017-11-04 19:47:44 -07:00
neiljp (Neil Pilgrim)
dac67ebe67 mypy: Remove un-necessary comment re mypy issue #3145.
RuleList is required at global scope now, for later functions.
2017-11-04 19:22:06 -07:00
neiljp (Neil Pilgrim)
05ef052ef5 mypy: Improve typing in custom_check_file() in custom_check.py. 2017-11-04 16:18:27 -07:00
rht
dcc831f767 refactor: Replace all __unicode__ method with __str__.
Close #6627.
2017-11-02 11:01:47 -07:00
Tim Abbott
d27002ba21 landing-page: Replace /about with /team and /history in links. 2017-10-31 12:44:05 -07:00
neiljp (Neil Pilgrim)
966d5f3760 mypy: Specify Callable parameter/return type for run decorator in tools/diagnose. 2017-10-31 00:03:35 -07:00
Tim Abbott
f01f596138 help: Merge api.js and help.js bundles to fix code blocks.
In addition to decreasing the excessive number of bundles we had, this
will set us up to fix rendering of code blocks when clicking the
sidebar links in the /api-new site.
2017-10-30 22:53:17 -07:00
Brock Whittaker
e86e259cb1 /api/: Add Markdown-based /api-new documentation.
This commit allows for the /api-new/ page to rendered similarly to our
/help pages.  It's based on the old content for /api, but we're not
replacing the old content yet, to give a bit of time to restructure
things reasonably.

Tweaked by eeshangarg and tabbott.
2017-10-30 22:32:43 -07:00
Greg Price
eb55a3a1ba template context: Give better names to the URLs for the API.
The "subdomain" label is redundant, to the extent it's even
accurate -- this is really just the URL we want to display,
which may or may not involve a subdomain.  Similarly "external".

The former `external_api_path_subdomain` was never a path -- it's a
host, followed by a path, which together form a scheme-relative URL.
I'm not quite convinced that value is actually the right thing in
2 of the 3 places we use it, but fixing that can start by giving an
accurate name to the thing we have.
2017-10-30 18:29:29 -07:00
rht
c4fcff7178 refactor: Replace super(.*self) with Python 3-specific super().
We change all the instances except for the `test_helpers.py`
TimeTrackingCursor monkey-patching, which actually needs to specify
the base class.
2017-10-30 14:30:25 -07:00
Brock Whittaker
8c9579eb86 webpack.assets.json: Add a custom JS bundle for /api.
Note that we also need the JS bundle for /help because that
includes the JS code for our sidebar dropdowns.
2017-10-29 18:18:32 -07:00
Harshit Bansal
1067cfd92a node_modules: Add npm packages for the supported emojisets.
This commit adds emoji datasource packages for the rest of the emojiset
packages which we will use for serving images in notifications.
2017-10-28 10:38:32 -07:00
Tim Abbott
0d1194811f mypy: Remove ignores for a few typeshed bugs fixed upstream. 2017-10-27 17:09:00 -07:00
Tim Abbott
8d00111a27 vagrant: Skip the shell virtualenv warning on provision. 2017-10-27 11:44:47 -07:00
rht
e296841447 tools/documentation_crawler: Use python 3 syntax for typing. 2017-10-26 21:58:22 -07:00
Tim Abbott
8e2cdedf9a lint: Fix lines in Python codebase longer than 120 characters. 2017-10-26 17:47:30 -07:00
Tim Abbott
b936e8c24b lint: Fix lines in Python codebase longer than 125 characters. 2017-10-26 17:36:54 -07:00
Tim Abbott
be619fe881 lint: Wrap many very long lines in the Python codebase.
This decreases the maximum line length in our Python codebase to 130.
2017-10-26 17:31:58 -07:00
Greg Price
4a6e867046 lint: Disable a buggy pep8 rule on line breaks and operators.
I'd much rather see something like

    if (thing_is_permissible(user, thing)
            or (user_possesses_hammer(user)
                and glass_break_requested(thing))):

than

    if (thing_is_permissible(user, thing) or
            (user_possesses_hammer(user) and
                glass_break_requested(thing))):

because the former makes the overall logic much easier to scan.
Similarly for a formula full of arithmetic rather than Boolean
operators.  And the actual PEP 8 agrees (though until 2016 it
unfortunately had the opposite advice.)

The upstream linter still applies the backward rule, so disable that.
2017-10-26 10:29:17 -07:00
Brock Whittaker
a9a9333b2a portico: Show whether the user is logged in.
This creates a dropdown in place of the normal register/login links
you get when logged out, with an option to go to the app or log out if
that appears you click on the avatar.

A bit more work is needed to make this look really good, but it's a
great start.
2017-10-25 14:59:24 -07:00
Aditya Bansal
0ddad98c98 features.html: Cleanup to use 4 space and consistant indentation. 2017-10-25 10:58:57 -07:00
Aditya Bansal
3fb0f7c092 home.html: Cleanup to use 4 space indentation.
Tweaked by tabbott to also make the translation tags make more sense.
2017-10-25 10:58:49 -07:00