Commit Graph

649 Commits

Author SHA1 Message Date
Umair Khan 6b1c53059b testing: Run in parallel mode by default.
This commit changes the backend testing framework to run
in parallel mode which is same as --processes=4. If --coverage
is supplied, we enforce serial mode, --processes=1, because
coverage is not compatible with parallel mode at the moment.
2017-05-04 16:06:34 -07:00
Eeshan Garg c388baa431 docs: Document zerver.models.Client's usage for analytics and webhooks. 2017-05-01 23:50:51 -07:00
Eeshan Garg e87e246fcb zerver/decorator: Set request.client in api_key_only_webhook_view.
Previously, api_key_only_webhook_view passed 3 positional arguments
(request, user_profile, and client) into a function. However, most
of our other auth decorators only pass 2 positional arguments. For
the sake of consistency, we now make api_key_only_webhook_view set
request.client and pass only request and user_profile as positional
arguments.
2017-05-01 23:44:07 -07:00
Cory Lynch 0965c43238 Add typeahead for syntax highlighting languages.
Modified composebox_typeahead.js to recognize the triple backtick
and tilde for code blocks, and added appropriate typeahead functions
in that file and in typeahead_helper.js.

Additionally, a new file pygments_data.js contains a dictionary of
the supported languages, mapping to relative popularity
rankings. These rankings determine the order of sort of the
languages in the typeahead.

This JavaScript file is actually in static/generated/pygments_data.js, as it
is generated by a Python script, tools/build_pymgents_data.py. This is
so that if Pygments adds support for new languages, the JavaScript file
will be updated appropriately. This python script uses a set of popularity
rankings defined in lang.json.

Corresponding unit tests were also added.

Fixes #4111.
2017-04-28 17:22:59 -07:00
Eeshan Garg 8ad3a8bc9a integration-guide: Replace references to old-style fixture directories.
The integration guide has now been updated to reflect the recent
decision to store webhook fixtures in
zerver/webhooks/<webhook_name>/fixtures/ as opposed to
zerver/fixtures/<webhook_name>/.
2017-04-28 11:07:03 -07:00
Eeshan Garg b3ffffd3b7 webhook-walkthrough: Replace references to old-style fixture directories.
The webhook walkthrough has now been updated to reflect the recent
decision to store webhook fixtures in
zerver/webhooks/<webhook_name>/fixtures/ as opposed to
zerver/fixtures/<webhook_name>/.
2017-04-28 11:07:03 -07:00
Diego Berrocal e0a45640d2 Documentation: Improve new feature tutorial.
Resolves a few comments from #4598.
2017-04-26 16:19:51 -07:00
Tim Abbott 60225012e6 unread: Add tool for marking all messages as unread for testing.
This tool can save a lot of manual work in testing our unread counts
logic.
2017-04-25 15:40:12 -07:00
vbNETonIce cb2181d42d Update prod-maintain-secure-upgrade.md
fixing typo in line 370: 'we should' > 'we show'
2017-04-25 15:25:22 -07:00
Sarah faf20d9b47 Documentation: Update new feature tutorial.
Update the steps listed in the "Writing a new application
feature" section, based on changes to how realm properties
are created and updated on the backend.

Addresses part of issue #3854.
2017-04-25 11:16:27 -07:00
Eeshan Garg 047c02781c webhook-walkthrough: Recommend passing kwargs to build_webhook_url.
When constructing URLs for testing, we now recommend passing
query parameters as keyword arguments to build_webhook_url
instead of overriding it.
2017-04-25 10:46:21 -07:00
Cynthia Lin a267c61cdd integrations: Update docs for adding integration images. 2017-04-24 22:34:36 -07:00
Emilio Aburto L a8521dc988 docs: Update Docker development instructions to include chown.
This adds a command to change ownership of /srv/zulip to the zulip
user.
2017-04-24 21:40:44 -07:00
Maxim Averin 73a1dd63d5 analytics: Refactor legacy 'zulip_internal' decorator.
Rename 'zulip_internal' decorator to 'require_server_admin', add
documentation for 'server_admin', explaining how to give permission
for ./activity page.

