diff --git a/BUILD.md b/BUILD.md new file mode 100644 index 00000000..4c4f21cc --- /dev/null +++ b/BUILD.md @@ -0,0 +1,47 @@ +## How to build and test ydb-python-sdk + +This document has detailed instructions on how to build ydb-python-sdk from source and run style and unit tests. + +### Pre-requisites + +- Install [Docker](https://docs.docker.com/engine/install/). +- Install [Python 3.8](https://www.python.org/downloads/release/python-38/) +- Install [pip](https://pip.pypa.io/en/latest/installation/) +- Install [Tox](https://tox.wiki/en/latest/install.html) + +### Clone the repository + +```sh +git clone https://github.com/ydb-platform/ydb-python-sdk +``` + +### Run style tests + +Use the command below to prepare `virtualenv` and to run style tests using `flake8`. + +```sh +tox -estyle +``` + +### Run formatting checks + +Use the command below to prepare `virtualenv` and to run style tests using `black`. +See [documentation](https://black.readthedocs.io/en/stable/) about Black project. + +```sh +tox -eblack +``` + +To automatically format code using the `black` formatting style, use the command below. + +```sh +tox -eblack-format +``` + +### Run unit tests + +Use the command below to run unit tests. + +```sh +tox -epy310 +```