We will be glad to receive your pull requests and issues for adding new features if you are missing something. We always look forward to your contributions to the Dialog Flow Telegram Connector.
We use make
as handy automation tool, which reads makefile
to get specification for commands. make
is a quite popular tool for building software. Usage signature of the make is make COMMAND
if your environment supports make autocompletions you can use tab for example:
make <tab>
We suggest using a linux-based platform for addon development. While the template can be cloned to any platforms that can run python and cookiecutter, the make functionality will not be available for Windows out of the box.
The most essential part is setting up the virtual environment. The command also installs all the development dependencies, which are required for development.
make venv
Do not forget to activate the environment, if you aim to install any other dependencies.
source venv/bin/activate
We also provide a simple pre-commit hook for git that prevents you from commiting unchecked code. Note that this action will reinitialize the git repository inside the project directory, if you have already created one. To use it, run
make pre_commit
Assuming you use docstrings to annotate your modules and objects, you can easily build the Sphinx documentation for your module by activating the virtual environment and then running
make build_doc
after that docs/build
dir was created and you can open index file by your browser:
$BROWSER docs/build/html/index.html
For style supporting we propose black
formatter, which is a PEP 8 compliant opinionated formatter. Black reformats entire files in place. Style configuration options are deliberately limited and rarely added. It doesn't take previous formatting into account. See more about black.
To format your code, run
make format
We use black
, mypy
, flake8
as code style checkers and pytest
as unit-test runner.
make test_all
You can get more info about make commands by help
:
make help
The template includes a handful of github workflows that allow you to lint and test your code as well as to deploy your newly made package straight to PYPI.
If you plan to use the latter feature, be sure to set the PYPI_TOKEN
secret in your repository.