From 4dd4eaaa594eab3172be019000cf3cc207c40d3e Mon Sep 17 00:00:00 2001 From: Oleksandr Bilous Date: Sat, 20 Apr 2019 16:58:51 +0300 Subject: [PATCH 1/2] Create DEV_SETUP.rst Guide to set up required tools for development purposes. --- DEV_SETUP.rst | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 DEV_SETUP.rst diff --git a/DEV_SETUP.rst b/DEV_SETUP.rst new file mode 100644 index 00000000..704ac522 --- /dev/null +++ b/DEV_SETUP.rst @@ -0,0 +1,94 @@ +===================================== +Getting started with aioelasticsearch +===================================== + +| There you will find full description to get aioelasticsearch library up and ready. +| For this example Ubuntu 18.04/macOS X and Python 3.6 were used. + +The main steps: +=============== + +#. Clone this github repo. +#. Install and configure docker for this project: + + **On Linux:** + + .. code:: bash + + sudo apt install docker.io + systemctl start docker + systemctl enable docker + + After that, you need to add your current user to the 'docker' group: + + .. code:: bash + + usermod -aG docker $USER + + **On macOS X:** + + Follow instructions described `here `__. + +#. You might also want to check the docker version: + + .. code:: bash + + docker --version + +#. To verify that docker is configured correctly, run following command: + + .. code:: bash + + docker ps -a + + If it doesn't raise any errors, you can proceed with next steps. + +#. Create and activate virtual env in downloaded folder: + + if you use virtualenv: + + .. code:: bash + + virtualenv -p python3 + source /bin/activate + + if you use Anaconda: + + .. code:: bash + + conda create -n + conda activate + + Also you can use another method, like + `venv `__. + +#. Install required packages from requirements.txt: + + .. code:: bash + + pip install -r requirements.txt + +#. To be sure that aioelasticsearch is in development mode run following command: + + .. code:: bash + + pip install -e . + +#. Great! Now you can run some tests, to see if everything works correctly: + + **On Linux:** + + .. code:: bash + + pytest tests + + **On macOS X:** + + .. code:: bash + + pytest --local-docker + + | Note: the first time you will have to wait while docker downloads the ElasticSearch image (~600 MB). + | This may take some time (usually up to 5 minutes). + | All further test runs will take less time (usually up to 3 minutes). + From 60b46272c3711faaa41471e763cba27934dcfbfc Mon Sep 17 00:00:00 2001 From: Oleksandr Bilous Date: Sat, 20 Apr 2019 21:49:07 +0300 Subject: [PATCH 2/2] Update DEV_SETUP.rst Wrapped text with .. note:: --- DEV_SETUP.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/DEV_SETUP.rst b/DEV_SETUP.rst index 704ac522..f894901b 100644 --- a/DEV_SETUP.rst +++ b/DEV_SETUP.rst @@ -88,7 +88,6 @@ The main steps: pytest --local-docker - | Note: the first time you will have to wait while docker downloads the ElasticSearch image (~600 MB). - | This may take some time (usually up to 5 minutes). - | All further test runs will take less time (usually up to 3 minutes). +.. note:: + The first time you will have to wait while docker downloads the ElasticSearch image (~600 MB). This may take some time (usually up to 5 minutes). All further test runs will take less time (usually up to 3 minutes).