-
Clone the Repository:
git clone <repository-url> cd <repository-folder>
-
Set Up with Make: Run:
make first-run
This generates the necessary configuration files and applies database migrations.
-
Manual Configuration: If you prefer:
- Create a
configuration.yaml
file based onconfiguration.template.yaml
. - Replace the placeholders with your actual values.
- Create a
- Windows: Follow the detailed setup provided for PowerShell and conda environment.
- MacOS: Ensure you have Xcode, Homebrew, and follow the steps to create the virtual environment.
Ensure to configure your environment variables appropriately. Important ones include:
COHERE_API_KEY
: Your API key for Cohere.DATABASE_URL
: Connection string for PostgreSQL.REDIS_URL
: Connection string for Redis.
-
Migrate the Database: After setting up, run:
make migrate
-
Resetting the Database: If needed, reset and migrate again:
make reset-db make migrate
-
Install Development Dependencies:
make install
-
Run Tests: Spin up the test DB and run tests:
make test-db make run-tests
-
Database Model Changes: To make changes to the database models:
- Create a migration with:
make migration message="Your migration message"
- Then migrate:
make migrate
- Create a migration with:
- Use Poetry: It manages dependencies efficiently. Ensure to install the required version (
1.7.1
or higher). - Linting and Formatting: Use
make lint
andmake lint-fix
for maintaining code quality. - VSCode Setup: Install extensions for Ruff and set up your environment as per the provided recommendations.