From e41e36fa6869b2c3a0b7f62c133bf06a5972b216 Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Sun, 9 May 2021 10:42:44 +0200 Subject: [PATCH] [doc] Improve install_poetry doc --- doc/install_poetry.md | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/doc/install_poetry.md b/doc/install_poetry.md index 729918c2..59bae276 100644 --- a/doc/install_poetry.md +++ b/doc/install_poetry.md @@ -18,10 +18,17 @@ sudo apt install libffi-dev # Required on ARMbian pip3 install poetry --user ``` -### Install dependencies and the Python environment +### Install dependencies and the Python virtual environment ```bash -git clone https://git.duniter.org/clients/python/silkaj +# Over HTTPS +git clone https://git.duniter.org/clients/python/silkaj.git + +# Over SSH +git clone git@git.duniter.org:clients/python/silkaj.git + cd silkaj + +# Installs the runtime and development dependencies poetry install ``` @@ -31,11 +38,24 @@ Within `silkaj` repository run Silkaj: poetry run silkaj ``` -You might need to enter Poetry shell to access development tools such as `pytest` or `black`. +### Poetry shell +You can access tools (`pytest`, `black`) from within the development environment with `poetry run` or by entering the shell: +```bash +silkaj> poetry run pytest +silkaj> poetry run black +``` + +```bash +silkaj> poetry shell +(silkaj-58dUTebQ-py3.9) silkaj> black +(silkaj-58dUTebQ-py3.9) silkaj> pytest +``` ### Make Silkaj accessible from everywhere - Add following alias to your shell configuration: ```bash -alias silkaj="cd /path/to/silkaj/silkaj && poetry run silkaj" +alias silkaj="cd /path/to/silkaj && poetry run silkaj" ``` + +### Contribute +Follow the [contributing guide](CONTRIBUTING.md). -- GitLab