Commit Graph

923 Commits

Author SHA1 Message Date
Tim Abbott e996579045 bots: Clean up supervisord documentation. 2017-08-29 09:56:56 -07:00
Robert Hönig 0c905e2f3c bots-guide.md: Describe Zulip Botserver setup with supervisord. 2017-08-29 09:56:56 -07:00
Supermanu 3be14833f0 docs: Add a french translation style guide. 2017-08-29 09:40:03 -07:00
Robert Hönig 5f220359bd bots-guide.md: Refactor Zulip Botserver guide.
Tweaked by tabbott to give greater priority to the explanation of what
it is.
2017-08-28 17:34:54 -07:00
Sarah e280a5f8e8 docs: Update new feature tutorial.
Update new feature tutorial to describe recent changes
to the backend and front end processes based on
refactoring.
2017-08-27 11:37:43 -07:00
rht 437b2a3146 Update "MacOS" text to "macOS" 2017-08-26 09:00:42 -07:00
Tim Abbott 69059dcac8 tests: Clean up subscribing from webhook tests. 2017-08-24 21:37:57 -07:00
Tim Abbott 1c9521a8d6 docs: Fix buggy relative documentation link. 2017-08-24 19:59:59 -07:00
Robert Hönig 18a080cd6c Don't handle json payload key errors inside webhooks.
Fixes first part of #6213.
2017-08-24 11:33:14 -07:00
Tim Abbott 30e1aada42 docs: Stop documenting how to create multiple organizations.
This documentation wasn't super helpful, since users will want
REALMS_HAVE_SUBDOMAINS.
2017-08-23 20:07:17 -07:00
Tim Abbott a6ab3269d2 docs: Clean up headings on new existing server instructions. 2017-08-23 15:11:23 -07:00
Tim Abbott a397e92fb3 docs: Fix problematic line-wrapping. 2017-08-23 15:10:35 -07:00
Hobson Lane a647f7bf9f docs: Add tips on installing on an existing server. 2017-08-23 14:53:14 -07:00
Vaida Plankyte 5549a9fc78 docs: Move template section from translating.md to html-templates.
Fixes #1649.
2017-08-23 13:43:29 -07:00
Umair Khan 8171b0ea25 i18n: Add unescape documentation. 2017-08-23 00:23:16 -07:00
Robert Hönig 1e4283aabf docs: Update bots-guide.md to reflect current APIs.
Tweaked by tabbott to do some line-wrapping and small edits.
2017-08-22 23:46:20 -07:00
Tim Abbott 8dff14430e tools: Remove old python 3 compatibility checker.
Now that we've migrated over to Python 3, this tool is no longer required.

Fixes #6217.
2017-08-22 14:58:59 -07:00
Robert Hönig 84a7350de6 docs: Clarify webhook-specific guides. 2017-08-22 10:38:48 -07:00
rht 80f4ba7a76 requirements: Replace py3_dev.txt with dev_lock.txt. 2017-08-22 10:10:57 -07:00
David Taylor 0ffc758129 Add 'category' to WebhookIntegration definition 2017-08-21 14:58:38 -07:00
Greg Price 78b41f375d py3: Revise and update shebang discussion in docs/shell-tips.
This keeps the examples in line with our actual codebase.

Also while I'm here revise it to explain the actual motivation for our
use of `env`, and to correct some subtle details -- it's actually the
kernel that interprets the shebang (as visible in e.g. a `strace` log),
not the shell, and when the program is executed as `./my_program.py`
the exact name including `./` is passed to the interpreter.
2017-08-16 17:54:43 -07:00
Greg Price a099e698e2 py3: Switch almost all shebang lines to use `python3`.
This causes `upgrade-zulip-from-git`, as well as a no-option run of
`tools/build-release-tarball`, to produce a Zulip install running
Python 3, rather than Python 2.  In particular this means that the
virtualenv we create, in which all application code runs, is Python 3.

