Find a file
Alex Vandiver f100dba3f3 editorconfig: Adjust to 2-space indents for yaml.
This matches the current configuration in zulip/zulip.
2021-02-23 13:51:14 -08:00
.github/workflows CI: Setup CI with Github Actions replacing Travis. 2021-02-23 12:11:13 -08:00
tools provision: Fix source command on Windows. 2020-09-20 20:38:07 -07:00
zulip zulip-apis: Update reaction_data type. 2021-02-23 08:58:23 -08:00
zulip_bots integrations: Remove !avatar from game handler. 2021-02-18 18:35:01 -08:00
zulip_botserver zulip-botserver: Document use of environment var in README.md 2021-01-07 00:31:26 -08: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: Replace pycodestyle with Flake8. 2020-04-18 20:31:14 -07:00
.gitignore gitignore: Add swp files (for vim). 2018-10-11 10:36:00 -04: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: Improve typing of bots & API; enforce no_implicit_optional. 2018-04-06 13:45:11 -04:00
NOTICE docs: Add more proper LICENSE and THIRDPARTY files. 2020-03-22 16:52:19 -07:00
README.md CI: Add gh-action badge and remove travis badge. 2021-02-23 12:11:13 -08:00
requirements.txt requirements: Upgrade zulint. 2020-09-20 07:33:36 -04:00
THIRDPARTY docs: Add more proper LICENSE and THIRDPARTY files. 2020-03-22 16:52:19 -07:00

Zulip API

[Build status] (https://github.com/zulip/python-zulip-api/actions?query=branch%3Amaster+workflow%3Abuild) 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: git clone https://github.com/<your_username>/python-zulip-api.git

  2. Make sure you have pip and virtualenv installed.

  3. cd into the repository cloned earlier: cd python-zulip-api

  4. 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>
    
  5. 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.

  6. 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

To run the tests for

  • zulip: run ./tools/test-zulip

  • zulip_bots: run ./tools/test-lib && ./tools/test-bots

  • zulip_botserver: run ./tools/test-botserver

To run the linter, type:

./tools/lint

To check the type annotations, run:

./tools/run-mypy