Fixes: #1463.
2017-04-22 11:42:02 -07:00
Joshua Pan 64984f5bf4 Rename tools/lint-all to tools/lint.
Fixes #4574.
2017-04-21 14:57:47 -07:00
Joshua Pan 11878313fb docs: Tweak reset-to-pull-request warning.
Tweaked this warning because we currently check if there are any
uncommited changes before we reset to a specific pull request.

Changes expanded a bit by tabbott.
2017-04-21 10:12:04 -07:00
Tim Abbott 21c4be3f00 chat-zulip-org: Document learning stream. 2017-04-20 16:04:42 -07:00
Rishi Gupta 2535f6c8f2 docs: Remove CountStat description from analytics.md.
It is no longer correct, as of the string of commits ending in 49bd330.
2017-04-18 11:02:51 -07:00
Raghav Jajodia 014ec04620 docs: Update docs to include `renumber-migrations` tool. 2017-04-17 20:53:35 -07:00
hackerkid 4c0a5cf7fb docs: Update code-style.md to reflect timezone import change. 2017-04-16 12:28:56 -07:00
Rishi Gupta 5e1c8e4532 docs: Update chat-zulip-org with instruction to use gender-neutral language. 2017-04-15 16:53:04 -07:00
Rishi Gupta 0554ec13e8 docs: Update code of conduct. 2017-04-15 16:53:04 -07:00
Rishi Gupta b3991e2557 counts.py: Move CountStat.group_by into ZerverCountQuery.
Part of a larger refactoring to reduce cyclic dependencies between CountStat
and DataCollector (coming soon).
2017-04-14 11:41:07 -07:00
Rishi Gupta 341e1b54fc counts.py: Remove zerver_table from ZerverCountQuery.
Was only needed for filter_args, which are now gone.
2017-04-14 11:41:07 -07:00
Rishi Gupta 661de6bf25 counts.py: Remove filter_args argument from CountStat definition.
It turned out to not be that useful once we added subgroup. The previous
design of the CountStat object also assumed more reuseability of the *_query
strings than what ended up happening.

The filter_args also had some carrying costs:

* It's hard to be confident that filter_args other than the ones explicitly
  in our tests would have had expected behavior.
* The filter_args/join_args system is the most complex part of the CountStat
  object, and makes understanding the *_query strings unnecessarily
  difficult for a new contributor.
2017-04-14 11:41:07 -07:00
Rishi Gupta 9b661ca91f analytics: Replace CountStat.is_gauge with interval.
Groundwork for allowing stats like "Monthly Active Users".

CountStat.interval is no longer as clean a value as before, so removed it
from views.get_chart_data. It wasn't being used by the frontend anyway.

Removing interval from logger calls in counts.py is not a big loss since we
now include the frequency (which is typically also the interval) in
CountStat.property.
2017-04-14 11:41:07 -07:00
K.Kanakhin 4891a8d850 Add default response for `terms` and `privacy` endpoints.
- Add setting for `privacy policy` template defining.
- Configure default templates for `privacy policy` and
  `terms of service` pages.
- Add route for privacy page.
- Remove condition for showing `privacy` and `terms` pages.
- Add `privacy_policy` setting to context processor.
- Add documentaion part for `privacy` and `terms` templates
  configuration.
- Add tests.

Fixes #3686.
2017-04-12 14:09:14 -07:00
Adarsh S d54dea819d Add option for re-running failed tests.
This adds the option '--rerun' to the `test-backend` infrastructure.
It runs the tests that failed during the last 'test-backend' run.  It
works by stailing failed test info at var/last_test_failure.json

Cleaned up by Umair Khan and Tim Abbott.
2017-04-12 11:35:31 -07:00
Joshua Pan b39006655e prod-requirements.md: Fix grammar.
Change "strong" to "strongly" (adverb).
2017-04-11 22:30:02 -07:00
Abhijeet Kaur 8f88b045a4 Rename "Administration" to "Organization" in the settings UI.
This better sets expectatations for the fact that in Zulip, the
Organization settings UI is available read-only to non-administrator
users.

