zulip/tools
Steve Howell ba243416e3 stream_color: Make stream color assignment more efficient.
We now let color_data keep its own state for
unused_colors, so that we longer have to pass in
a large list of unused_colors every time we want
to assign a new stream color.

This mostly matters at startup, where we might
be cycling through 5000 streams.  We claim all
the unused colors up front.

Each operation now has an upper bound of expensiveness,
where the worst case scenario is basically popping
off the first element of a list of <= 24 colors.

The algorithm is now deterministic, too, to make
it easier to test.  It's unclear whether random color
assignment ever had much benefit, and it made unit
testing the algorithm difficult.  Now we have 100%
line coverage.

Fixes part of #10902.
2018-11-29 13:00:25 -08:00
..
circleci circleci: Add a base image for Ubuntu Bionic. 2018-05-31 18:51:32 -07:00
documentation_crawler docs: Fix up some broken links output spam. 2018-11-28 09:49:39 -08:00
droplets droplets: Update code and remove nvm settings from bashrc. 2018-08-07 13:38:18 -07:00
i18n tools: Move a few i18n scripts to tools/i18n. 2018-08-09 15:46:27 -07:00
lib settings: Improve error message when deactivating the last user. 2018-11-27 12:49:43 -08:00
linter_lib lint: Exclude outbox from linter checks on "subject". 2018-11-27 11:05:25 -08:00
setup tools/setup/emoji/build_emoji: Avoid shelling out for touch, rm, mkdir, cp. 2018-11-28 17:28:17 -08:00
test-install test-install: Fix shellcheck warnings. 2018-08-03 09:15:27 -07:00
tests icons: Remove base class from comments and test templates. 2018-10-15 19:55:18 +05:30
travis ci: Re-enable testing documentation links. 2018-11-28 09:52:04 -08:00
zulint zulint: Move pycodestyle runner code to library. 2018-08-04 19:54:18 -07:00
zulip-export zulip-export: Convert to using argparse from optparse. 2017-11-10 15:54:02 -08:00
README.md docs: Update links to ReadTheDocs to always use https. 2017-11-16 10:59:24 -08:00
__init__.py
build-docs build-docs: Fix shellcheck warnings. 2018-10-17 17:38:56 -07:00
build-release-tarball build-release-tarball: Fix shellcheck warnings. 2018-10-17 17:38:56 -07:00
check-capitalization check-capitalization: Include banned words in overall output. 2018-03-16 16:59:02 -07:00
check-css tools: Change use of typing.Text to str. 2018-05-13 17:17:32 -07:00
check-frontend-i18n tools: Change use of typing.Text to str. 2018-05-13 17:17:32 -07:00
check-issue-labels tools: Change use of typing.Text to str. 2018-05-13 17:17:32 -07:00
check-provision check-provision: Replace optparse with argparse. 2017-09-30 09:32:46 -07:00
check-swagger
check-templates billing: Add location for errors on billing page. 2018-08-10 22:48:10 -07:00
check-urls billing: Move billing-related views and urls to corporate. 2018-10-01 15:43:21 -07:00
clean-branches clean-branches: Fix shellcheck warnings. 2018-10-17 17:38:56 -07:00
clean-repo
commit-message-lint commit-message-list: Don't print anything if no commits. 2018-03-02 11:51:08 -08:00
commit-msg commit-msg: Fix shellcheck warnings. 2018-10-17 17:38:56 -07:00
compile-handlebars-templates Add basic widgets framework (JS side). 2018-05-16 15:13:33 -07:00
conf.ini-template
coveragerc webhooks: Add generic exception for unexpected webhook events. 2018-05-22 08:30:19 -07:00
create-test-api-docs tools: Revert to Python 2 typing syntax for now. 2017-12-13 10:38:15 -08:00
deploy-branch deploy-branch: Fix shellcheck warnings. 2018-10-17 17:38:56 -07:00
diagnose scripts: Use shell quoting when displaying commands to be run. 2018-07-30 22:39:08 -07:00
django-template-graph django-template-graph: Fix shellcheck warnings. 2018-10-17 17:38:56 -07:00
do-destroy-rebuild-database test_fixtures: Move test_db_status state under UUID_VAR_PATH. 2017-10-17 21:15:58 -07:00
do-destroy-rebuild-test-database do-destroy-rebuild-test-database: Fix shellcheck warnings. 2018-08-03 09:15:26 -07:00
fetch-pull-request
fetch-rebase-pull-request fetch-rebase-pull-request: Fix shellcheck warnings. 2018-08-03 09:15:26 -07:00
find-add-class tools: Revert to Python 2 typing syntax for now. 2017-12-13 10:38:15 -08:00
find-unused-css find-unused-css: Fix shellcheck warnings. 2018-08-03 09:15:26 -07:00
get-handlebar-vars Enable pycodestyle W605 (invalid escape sequence). 2018-07-03 16:54:46 +02:00
html-grep zulint: Move lister.py to tools/zulint. 2018-08-04 19:53:53 -07:00
inline-email-css Text-wrap the remaining long lines exceeding 110. 2017-11-15 10:58:03 -08:00
js-dep-visualizer.py Enable pycodestyle W605 (invalid escape sequence). 2018-07-03 16:54:46 +02:00
lint Add shellcheck as a linter. 2018-10-18 15:32:26 -07:00
list-outdated-packages tools: Add tool for listing outdated pip packages. 2018-05-24 15:16:02 -07:00
minify-js tools: Remove pointless uses of shell=True. 2018-07-30 22:39:06 -07:00
pre-commit pre-commit: Fix shellcheck warnings. 2018-10-18 15:26:21 -07:00
pretty-print-html tools: Remove print_function. 2017-09-29 15:44:56 -07:00
provision provision: Fix shellcheck warnings. 2018-08-03 09:15:27 -07:00
push-to-pull-request push-to-pull-request: Update local tracking ref, if any. 2018-09-25 13:15:02 -07:00
release-tarball-exclude.txt tests: Move zerver/fixtures to zerver/tests/fixtures for clarity. 2018-04-19 21:50:17 -07:00
renumber-migrations tools: Only files starting with same migration number conflict. 2018-07-10 21:09:34 +05:30
replacer zulint: Move lister.py to tools/zulint. 2018-08-04 19:53:53 -07:00
reset-to-pull-request reset-to-pull-request: Fix shellcheck warnings. 2018-08-03 09:15:27 -07:00
review tools/review: Don’t pretend to emulate shell=True either. 2018-07-30 22:39:08 -07:00
run-dev-queue-processors tools: Remove absolute_import in most tools. 2017-09-29 12:28:43 -07:00
run-dev.py tests: Clean up calls to tools/webpack. 2018-09-07 11:39:55 -04:00
run-mypy zulint: Move lister.py to tools/zulint. 2018-08-04 19:53:53 -07:00
setup-git-repo
show-profile-results mypy: Remove ignores for a few typeshed bugs fixed upstream. 2017-10-27 17:09:00 -07:00
start-dockers start-dockers: Fix shellcheck warnings. 2018-08-03 09:15:27 -07:00
stop-run-dev tools: Consistently use hyphen in user script names. 2017-10-11 12:52:36 -07:00
test-all tools: Move optimize-svg to tools/setup/. 2018-08-09 15:39:57 -07:00
test-all-docker test-all-docker: Fix shellcheck warnings. 2018-08-03 09:15:27 -07:00
test-api Fix usage for test-api. 2018-09-07 11:39:55 -04:00
test-backend python: Remove now-unnecessary str_utils library. 2018-11-27 11:57:54 -08:00
test-documentation test-documentation: Fix shellcheck warnings. 2018-08-03 09:15:27 -07:00
test-emoji-name-scripts tools/test-emoji-name-scripts: Avoid shelling out for cp. 2018-07-19 10:43:37 -07:00
test-help-documentation tools/test-help-documentation: Avoid shelling out for mkdir. 2018-07-19 10:43:37 -07:00
test-js-with-casper
test-js-with-node stream_color: Make stream color assignment more efficient. 2018-11-29 13:00:25 -08:00
test-locked-requirements tools/test-locked-requirements: Avoid shelling out for cp, mkdir. 2018-07-25 16:54:46 -07:00
test-migrations test-migrations: Fix shellcheck warnings. 2018-08-03 09:15:27 -07:00
test-queue-worker-reload tools/test-queue-worker-reload: Avoid shelling out for touch. 2018-07-25 16:54:46 -07:00
test-run-dev test-run-dev: Clean up some basic Python style. 2018-01-30 16:08:43 -08:00
test-tools tools: Revert to Python 2 typing syntax for now. 2017-12-13 10:38:15 -08:00
update-authors-json team: Include contributions from legacy repositories in the total. 2018-08-28 16:45:00 -07:00
update-locked-requirements update-locked-requirements: Fix shellcheck warnings. 2018-08-03 09:15:27 -07:00
update-prod-static tools/update-prod-static: Avoid shelling out for mkdir, cp, mv, rm. 2018-11-28 17:28:17 -08:00
webpack tests: Clean up calls to tools/webpack. 2018-09-07 11:39:55 -04:00
webpack-helpers.ts webpack: Transition app.js to be compiled by webpack. 2018-07-05 11:03:08 +02:00
webpack.assets.json font-awesome: Drop support for legacy font awesome icons. 2018-10-15 20:14:55 +05:30
webpack.config.ts simplebar: Add simplebar dependency for help page scrolling. 2018-07-11 20:04:55 +05:30
zanitizer
zanitizer_config.pm.sample zanitizer_config.pm.sample: keep_file → scrub_filename 2018-09-23 20:42:27 -07:00

README.md

This directory contains scripts that are used in building, managing, testing, and other forms of work in a Zulip development environment. Note that tools that are also useful in production belong in scripts/ or should be Django management commands.

For more details, see https://zulip.readthedocs.io/en/latest/overview/directory-structure.html.