Skip to content

Development

Jules Belveze edited this page Jul 12, 2023 · 3 revisions

This Wiki is designed to help you get started contributing to langtest 🚀

We use poetry as a dependency manager so you will need to have install on your machine (see here).

First you need to clone the repository:

git clone https://github.com/JohnSnowLabs/langtest.git

then you are ready to create a virtual environment and install all the needed dependencies for development:

cd langtest/
python -m venv .venv/langtest
source .venv/langtest/bin/active
poetry install --with dev

Note: the --with dev flag will install additional dependencies that are required for development purposes.

To ensure code quality and formatting we use a combination of black and flake8. Some code style checks are performed through GitHub Actions to ensure common practices.

To make the developer experience smoother with use pre-commit to run hooks on every commit to point out code issues.

The different formatting tasks can be run using poetry by for example running:

poetry run task format

Using langtest with 3rd party libraries

As you may have seen langtest comes with a bunch of optional libraries. You can install the required dependency and start using the library of your choice by for example running:

poetry install --only main,dev -E openai

this way you will able to load model from the OpenAI hub.

Clone this wiki locally