One shebang line, on `zulip-ec2-configure-interfaces`, explicitly
keeps Python 2, and at least one external ops script, `wal-e`, also
still runs on Python 2.  See discussion on the respective previous
commits that made those explicit.  There may also be some other
third-party scripts we use, outside of this source tree and running
outside our virtualenv, that still run on Python 2.
2017-08-16 17:54:43 -07:00
Tim Abbott 4ce079b689 docs: Clean up release notes for the Zulip 1.7 release.
Now that we have the expensive migrations running automatically early
in the process, we can drop them to more of a footnote.
2017-08-16 13:28:05 -07:00
Tim Abbott d43f5ceeec database: Add database index for wildcard mentions. 2017-08-16 13:28:04 -07:00
Tim Abbott 8bb812c8a9 database: Add database index for alert words. 2017-08-16 12:39:01 -07:00
Robert Hönig a22f524fe1 Remove Zulip API licensing information. 2017-08-16 07:03:39 -07:00
Greg Price cd897b7a99 docs/prod*: Simplify core install instructions a bit by cutting /root/zulip .
This works fine in my testing -- I followed it on a fresh `trusty` VM,
after just getting SSL certs with our LetsEncrypt instructions, and
the install completed successfully.

And in the source tree, the only evidence I can find of a potential
remaining dependency on the `/root/zulip` path is the Nagios config in
`puppet/zulip_ops/`.  That's actually already broken, in that it
depends on `/root/zulip/api/`, so we'll have to sort that out;
and in any case, it doesn't matter to most people installing Zulip.

Add a mention that the install script will move the just-unpacked
directory out from under you.  While we're here, add a few words about
where the deployed code is laid out.

Text of those last words tweaked by tabbott.
2017-08-15 17:46:42 -07:00
Greg Price 71fa4dfa5d docs/prod*: Give clearer instructions for rolling back a deploy.
Also cut an obsolete mention of /root/zulip .
2017-08-15 17:41:07 -07:00
Greg Price e469578a55 py3: Fix up (almost) all script invocations to rely on shebangs.
This follows up on 207cf6302 from last year to clean up cases that
have apparently popped up since then.  Invoking the scripts directly
makes a cleaner command line in any case, and moreover is essential
to how we control running a Zulip install as either Python 2 or 3
(soon, how we always ensure it runs as Python 3.)

One exception: we're currently forcing `provision` in dev to run
Python 3, while still running both Python 2 and Python 3 jobs in CI.
We use a non-shebang invocation to do the forcing of Python 3.
2017-08-15 17:30:31 -07:00
Tim Abbott 4e7c56fff6 docs: Fix a buggy link to realm-admin-docs. 2017-08-15 17:23:18 -07:00
Tim Abbott 415d511469 docs: Mention a few highlights from settings.py. 2017-08-15 17:21:40 -07:00
Tim Abbott 330493707a docs: Improve install guide outgoing links. 2017-08-15 17:21:40 -07:00
Tim Abbott 771afd093c docs: Restructure install guide troubleshooting section. 2017-08-15 17:21:40 -07:00
Tim Abbott 634532b414 docs: Remove discussion of community organizations.
This significantly simplifies the page, and they don't exist anymore
anyway.
2017-08-15 17:21:40 -07:00
Tim Abbott 7582d0920d docs: Improve clarity of production install documentation for emails.
Based on #6094, this extracts email configuration as its own step.
2017-08-15 17:21:40 -07:00
Tim Abbott 4725afe99a settings: Move NOREPLY_EMAIL_ADDRESS to DEFAULT_SETTINGS.
Since we're auto-detecting the value anyway, there's no reason it
can't be moved to DEFAULT_SETTINGS.

This lets us remove some clutter from the installation documentation.
2017-08-15 17:21:40 -07:00
Tim Abbott 80a5ecf3c8 docs: Improve readability of the prod-email instructions. 2017-08-15 17:21:40 -07:00
Tim Abbott 2bfe93f290 docs: Move subscribe instructions to end of install instructions. 2017-08-15 16:53:55 -07:00
Tim Abbott 4525843681 docs: Clarify documentation on verifying push notifications.
This is based on discussion in #6100.
2017-08-15 11:25:30 -07:00
Tim Abbott 0cd287b3f5 mypy: Add documentation for requirements/mypy.txt. 2017-08-15 07:24:42 -07:00
Aaron Tse 363872bf46 docs: Correct incorrect description in event-systems.md. 2017-08-15 07:24:32 -07:00
Steve Howell 658ac782a2 Add page_params.unread_msgs.count.
This field is convenient for bankruptcy checks.  Clients could
calculate it from page_params.unread_msgs before this change, but
it would kind of a painful calculation.

