This is an automated email from the ASF dual-hosted git repository. bossenti pushed a commit to branch exp/poetry in repository https://gitbox.apache.org/repos/asf/streampipes.git
commit c8b7724bb62d7192601cd3022bc0616e2c8806d8 Author: bossenti <[email protected]> AuthorDate: Mon Aug 7 19:20:14 2023 +0200 docs: update development docs Signed-off-by: bossenti <[email protected]> --- .../docs/getting-started/developing.md | 37 ++++++++++++++++++---- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/streampipes-client-python/docs/getting-started/developing.md b/streampipes-client-python/docs/getting-started/developing.md index 736506c52..f9a2b4eeb 100644 --- a/streampipes-client-python/docs/getting-started/developing.md +++ b/streampipes-client-python/docs/getting-started/developing.md @@ -24,17 +24,20 @@ This document describes how to easily set up your local dev environment to work 1) **Set up your Python environment** -Create a virtual Python environment with a tool of your choice. -As a next step, install all required dependencies for the development, e.g., with `pip`: - +Create a virtual Python environment using a tool of your choice. +To manage dependencies, we use [Poetry](https://python-poetry.org/), so please install poetry in your local environment, e.g. via ```bash -pip install .[dev] # or alternatively: pip install .[all] to include dependencies for building the docs as well +pip install poetry ``` -In case you are on macOS and using `zsh` the following should work for you: +Once poetry is installed you can simply finalize your Python environment by running: + ```bash -pip install ."[dev]" +poetry install --with dev,stubs # install everything that is required for the development +poetry install --with docs # install everything to work with the documentation +poetry install --with dev,stubs,docs # install all optional dependencies related to development ``` + <br> 2) **Install pre-commit hook** @@ -76,6 +79,28 @@ TODO: replace link to java file by link to documentation Whenever possible, please try to develop the API of the Python library the same as the [Java client](https://github.com/apache/streampipes/blob/dev/streampipes-client/src/main/java/org/apache/streampipes/client/StreamPipesClient.java) or Java SDK. By doing so, we would like to provide a consistent developer experience and the basis for automated testing in the future. +### 📦 Dependency Management +In case you want to add a new dependency to StreamPipes you can use the following command: +```bash +poetry add <dep-name> +``` + +If the dependency is only required for development purpose or the documentation, +please stick to one the following: +```bash +poetry add <dep-name> --group dev +poetry add <dep-name> --group stubs +poetry add <dep-name> --group docs +``` + +### 📚Documentation +To build our documentation, we use [Materials for MkDocs](https://squidfunk.github.io/mkdocs-material/). +All files can be found within the `docs` directory. +To pre-view your local version of the documentation, you can use the following command: +```bash +make livedoc +``` + --- ## 🚀 Roadmap
