Commit Graph

877 Commits

Author SHA1 Message Date
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
Tim Abbott
c2ee259987 settings: Simplify testing code for bool realm settings.
Now, when we add a new realm setting with the bool type, we don't need
to edit the tests at all.
2017-07-04 14:23:05 -07:00
Tim Abbott
b2ada7e706 docs: Expand documentation on Internet access in tests. 2017-07-04 13:17:25 -07:00
Aditya Bansal
26c345f059 backend: Block network access to test suites.
In this commit we basically start to override the request method of
httplib2.Http() to raise an exception whenever it is called i.e.
a trial is made to access the network from test suits.

Fixes: #1472.
2017-07-04 13:17:20 -07:00
Eeshan Garg
9a992ec4c7 docs: Add documentation guide for integrations and webhooks. 2017-07-03 20:09:34 -04:00
Eeshan Garg
2f054ef4c9 webhook-walkthrough: Mention Zulip's Markdown macros. 2017-07-03 20:09:34 -04:00
Cory Lynch
802ea9abf5 Refactor to delete mousewheel.js.
This old third party library added support
for a "mousewheel" event to detect scrolling.
However, it is not compatible with jQuery 3
and is obsolete now that there is a standard
"wheel" event that accomplishes the same thing.
2017-07-03 11:04:20 -04:00
Pweaver (Paul Weaver)
2c10e7c0db Change from and noreply emails to use EXTERNAL_HOST domain.
This eliminates another mandatory setting from what one needs to
configure to setup a Zulip server.
2017-07-01 08:09:25 -07:00
Greg Price
ec8ead3033 docs/translating: Clarify Handlebars discussion
I found the new paragraph from 74d83cc47 somewhat hard to follow,
so here's another version.  Also try to make the structure of
the rest of the section around it somewhat more clear.
2017-06-30 21:59:58 -07:00
Umair Khan
74d83cc47e lint: Disallow handlebars within {{#tr}}{{/tr}}.
This commit adds a new linter which runs from tools/travis/backend.
It runs over the translations.json file and checks if any of the
translatable string contains handlebars in it.

Fixes #5544
2017-06-30 10:12:31 -04:00
Rishi Gupta
85d38bd17b emails: Remove DEFAULT_FROM_EMAIL from prod_settings_template. 2017-06-29 17:54:33 -07:00
Cory Lynch
4327402d57 docs: Add tip to record GIFs with Chrome Capture. 2017-06-29 13:26:38 -07:00
Greg Price
8e82bf6532 docs: Write down some high-level thoughts on doing code reviews.
This started as a PSA in the form of a series of chat messages in
`#general` on chat.zulip.org; putting them here, with some editing,
to make their value more durable.

Also rearrange this doc slightly so that it's not specific to
the server codebase, except in a few explicit spots.

The bit that's for authors should probably be somewhere else.
I think there isn't right now a great natural spot for it --
probably the top of docs/git-guide, some parts of docs/version-control,
and that paragraph here should all turn into a top-level "guide
to submitting code to Zulip" doc, which would link to the rest
of docs/git-guide and to some other resources.  Leaving that
for another day.
2017-06-27 08:23:55 -04:00
Cynthia Lin
1ce8258f2e docs: Add reminder to update ReadTheDocs config in release checklist. 2017-06-26 16:09:36 -07:00
vaibhav
f25cf988a3 docs: Add flask server documentation.
Flask server is a simple python server which can be used to interact with bots
through outgoing webhook services.
2017-06-22 09:48:09 -04:00
Vaida Plankyte
0ed4e22e54 docs: Fix lint/whitespace errors in GCI docs. 2017-06-22 09:30:28 -04:00
Vaida Plankyte
72d126ab78 docs: Change GCI links to point to main repo. 2017-06-22 09:30:28 -04:00
Vaida Plankyte
f880ee4ba0 docs: Move GCI docs into main repo. 2017-06-22 09:30:28 -04:00
Vaida Plankyte
15b058121f docs: Fix linking & typos in WIP PR section in git-guide. 2017-06-22 09:28:52 -04:00
Vaida Plankyte
6d2b1e2284 docs: Clarify tools/ script usage in git-guide. 2017-06-22 07:48:32 -04:00
Greg Price
3286fbe8e3 docs/translating: Follow-on cleanups from removing Django templates.
This follows up the recent commit
3d1d09b3d docs: Remove discussion of old Django templating engine.
with a small grammar fix and removing another vestige of making the
distinction between Jinja2 and Django templates, and also rearranges
the logic slightly to reflect that backend and frontend templates
have separate sections.

Probably a bigger restructuring is in order to help the reader
navigate through all the good content in this doc, but that's
a bigger job for another day.
2017-06-21 19:05:54 -07:00
Cynthia Lin
ac25f515e0 docs: Update ReadTheDocs meta tags.
Fixes #5482
2017-06-20 20:59:16 -04:00
Vaida Plankyte
009fa9be1e docs: Add info on using tools/ scripts for fetching PRs. 2017-06-20 11:37:33 -04:00
Vaida Plankyte
0595764807 docs: Add alternative snippet for checking out branch. 2017-06-20 11:37:33 -04:00
Vaida Plankyte
22199d6044 docs: Fix code snippet typo in git-guide.md. 2017-06-20 11:37:33 -04:00
Cynthia Lin
9777496046 repository: Update information with Codecov migration. 2017-06-20 07:17:39 -04:00
Steve Howell
2d06a280b6 Fix broken IIFE link.
(We now just point the user to a Google search.)
2017-06-19 09:46:06 -04:00
Vaida Plankyte
52c351aa27 docs: Fix trailing whitespace in git-guide.md. 2017-06-19 07:52:07 -04:00
Vaida Plankyte
b02b49ca4e docs: Add screenshot-and-gif-software.md and link to it. 2017-06-19 07:52:07 -04:00
Tim Abbott
d98c0d3178 docs: Add a brief architecture overview section on frontend. 2017-06-15 11:55:39 -07:00
Tim Abbott
3d1d09b3d3 docs: Remove discussion of old Django templating engine.
This was unnecessary complexity for users, and in fact, we removed the
code a couple months ago.
2017-06-15 11:55:39 -07:00
Tim Abbott
2c76f2b1e3 docs: Document file uploads in nginx section of overview. 2017-06-15 11:54:18 -07:00
Tim Abbott
115bd3ea3c docs: Fix broken link. 2017-06-15 11:52:33 -07:00
Tim Abbott
c68484dfd7 docs: Attempt to clarify a bit more the new GitHub step. 2017-06-15 11:33:33 -07:00
Tim Abbott
7668908903 docs: Improve Git guide discussion of names. 2017-06-15 11:33:32 -07:00
Vaida Plankyte
47b450de8c docs: Add links towards GitHub guide in installation instructions.
This adds two extra links to
http://zulip.readthedocs.io/en/latest/git-guide.html#set-up-git: in
the overall requirements, and once before Step 2: Get Zulip Code.

Fixes #2985.
2017-06-15 11:30:55 -07:00
Vaida Plankyte
4e5ae83fb0 docs: Emphasise running Git BASH as admin under Win10. 2017-06-15 09:58:19 -07:00
Tim Abbott
f4aec8fedd docs: Reorganize git guide discussion of WIP pull requests. 2017-06-15 02:13:24 -07:00
Vaida Plankyte
f56ecdd34f docs: Emphasise WIP PRs in git-guide.md.
Fiuxes #3233.
2017-06-15 02:05:57 -07:00
Cory Lynch
3e10bdf0e8 docs: Print output URL in Makefile. 2017-06-14 20:16:08 -07:00
Cory Lynch
3bc369f1cf tools: Add wrapper tool 'build-docs' for building documentation. 2017-06-14 20:16:02 -07:00
Cynthia Lin
1d5a5036c5 repository: Add CODE_OF_CONDUCT.md. 2017-06-14 18:43:08 -07:00
Tim Abbott
fa87c6113d docs: Document that we use ts automatically in Travis CI. 2017-06-14 17:26:41 -07:00
Steve Howell
d8598e18e0 changelog: Suggest creating indexes for starred/mentioned. 2017-06-13 13:58:58 -07:00
Robert Hönig
f9c5086658 bots: Rename BotHandlerApi object client to bot_handler. 2017-06-13 11:13:23 -07:00
Tim Abbott
357105a4c1 docs: Fix recently changed URLs to Python packaging guide. 2017-06-12 22:39:15 -07:00
Pweaver (Paul Weaver)
5c07125994 Enable EmailAuthBackend by default to simplify a production install.
This should save a step from the installation process in the common
case.
2017-06-12 21:53:35 -07:00