- Python 3.8 or higher
- Postgres database with Lantern extensions installed
-
Fork this repository to your own GitHub account and then clone it to your local device.
git clone https://github.com/your-username/lantern-python.git
-
Navigate to the cloned project directory and set up the development environment
cd lantern-python python3 -m venv .venv source .venv/bin/activate # On windows use .venv\Scripts\activate
-
Install the required dependencies
pip install -r requirements.txt pip install -r lantern/requirements.txt pip install -e lantern pip install -r lantern_pinecone/requirements.txt pip install -e lantern_pinecone pip install -r lantern_django/requirements.txt pip install -e lantern_django pre-commit install
-
Set DB_URL in environment
export DB_URL=postgresql://user:password@localhost:5432/lantern
We use Black for code formatting.
black .
Run tests using pytest:
# To run all tests
pytest
# To run specific tests
pytest test/test_lantern.py
pytest test/test_pinecone.py
pytest test/test_django.py