To add count, we had to simplify the mypy annotations, which weren't
really accurate before.
2017-08-14 12:38:09 -07:00
Greg Price 6e9f8b90dc provision: Remove the last reference to `install-mypy`, and delete it.
This script has been redundant for some time now.
2017-08-10 18:00:19 -07:00
rht 761c11276f docs: Remove a redundant step in dev setup.
`mypy` is already installed in the previous step at Python 3 virtualenv
setup step.
2017-08-10 17:50:28 -07:00
Jack Zhang 9461f2f799 docs: Update /integrations links to new pushState routes.
Update Email, Beanstalk, Hubot, JIRA, and Trello integrations
links.

The Hubot integrations section (/integrations#hubot-integrations)
was removed  in an earlier redesign of /integrations. This commit
replaces the link with the hubot-scripts organization on
Github, which displays the comprehensive list of all integrations
available via Hubot.

Fixes #5875.
2017-08-10 10:21:53 -07:00
Steve Howell f9bd610a60 docs: Make it explicit that chat.zulip.org is a Zulip server.
It should be kind of obvious, but people tend to skim over
URLs.
2017-08-09 19:33:57 -07:00
Greg Price 98cef0ab48 py3: Augment all mentions of system Python packages to include Python 3.
In some of these contexts, we may still be *using* the Python 2
version, but at least this should eliminate running into
`ImportError`s one by one in scripts that run outside a virtualenv,
as we update their shebangs to refer to Python 3.

Several Python libraries we use don't come in Python 3 versions on
trusty: gevent, boto, twisted, django, django-tagging, whisper.
The latter two don't come in Python 3 versions even on xenial.
So some work required before we can actually switch the code that
relies on those libraries to run as Python 3 -- probably the best
solution will be to backport them all in our apt repo.  (All but
`whisper` are packaged in zesty; `whisper` upstream just grew Python 3
support this year.)
2017-08-09 14:07:05 -07:00
Steve Howell 2f775c3e0b node tests: Extract zrequire helper.
We are phasing out the following in tests:

    add_dependencies - this is just kind of a clunky UI
    require - normal JS requires cause test leaks

In order to plug require leaks, we are effectively doing what
we always have done inside of add_dependencies, which is to
keep track of which modules we have done `require` on, and
these get cleared between tests.

Now we just use `zrequire` every time we want to pull in real
code to our global namespace.
2017-08-09 12:32:09 -07:00
Vaida Plankyte b6da398e17 docs: Add bug report guidelines. 2017-08-09 11:38:46 -07:00
Greg Price d3a69da829 py3: Fix or remove (almost) all references to Python 2 venv in docs.
I think soon we'll put the Python 3 venv at `/srv/zulip-venv` and
make `/srv/zulip-py3-venv` just an alias to that (then remove the
alias too), but for now the old name is helpful for spotting places
that need an update.

The `/srv/zulip-venv` name still appears in codepaths used by Travis
tests.
2017-08-08 15:48:12 -07:00
rht b0e4233d3f Dev environment setup: default to Python 3.
From the line in tools/provision it should trickle to the rest of the
scripts. This works since almost all the python scripts have been linted
to be generic.

Proof that the setup is python3 only: with this commit, within the
vagrant container env, /srv/zulip-venv is no longer present and
`./tools/run-dev.py` runs just fine.

[gnprice: Added `rm -f` and warning message, and made small edits.]
2017-08-08 15:28:11 -07:00
Jack Zhang 4ba5b2f364 docs: Create hotspots subsystem documentation. 2017-08-05 18:32:37 -07:00
Pweaver (Paul Weaver) 1afaa67c7c deps: Change npm to yarn for reliablity, security, and speed. 2017-08-05 12:29:06 -07:00
Greg Price cc30226af0 deliver_email: When disabled, sleep forever rather than exit.
This makes supervisor see the service as cheerfully running
and let it alone, rather than constantly retry starting it.
Because the crash/restart loop means repeatedly spending a
couple of seconds loading Django and the app, separated by
brief periods while supervisor notices the crash and acts
on it, it was actually consuming about 30-50% CPU on the
zulipchat.com staging server.
2017-08-03 16:28:19 -07:00
Greg Price 2cc0689bcf api migration: Update the prod "Secure, maintain, and upgrade" doc. 2017-08-03 12:23:29 -07:00
Greg Price 8f73129d6a api migration: Update docs/directory-structure. 2017-08-03 12:23:29 -07:00
Greg Price fb9ffcd35a api: Update docs/integration-guide. 2017-07-31 21:25:13 -07:00
Tim Abbott 780dbe72d5 docs: Clean up new markdown test docs.
Thanks for Joshua Pan for the review!
2017-07-31 09:47:47 -07:00
Tim Abbott c638ea8d11 docs: Fix spelling of Travis CI. 2017-07-31 09:36:22 -07:00
Tim Abbott 1ffb791d0b docs: Further document the recommended Travis CI workflow. 2017-07-31 09:35:32 -07:00
Vaida Plankyte 9859264d56 docs: Emphasise Travis CI setup in dev env setup docs.
Fixes #5266.
2017-07-31 09:35:29 -07:00
Tim Abbott 0161671981 markdown: Document the new features of our markdown testing system.
This and the preceeding commits is significant progress towards
completing #1857.
2017-07-28 18:31:46 -07:00
Tim Abbott 4b7c23f133 markdown: Rename bugdown-data.json to a more reasonable name. 2017-07-28 17:54:01 -07:00
Tim Abbott 4f4d28477d markdown: Rename markdown.contains_bugdown.
This name was confusing, since "bugdown" doesn't exactly suggest
"backend markdown processor" to people.
2017-07-28 17:51:33 -07:00
Tim Abbott f834ae14bc docs: Update management command documentation. 2017-07-28 16:12:10 -07:00
Tim Abbott 470d0a481c docs: Update changelog through today. 2017-07-27 21:57:41 -07:00
Greg Price 98b1678d5d docs: Document how to make settings changes take effect.
The page at https://zulip.org/server.html reminds me that we didn't
have clear documentation of this point where we discuss configuring
the server.
2017-07-27 21:44:58 -07:00
Greg Price 76b62620d9 docs: Add a "production" overview page.
This pulls together what's covered in detail in several
longer pages, and gives us a page that can serve as a good
drop-in replacement for https://zulip.org/server.html .

Also tweak a couple of related bits for clarity and orthography.
2017-07-27 21:44:58 -07:00
Tim Abbott 7abcc1b274 docs: Add a brief document explaining management commands.
Fixes #1330.
2017-07-27 18:00:53 -07:00
Vaida Plankyte 282eb5585e docs: Add section explaining GitHub/Google auth for dev env. 2017-07-27 17:35:14 -07:00
Steve Howell e6e3bbb780 Add a "mentions" section to unread message ids. 2017-07-27 16:14:26 -07:00
Jason Michalski 4f0110e081 Add unread_msgs to the initial state data.
We are adding a new list of unread message ids grouped by
conversation to the queue registration result. This will allow
clients to show accurate unread badges without needing to load an
unbound number of historic messages.

Jason started this commit, and then Steve Howell finished it.

We only identify conversations using stream_id/user_id info;
we may need a subsequent version that includes things like
stream names and user emails/names for API clients that don't
have data structures to map ids -> attributes.
2017-07-27 16:14:25 -07:00
Steve Howell b588bc47fc Create zerver_usermessage_unread_message_id index.
This creates a partial index on UserMessage that lets us
find unread messages for particular user id.
2017-07-26 22:28:19 -07:00
Greg Price 9f62b402b5 install docs: Fix some small grammar and orthography issues.
After editing this file for the previous commit, I couldn't unsee
"low-traffic the".  So I fixed that, saw more issues, and then just
went through the page for everything that was similarly trivial to fix.
2017-07-25 17:35:39 -07:00
Greg Price 273533643a install docs: Say explicitly that Zulip should have its own (virtual) machine.
This is the main thing that https://zulip.org/server.html explains
that we don't yet in our main documentation tree.
2017-07-25 17:35:39 -07:00
Cynthia Lin 83993aa388 docs: Update user docs guide with new sidebar index. 2017-07-24 22:59:55 -07:00
Rishi Gupta 481c85fb48 settings: Update text in templates. 2017-07-24 17:33:14 -07:00
Shubham Gupta 205d0993ef docs: Updated troubleshooting guide for ssh connection errors.
Tweaked by tabbott to simplify the language a bit.

Fixes #5889.
2017-07-24 17:26:19 -07:00
Rishi Gupta 161f3c4e68 docs: Fix link to open accessibility issues. 2017-07-22 11:51:33 -07:00
Vishnu Ks 700e08da4a docs: Use get_user in mypy.md. 2017-07-20 16:50:23 -07:00
Greg Price 2ed02a0c5d gitignore: Anchor patterns that should be anchored. 2017-07-19 14:03:49 -07:00
Pweaver (Paul Weaver) d3ffc81726 Enable Hot Module Replacement in webpack.
This allow the webbpack dev server to properly reload JavaScript modules
while running in dev without restarting the server. We need to connect
to webpack-dev-server directly because SockJS doesn't support more than
one connection on the same host/port.
2017-07-18 11:02:05 -07:00
Tim Abbott 2317819e47 nginx: Use the Django 404 page for files under static/.
This elimintes the need for us to maintain duplicate copies of the
Zulip 404 error pages.

Fixes #5382.
2017-07-18 09:55:30 -07:00
Tim Abbott 5488ab4225 docs: Update links to python-zulip-api project.
We just renamed a bunch of files in that repository.
2017-07-18 00:07:17 -07:00
Rishi Gupta aa845e7f60 models: Replace ScheduledJob with ScheduledEmail.
ScheduledJob was written for much more generality than it ended up being
used for. Currently it is used by send_future_email, and nothing
else. Tailoring the model to emails in particular will make it easier to do
things like selectively clear emails when people unsubscribe from particular
email types, or seamlessly handle using the same email on multiple realms.
2017-07-17 16:05:38 -07:00
Durga Akhil Mundroy 146dfa6f0b org-permissions: Add allow_edit_history organiztion setting.
This new setting controls whether or not users are allowed to see the
edit history in a Zulip organization.  It controls access through 2
key mechanisms:

* For long-ago edited messages, get_messages removes the edit history
  content from messages it sends to clients.

* For newly edited messages, clients are responsible for checking the
  setting and not saving the edit history data.  Since the webapp was
  the only client displaying it before this change, this just required
  some changes in message_events.js.

Significantly modified by tabbott to fix some logic bugs and add a
test.
2017-07-16 10:10:06 -07:00
Rohitt Vashishtha d31686b576 docs: Fix typos in git-guide.md. 2017-07-16 00:22:05 -07:00
Harshit Bansal ebdd8c9e3d emoji: Switch to using `emoji-datasource` npm package.
This commit does the following things:
* Instead of using a manual tool for downloading sprite sheets, use
  `emoji-datasource` npm package.
* Modify the `build_emoji` script to use sprite sheets from the npm
  package.

Bumps PROVISION_VERSION.

Fixes: #4730.
2017-07-13 21:52:01 -07:00
Harshit Bansal 420327b558 provision: Install NPM packages in the beginning of provisioning process.
NPM packages should be installed at the beginning of the provisioning
process so that later in the provisioning process if a script requires
any NPM package it can use it. Earlier, we were installing NPM packages
in the last as the installation process can fail due to network issues
but since we now retry in case the installation fails, they can be
installed safely at the beginning of the process as well just like apt
packages.
2017-07-13 21:52:01 -07:00
Tim Abbott 4e2b5bf200 docs: Document naming for schema migrations. 2017-07-10 16:03:16 -07:00
rht 8a50fbfa0b docs: Move ')' to the correct location. 2017-07-10 10:22:47 -07:00
Tim Abbott 6eca9a1fbf docs: Update recommendations of disk requirements.
Addresses part of #5724.
2017-07-07 12:58:42 -07:00
Tim Abbott 094c8fd812 docs: Update link to Zulip API bindings code. 2017-07-06 13:08:25 -07:00
Tim Abbott 32bc794a17 docs: Update link to contrib_bots README.md. 2017-07-06 12:37:02 -07:00
Jack Zhang 13a5c625ca docs: Add note for importing _() function in translating.md. 2017-07-05 12:01:59 -07:00
Vaida Plankyte d8ab716820 german.md: Use the singular 'they' pronoun. 2017-07-05 09:27:44 -07:00
Vaida Plankyte 18bf15cfed git-guide.md: Use the singular 'they' pronoun. 2017-07-05 09:27:44 -07:00
Vaida Plankyte 43a98b896b custom-apps.md: Use the singular 'they' pronoun. 2017-07-05 09:27:43 -07:00
Vaida Plankyte c52fc84fd0 bots-guide.md: Use the singular 'they' pronoun. 2017-07-05 11:33:42 +02:00
Vaida Plankyte 9bb0602ad4 docs: Add info on resolving merge conflicts to git-guide.md.
Fixes #5586.
2017-07-04 15:48:06 -07:00