Contributing

Reporting Issues

On the Github issues page. Thanks!

Submitting Patches

  1. Fork. Follow PEP 8!

  2. Write/Update tests (see below).

  3. Document. Docstrings follow the Google Python Style Guide (docs by Sphinx). You can ‘test’ documentation:

    $ pip install .[docs]
    $ cd docs && make html # generated in docs/_build/html/
    
  4. Open Pull Request. To the main branch.

Note

Please don’t hesitate to contribute! While good tests, docs and structure are
encouraged, I do welcome great ideas over absolute comformity to the above!
Thanks! ❤️

Testing

Testing is done with the unittest framework.
As a rule, the file ./tests/test_<module>.py file tests the <module> module.

To run all tests (testing only language ‘en’ and generating an html coverage report in gtts/htmlcov/):

$ pip install .[tests]
$ TEST_LANGS=en pytest -v -s gtts/ --cov=gtts --cov-report=html