Find a file
Eeshan Garg 74d716289b tools: Delete the release-packages script.
This script has been outdated for a long time now and has been
obsoleted by some recent changes in how packages should be built
and distributed. In general, the release process is now too
complicated to automate, so we are better off just making the
release manually.
2022-01-05 08:11:58 +05:30
.github zulip-ci: Remove /__w permission twiddling. 2021-10-14 14:06:36 -07:00
packaged_helloworld zulip_bots: Add a boilerplate bot for external bots. 2021-07-29 11:08:33 -07:00
stubs mypy: Add stubs for zephyr. 2021-03-10 23:59:15 -08:00
tools tools: Delete the release-packages script. 2022-01-05 08:11:58 +05:30
zulip Matrix bridge: Say that the user may have to wait 1 minute. 2021-11-08 21:01:09 -08:00
zulip_bots tools: Delete the release-packages script. 2022-01-05 08:11:58 +05:30
zulip_botserver pypi: Release version 0.8.1. 2021-10-19 18:03:52 -04:00
.codecov.yml codecov: Adjust failure threshold. 2017-09-14 04:26:12 -07:00
.editorconfig editorconfig: Adjust to 2-space indents for yaml. 2021-02-23 13:51:14 -08:00
.flake8 lint: Disable E203 that will conflict with Black. 2021-05-24 14:02:51 -07:00
.gitignore gitignore: Add swp files (for vim). 2018-10-11 10:36:00 -04:00
.gitlint lint: Setup gitlint. 2021-03-04 11:36:47 -08:00
.mailmap mailmap: Add Git .mailmap for zulipchat.com → zulip.com. 2020-05-13 09:56:35 -07:00
LICENSE docs: Add more proper LICENSE and THIRDPARTY files. 2020-03-22 16:52:19 -07:00
mypy.ini mypy: Add stubs for zephyr. 2021-03-10 23:59:15 -08:00
NOTICE docs: Add more proper LICENSE and THIRDPARTY files. 2020-03-22 16:52:19 -07:00
pyproject.toml lint: Configure Black. 2021-05-24 14:02:51 -07:00
README.md Replace the custom test runners with pytest. 2021-08-24 17:07:00 -07:00
requirements.txt Upgrade mypy to 0.910. 2021-08-24 20:19:05 -07:00
THIRDPARTY docs: Add more proper LICENSE and THIRDPARTY files. 2020-03-22 16:52:19 -07:00

Zulip API

Build status Coverage status

This repository contains the source code for Zulip's PyPI packages:

The source code is written in Python 3.

Development

This is part of the Zulip open source project; see the contributing guide and commit guidelines.

  1. Fork and clone the Git repo, and set upstream to zulip/python-zulip-api:

    git clone https://github.com/<your_username>/python-zulip-api.git
    cd python-zulip-api
    git remote add upstream https://github.com/zulip/python-zulip-api.git
    git fetch upstream
    
  2. Make sure you have pip.

  3. Run:

    python3 ./tools/provision
    

    This sets up a virtual Python environment in zulip-api-py<your_python_version>-venv, where <your_python_version> is your default version of Python. If you would like to specify a different Python version, run

    python3 ./tools/provision -p <path_to_your_python_version>
    
  4. If that succeeds, it will end with printing the following command:

    source /.../python-zulip-api/.../activate
    

    You can run this command to enter the virtual environment. You'll want to run this in each new shell before running commands from python-zulip-api.

  5. Once you've entered the virtualenv, you should see something like this on the terminal:

    (zulip-api-py3-venv) user@pc ~/python-zulip-api $
    

    You should now be able to run any commands/tests/etc. in this virtual environment.

Running tests

You can run all the tests with:

pytest

or test individual packages with pytest zulip, pytest zulip_bots, or pytest zulip_botserver (see the pytest documentation for more options).

To run the linter, type:

./tools/lint

To check the type annotations, run:

./tools/run-mypy