From 7791c130a3c095804f3badd5ee9ea75dfe88acb0 Mon Sep 17 00:00:00 2001 From: pitneitemeier Date: Tue, 31 Oct 2023 14:41:15 +0100 Subject: [PATCH] Instruction for requirements.txt or pyproject.toml --- README.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 85b37ee46..d546a3761 100644 --- a/README.md +++ b/README.md @@ -75,12 +75,30 @@ To install this as a dependency in your project, you need a [Github access token Set your access token: ```bash -GITHUB_TOKEN= +export GITHUB_TOKEN= ``` -We recommend setting up a dedicated virtual environment. You can do so by using [conda](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands) or [venv](https://docs.python.org/3/library/venv.html). +We recommend setting up a dedicated virtual environment. You can do so by using [conda](https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands) or [venv](https://docs.python.org/3/library/venv.html) or [poetry](https://python-poetry.org/). +You can add it to the poetry dependencies by adding the following in the pyproject.toml +```toml +[tool.poetry.dependencies] +python = ">=3.10,<3.13" +intelligence-layer = { git = "https://github.com/aleph-alpha-intelligence-layer/intelligence-layer.git", branch = "main", extras = ["${GITHUB_TOKEN}"] } +``` + +Remember to run +```bash +poetry lock +``` +to update dependencies. + +Alternatively you can also add it to a `requirements.txt` + +```txt +git+https://${GITHUB_TOKEN}@github.com/aleph-alpha-intelligence-layer/intelligence-layer.git +``` -Let's install the package: +Finally you can also install the package manually using pip ```bash pip install git+https://$GITHUB_TOKEN@github.com/aleph-alpha-intelligence-layer/intelligence-layer.git