Anders Kaseorg
564fc0e527
Replace the custom test runners with pytest.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-08-24 17:07:00 -07:00
Anders Kaseorg
147e9f6b81
test-bots: Remove merels exclusion.
...
This test was fixed in commit ab97b37ce1
(#448 ).
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-08-24 14:22:32 -07:00
Anders Kaseorg
53e59c8c09
Rename default branch to ‘main’
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-08-24 12:50:52 -07:00
Anders Kaseorg
d1b3ac8d94
gitlint-rules: Remove convoluted binary search for imperative forms.
...
This also fixes the suggestions for the following words: disabled,
disables, disabling, implemented, implementing, implements, kept,
made, took, using.
(Copied from zulip/zulip@91f048c056a66eb78a102c095e714eff5f28e36e.)
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-14 13:36:30 -07:00
PIG208
9ce7c52a10
pyupgrade: Reformat with --py36-plus.
...
This includes mainly fixes of string literals using f-strings or
.format(...), as well as unpacking of list comprehensions.
2021-06-02 18:45:57 -07:00
PIG208
a54cccc012
lint: Add black as a linter.
2021-06-02 18:45:57 -07:00
PIG208
c4edf4bd2f
lint: Add isort as a linter.
2021-06-02 18:45:57 -07:00
PIG208
6f3f9bf7e4
black: Reformat without skipping string normalization.
2021-06-02 18:45:57 -07:00
PIG208
fba21bb00d
black: Reformat skipping string normalization.
2021-06-02 18:45:57 -07:00
PIG208
5580c68ae5
isort: Reformat using isort.
2021-06-02 18:45:57 -07:00
LoopThrough-i-j
470967cfdb
lint: Set repository variable in tools/lint-commits.
...
refer to:
zulip/zulip#17506
2021-05-24 14:16:41 -07:00
Ganesh Pawar
7b889a122b
tools: Add test-main equivalent for Powershell on Windows.
2021-03-11 10:04:31 -08:00
Anders Kaseorg
922446ddf4
test-static-analysis: Delete.
...
The only thing it did over ‘tools/lint --skip=gitlint’ was redundantly
run mypy again.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-04 14:05:38 -08:00
Anders Kaseorg
2e3c65a044
lint: Remove custom --no-gitlint option.
...
zulint already has --skip for this.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-04 14:04:53 -08:00
LoopThrough-i-j
c4a78d0832
lint: Remove gitlint from static analysis.
2021-03-04 11:37:15 -08:00
LoopThrough-i-j
cce18ed11b
lint: Setup gitlint.
...
Setup gitlint for developers to write well formatted
commit messages.
Note: .gitlint, gitlint-rules.py and lint-commits
are taken directly from zulip/zulip with minor changes.
2021-03-04 11:36:47 -08:00
Ganesh Pawar
44b6fd395a
tests: Fix tests failing on Windows.
...
Tests were failing on Windows since paths are case-insensitive on it.
This uses pathlib library to compare paths on all platforms.
Fixes #651
2021-03-04 11:28:35 -08:00
Debayan Ganguly
6ac2165bf1
provision: Replace virtualenv with python native venv.
...
- Replace virtualenv with python 3's native venv feature. The venv used is native to
python3.5+, so there's no need for a separate dependency.
- Remove redundant activation script. An activation script is required
to use the pip and python in the virtual environment, but because we're
calling the pip inside the venv, we don't need one.
Fixes #625 .
2021-02-24 18:20:49 -08:00
qedk
21f87b3e88
provision: Fix source command on Windows.
2020-09-20 20:38:07 -07:00
neiljp (Neil Pilgrim)
f2c8295fcb
requirements: Remove unnecessary install dependency upon six & typing.
...
The latest release was fully python 3.5+, making these dependencies
redundant.
2020-05-05 09:20:50 -04:00
Eeshan Garg
d4ded1c5dd
tools/release-packages: Stop generating universal wheels.
...
Since we recently dropped support for Python 2 in our PyPI packages,
we can no longer distribute them as universal wheels.
2020-04-18 20:33:17 -07:00
Anders Kaseorg
b573c1daf3
lint: Replace pycodestyle with Flake8.
...
Flake8 combines pycodestyle with pyflakes and automatically gives us
support for noqa comments, parallelism, configuration files, plugins,
and easy editor integration.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
17cf26aa1f
cleanup: Move line breaks before binary operators.
...
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
2f6623bbc4
cleanup: Remove unused imports.
...
Generated by autoflake.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
5428c5f296
typing: Convert function type annotations to Python 3 style.
...
Generated by com2ann (slightly patched to avoid also converting
assignment type annotations, which require Python 3.6), followed by
some manual whitespace adjustment, and two fixes for use-before-define
issues:
- def set_zulip_client(self, zulipToJabberClient: ZulipToJabberBot) -> None:
+ def set_zulip_client(self, zulipToJabberClient: 'ZulipToJabberBot') -> None:
-def init_from_options(options: Any, client: Optional[str] = None) -> Client:
+def init_from_options(options: Any, client: Optional[str] = None) -> 'Client':
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
75d1fe2b41
lint: Upgrade zulint.
...
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
524d03fc3e
deploy: Fix urllib.parse import.
...
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
d68437d5f5
Rewrite some strings using raw string syntax.
...
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 15:04:36 -07:00
Anders Kaseorg
e30b3b094b
Modernize legacy Python 2 syntax with pyupgrade.
...
Generated by `pyupgrade --py3-plus --keep-percent-format` followed by
manual indentation fixes.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 15:04:36 -07:00
rht
c1fb086677
Squash py3_requirements.txt into requirements.txt.
2020-04-03 08:18:08 -04:00
rht
802f85224a
Travis: Remove test-py2-legacy-support.
2020-04-03 08:18:08 -04:00
rht
4600ce59a3
Remove all remaining from __future__ imports.
2020-04-03 08:18:08 -04:00
rht
204871b518
Finish the remaining migration of shebang to python3.
2020-04-03 08:18:08 -04:00
rht
dea467ccd7
lint: Remove explicit python invocation check.
2020-04-02 07:09:46 -04:00
Kushal Kothari
f253819a58
provision: Fix a typo in virtualenv instruction.
2020-03-03 22:39:28 -08:00
Aman Agrawal
32a46cbaa9
mypy: Use Rule from zulint to specify type for custom rules.
2020-01-14 16:00:24 -08:00
Aman
7588333079
lint: Use zulint's methods for lister
and printing errors.
...
Remove lister, printer and README files from server_lib.
2020-01-14 16:00:24 -08:00
Aman Agrawal
101049de27
lint: Add mypy as an external_linter to be run with ./tools/lint.
...
We were not running `mypy` with `./tools/lint` prior to this.
2020-01-14 16:00:24 -08:00
Aman
7f39201e79
lint: Use zulint as wrapper for running different linters.
2020-01-14 16:00:24 -08:00
Tim Abbott
3bbe972314
tools: Disable python3 shebang lint check for botserver.
...
Since the botserver can be run directly after installation via pip,
and only supports Python 3, we definitely want the explicit shebang
lines there.
We only don't want this in zulip/, which supports Python 2+3.
2019-03-18 13:58:11 -07:00
Marco Burstein
d176fbe324
bots: Fix a Chessbot dependency error.
...
Specify a version for Chessbot so that it will continue to function
properly if the library is updated. Also, update `test-bots` to remove
a temporary fix for Chessbot.
2018-12-09 18:57:10 -08:00
Steve Howell
b4d0a2463e
Temporarily exclude chessbot bot from tests.
2018-12-09 11:16:30 -08:00
Zev Benjamin
df04e4e1ca
Fix tools/provision on OS X.
...
See the comment for details.
2018-11-29 20:18:28 -08:00
Ujjwal Raizada
e769735108
provision: Fix version tuple generation logic.
...
Previous tuple generation logic was throwing an error parsing version like 3.6.7rc1
because micro-versions (like '7rc1') cannot be converted into an integer.
Fixes #482 .
2018-10-31 16:32:56 -07:00
Eeshan Garg
71a15bd89e
integrations/trello: Make the zulip_trello script self-contained.
...
A few users have complained about how hard it is to find the
Trello script on their systems after installing the `zulip`
package. Rishi and I decided that we should instead just ask
the users to download the script directly and run it without
having to install the `zulip` package.
This commit also ensures that the script can be run on both
py2 and py3.
2018-09-25 22:28:25 -02:30
neiljp (Neil Pilgrim)
4e0dccc9f5
test-bots: Make bots_to_test a set, ensuring tests are not duplicated.
...
The previous style was causing duplicate tests for the dropbox_share bot
for the unittest runner, due to globbing of test_*.py giving duplicates.
However, it also avoids unintentional duplication of bot names to test
on the command line being tested multiple times, though again only with
the unittest runner.
2018-06-28 14:55:23 -04:00
neiljp (Neil Pilgrim)
2895853938
test-main: Pass command-line arguments to each script.
...
This allows use of:
-p : Run all tests with pytest
-v : Additionally run pytest results in verbose mode
2018-06-28 14:55:23 -04:00
neiljp (Neil Pilgrim)
de5fa0e8fc
test_handler: Add title for test sections which use test_handler.
2018-06-28 14:55:23 -04:00
neiljp (Neil Pilgrim)
2fd9162030
test-lib: Drastically simplify by using test_handler function.
...
This automatically enables use of the pytest runner using common code.
2018-06-28 14:55:23 -04:00
neiljp (Neil Pilgrim)
52ab8cc44e
test_handler: Separate test title from path to discover tests.
2018-06-28 14:55:23 -04:00