Eklavya Sharma
d9eb711e5e
zerver/tests/test_helpers.py: Use text_type for api_keys.
...
Also encode/decode strings appropriately when using api_keys to generate
basic auth header.
Also fix clashing annotations in zerver/tests/test_external.py.
2016-06-29 01:50:38 +05:30
Eklavya Sharma
eb3bde40a0
zerver/lib/test_helpers.py: Improve type annotations.
2016-06-29 01:35:34 +05:30
Eklavya Sharma
97760702a8
zerver/lib/actions.py: Use Sequence as parameter type.
2016-06-29 01:11:41 +05:30
Eklavya Sharma
dca9256f3c
zerver/lib/socket.py: Improve annotations.
...
* Add Optional where required.
* Set type of req_redis_key as `(text_type) -> text_type` for consistency.
Almost all our cache keys and redis keys use this signature.
2016-06-29 00:45:13 +05:30
Tim Abbott
4aae4de294
Properly cache production virtualenvs in Travis CI.
...
Previously, the --travis argument wasn't available to the `setup_venv`
code when creating the production virtualenv.
2016-06-28 12:04:11 -07:00
Tim Abbott
7ed0ab8c4a
Ensure Zulip virtualenvs are world-readable.
...
This is important for both ensuring the Nagios checks work correctly
in production, as well as making sure the `zulip` user can access the
virtualenv (owned by the `travis` user) in Travis CI.
2016-06-28 12:03:01 -07:00
Eklavya Sharma
b305af05b3
Fix string annotations in custom cursors.
2016-06-28 15:58:57 +05:30
Eklavya Sharma
1a00b08a11
zerver/lib/db.py: Use a type alias to shorten annotations.
2016-06-28 15:57:43 +05:30
Tim Abbott
4a7913bc22
setup_venv: Use correct VENV_CACHE_PATH for production suite.
2016-06-27 21:16:22 -07:00
Tim Abbott
fd7cb3fc2b
docs: Fix hardcoding of links to zulip.readthedocs.io.
...
This makes things work better if you're testing the documentation
locally.
2016-06-27 20:54:21 -07:00
Tim Abbott
31f7fb2fa0
docs: Fix new feature tutorial link to testing docs.
2016-06-27 20:52:20 -07:00
Tim Abbott
40aa8a2336
clean-venv-cache: Fix python 3 compatibility.
2016-06-27 20:39:22 -07:00
Tim Abbott
404c61ba97
clean-venv-cache: Use better approach to pruning caches.
...
Rather than looking at which venvs are used by this particular build,
we instead look at which venvs have a hash that is the hash_reqs value
of a current requirements.txt file.
2016-06-27 20:30:39 -07:00
Tim Abbott
7d5c1864f7
clean-venv-cache: Avoid cleaning production venvs.
2016-06-27 20:08:45 -07:00
Katerina Kampardi
707df7b55b
README.dev.md: Clarify location of Zulip's root directory.
...
This adds some specifications for noobies - like me - while installing
the dev environment with vagrant on Ubuntu 14.04
2016-06-27 20:04:31 -07:00
Eklavya Sharma
7a98d7bd24
manifests/base.pp: Remove apt python package dependencies.
2016-06-27 19:55:35 -07:00
Eklavya Sharma
ebad1415c0
app_frontend_base.pp: Remove apt python package dependencies.
2016-06-27 19:55:35 -07:00
Eklavya Sharma
a9835c0ab2
Activate virtualenv in production Python code.
...
The manage.py change effectively switches the Zulip production server
to use the virtualenv, since all of our supervisord commands for the
various Python services go through manage.py.
Additionally, this migrates the production scripts and Nagios plugins
to use the virtualenv as well.
2016-06-27 19:55:35 -07:00
Eklavya Sharma
64affb83f9
Create a virtualenv when installing/upgrading production instances.
2016-06-27 19:55:11 -07:00
Eklavya Sharma
bbd24168b6
requirements/prod.txt: Add netifaces, flup and python-dateutils.
...
netifaces is used in puppet/zulip_internal/files/zulip-ec2-configure-interfaces.
flup is used for fastcgi.
python-dateutils is used in some puppet scripts.
2016-06-27 19:12:32 -07:00
Tim Abbott
beb8b50623
Move provision.py under tools/.
2016-06-27 19:04:32 -07:00
Tim Abbott
e1860e5b46
Remove tools/provision/zulip-dev.conf.
...
This was originally supervisord configuration for the Zulip
development environment; it never really worked how we wanted it to.
2016-06-27 19:04:32 -07:00
Tim Abbott
32eb021434
Make provision.py executable.
2016-06-27 19:04:23 -07:00
acrefoot
7ff89dc137
Add markdown-specific whitespace lint rule to /tools/lint-all.
...
Match one space or three+ spaces after content, or positive
number of spaces on an empty line.
2016-06-27 18:43:20 -07:00
acrefoot
acd7ff7aff
Fix typo in Recipient comment.
2016-06-27 18:34:02 -07:00
acrefoot
a36e5d4987
Add get_auth_backends endpoint to API.
...
We would like to know which kind of authentication backends the server
supports.
This is information you can get from /login, but not in a way easily
parseable by API apps (e.g. the Zulip mobile apps).
2016-06-27 18:30:34 -07:00
Umair Khan
3115e13caf
Remove extra call to i18n.t.
2016-06-27 14:17:47 -07:00
Aakash Tyagi
7a9a7189ae
Added help text for running single casper tests.
...
[formatting tweaked by tabbott]
2016-06-27 14:15:32 -07:00
Aakash Tyagi
9154d93669
Added help text for running single backend tests.
2016-06-27 14:15:30 -07:00
Tim Abbott
e72f41cdec
Remove old prototype data import/export tool.
...
This prototype from Dropbox Hack Week turned out to be too inefficient
to be used for realms with any significant amount of history, so we're
removing it.
It will be replaced by https://github.com/zulip/zulip/pull/673 .
2016-06-27 13:47:08 -07:00
Tim Abbott
101820bc29
Move docker development environment scripts to tools/.
...
scripts/ is for scripts which are used in production.
2016-06-27 13:38:06 -07:00
Tim Abbott
879ca4b9ea
docs: Add documentation on HTML and CSS.
2016-06-27 12:38:53 -07:00
Tim Abbott
74d86449e4
README.dev.md: Cleanup docs on testing.
2016-06-27 12:38:53 -07:00
Tim Abbott
292556c846
docs: Expand RTD testing section.
2016-06-27 12:38:53 -07:00
Tim Abbott
b2a24e0306
Revert "Add authorization check before serving files."
...
This reverts commit e985b57259
.
This commit will break production when we next do a release, because
we haven't done a migration to create Attachment objects for
previously uploaded files.
2016-06-27 12:09:56 -07:00
Tim Abbott
f7e87bc1f0
test_helpers: Require that login calls actually succeed.
...
This caught several bugs where test code wasn't doing what it's author
intended.
2016-06-27 11:51:04 -07:00
Tim Abbott
4cac7bbb32
test_helpers: Refactor login test helpers.
...
We now have a separate login helper for the case where the return
value is desired.
2016-06-27 11:50:43 -07:00
Tim Abbott
a05c03d3b5
test_messages: Fix trying to login as a bot user.
...
Due to a recent refactoring, the first user in the subscribers list is
now a bot.
2016-06-27 11:48:39 -07:00
Tim Abbott
370b38696a
test_messages: Fix broken huddle messages test.
...
The second login call was failing because the user didn't exist.
2016-06-27 11:48:36 -07:00
rahuldeve
e985b57259
Add authorization check before serving files.
2016-06-27 11:24:35 -07:00
rahuldeve
674def30ee
Add support for serving files using API authentication.
...
Also remove 'get_uploaded_file' view function and the corresponding
old '/user_upload/' url pattern.
2016-06-27 11:00:41 -07:00
rahuldeve
2bf15603f3
Modify rest_dispatch to support method specific flags.
...
[simplified substantially by tabbott]
2016-06-27 10:53:15 -07:00
rahuldeve
823bf15c6e
Add API route for uploading files.
2016-06-27 10:30:58 -07:00
Tim Abbott
79570f99c2
json_upload_file: Remove unnecessary has_request_variables.
2016-06-27 10:29:30 -07:00
Tim Abbott
8272fb4a94
zerver.views.upload: Move upload functions later in file.
2016-06-27 10:28:09 -07:00
Eklavya Sharma
e155573a1c
zilencer's populate_db.py: Type annotate all variables.
2016-06-27 10:22:49 -07:00
Eklavya Sharma
8cacd5fcf8
zilencer's populate_db.py: Type annotate some variables.
2016-06-27 21:00:10 +05:30
Eklavya Sharma
ea3c671494
zilencer's populate_db.py: Improve an annotation.
2016-06-27 21:00:10 +05:30
Eklavya Sharma
66d1867869
zilencer's populate_db.py: Fix string types.
2016-06-27 21:00:10 +05:30
Eklavya Sharma
a9fa78fc4a
api/zulip/__init__.py: Make compatible with newer mypy.
2016-06-27 21:00:09 +05:30