Tweaked by tabbott to update some additional references.
2017-04-07 17:32:56 -07:00
Sumana Harihareswara 314843304d Add expectations for office hours and sprints. 2017-04-06 14:07:01 -07:00
Tomasz Kolek 5b17622589 docs: Move integrations.html to integrations/index.html.
Add omiting rule for all of integrations docs in test_templates.
2017-04-05 13:19:58 -07:00
Aditya Bansal a9cb193b51 docs: Update icon instructions to use the new font awesome CSS classes.
We basically want readers to use the new fa class as the base class
instead of icon-vector while using icons from font-awesome library.
2017-04-05 12:05:08 -07:00
Steve Howell 6b4825a763 tools: Convert test-js-with-node to Python.
This is mostly a straight port from bash to Python, but we
rename the coverage option to `--coverage` and we add checks
for being in a venv and being correctly provisioned.

Fixes #4009.
2017-04-05 12:02:49 -07:00
Harshit Bansal ac2172e233 models: Rename RealmAlias model to RealmDomain.
Includes a migration.
2017-04-04 15:48:03 -07:00
Luis Saul Trinidad d8fad9587c code-style.md: Fix typo for selected_related().
This changes a mention to QuerySet's method `.select_related()` which was written as `.selected_related()`.
2017-04-03 06:43:19 -07:00
Rishi Gupta c65f9c1510 docs: Update reference to font awesome version in user-docs. 2017-03-29 11:36:51 -07:00
Yago González 0b87118b03 docs: Add explanation on small fixes in PRs. 2017-03-27 14:44:33 -07:00
Steve Howell c0a6038a95 css: Enforce one selector per line.
While it's sometimes nice to put a few selectors on the same line,
it is generally better to have a consistent way of formatting our
selectors, and most of our code up until now lists them vertically.
This change fixes the linter to enforce one selector per line, and
it cleans up the places in the CSS where we had multiple selectors
on the same line.

The advantages of one-per-line are as followers:
    * cleaner diffs
    * easier to see when multiple areas of the app may have the
      same format
    * less likely to go over 80 cols
    * makes it more clear where we have deep nesting in the
      individual selectors
    * makes it easier for our linting tools to enforce
      whitespace violations

This also fixed an old bug where we had ".landing_page h2, h4", which
sets "h4" styles outside of the landing page.
2017-03-26 16:57:33 -07:00
Moritz Neeb 65e8d66376 docs: hashchange-system: add more detail and fix some sentences.
Edited slightly by tabbott for typos and line-wrapping.
2017-03-23 15:15:44 -07:00
Tim Abbott 06492738b5 dev: Expose coverage and built documentation to web.
This makes it much more convenient for developers to access coverage
and built developer documentation.
2017-03-23 13:10:06 -07:00
Tim Abbott 2a5e600623 glossary: Add a few comment useful terms. 2017-03-22 15:49:20 -07:00
Moritz Neeb b96d18eb6f documentation: explain the term "bankruptcy". 2017-03-22 15:49:19 -07:00
Tim Abbott 2a5269baa9 docs: Document the frontend hashchange system. 2017-03-22 15:21:36 -07:00
adnrs96 a91012bd70 Move thirdparty-fonts.css from static/styles to static/third. 2017-03-21 13:40:05 -07:00
Steve Howell b98cd55ddb Add ui_report shim. 2017-03-19 11:05:44 -07:00
Yago González a5ecb5e5cf docs: Fix minor link formatting. 2017-03-19 09:16:06 -07:00
Akash Kothawale 93a00d9772 docs: Add missing backtick in architecture-overview. 2017-03-19 09:12:14 -07:00
Yago González 30c0023847 docs: Explain Python 2/3 virtualenvs. 2017-03-19 08:56:19 -07:00
sonali0901 49c2472006 docs: Document use of vagrant provision to troubleshoot.
Also documents `provision.log` a bit more.

Tweaked and moved around significantly by tabbott.

Fixes #1886.
2017-03-17 12:58:46 -07:00