This document is intended for developers of the langchain-objectbox
package,
e.g. to contribute to this project itself.
To use langchain-objectbox
in your project, see the README.md file.
Python Developer Tools such as poetry
and tox
have their own dependencies and a standard command-line entry point.
PipX is very helpful for setting up such packages in their own environment and making them available in your shell environment.
# Debian-based setup
sudo apt-get install -y pipx
Ensure you have $HOME/.local/bin
in your $PATH
.
We choose poetry as build tool since it is the tool of choice for building langchain.
poetry
should be installed isolated from rest of system and project's venv (see also https://python-poetry.org/docs/#installation)
We suggest to install it via pipx
(but ofcourse, you can always use local virtual environments or conda at your will):
pipx install poetry
Tox is helpful for testing locally against multiple Python versions.
pipx install tox
Helper setup script for Debian-Systems: Installs pipx
, tox
and multiple Python versions (3.8-3.12) - (May request password authorization as it uses sudo
):
./scripts/setup-tox.sh
Checking out this repository.
python3 -m venv .venv
source .venv/bin/activate
cd libs/objectbox
poetry install
With the virtual environment in place (see above), you can activate it like that:
source .venv/bin/activate
cd libs/objectbox
poetry run pytest
cd libs/objectbox
poetry build
cd libs/objectbox
poetry show objectbox
poetry update objectbox
cd libs/objectbox
tox
python3 -m venv .venv
source .venv/bin/activate
mkdir -p libs/objectbox # more-or-less blueprinted from other `langchain-<ext>` python projects
cd libs/objectbox
poetry init # answered some questions, added deps: langchain-core, objectbox
poetry add -G test pytest
poetry install
poetry add -G test langchain