Skip to content

Commit b35e88e

Browse files
committed
Add readme instructions
1 parent a5a2d85 commit b35e88e

File tree

2 files changed

+57
-25
lines changed

2 files changed

+57
-25
lines changed

README.md

Lines changed: 54 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,61 +2,92 @@
22

33
*Description coming soon.*
44

5-
## 1. Install Dependencies
5+
## Setup Instructions
6+
7+
1. Install Ollama
68

79
```bash
8-
pip install -r requirements.txt
10+
brew install ollama
911
```
1012

11-
## 2. Set Up Ollama LLM
12-
13-
Start the Ollama server and pull the required model:
13+
2. Pull the Mistral model
1414

1515
```bash
1616
ollama serve
1717
ollama pull mistral
18-
ollama run mistral
1918
```
2019

21-
## 3. Set Up the Database
20+
3. Install Docker
2221

23-
Run Alembic to create and apply database migrations:
22+
Install Docker Desktop: https://www.docker.com/products/docker-desktop/
2423

2524
```bash
26-
alembic -c src/infrastructure/db/alembic.ini revision --autogenerate -m "initial migration"
27-
alembic -c src/infrastructure/db/alembic.ini upgrade head
25+
brew install docker-compose
26+
```
27+
28+
4. Run Docker Compose
29+
30+
```bash
31+
docker-compose up
2832
```
2933

30-
> Make sure your database connection URL is properly configured in `src/infrastructure/db/alembic.ini` and your SQLAlchemy settings.
34+
5. Install More Stuff
35+
36+
```bash
37+
brew install libpq && brew link --force libpq
38+
brew install openssl@3
39+
```
3140

32-
## 4. Run Celery Worker
41+
6. Create a virtual environment
3342

34-
Start the Celery worker to process tasks:
43+
```bash
44+
python3 -m venv venv
45+
source venv/bin/activate
46+
```
3547

36-
### Development (single-threaded)
48+
7. Install dependencies
3749

3850
```bash
39-
PYTHONPATH=src celery -A infrastructure.celery worker --loglevel=info --pool=solo
51+
env \
52+
LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib" \
53+
CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include" \
54+
PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@3/lib/pkgconfig" \
55+
pip install -r requirements.txt
4056
```
4157

42-
### Production-like (multi-threaded)
58+
8. Run Migrations
4359

4460
```bash
45-
PYTHONPATH=src celery -A services.celery worker --pool=threads --concurrency=12
61+
alembic -c src/infrastructure/db/alembic.ini upgrade head
4662
```
4763

48-
## 5. Running Tests
4964

50-
Run the full test suite using Pytest:
65+
## Run Data Ingestion
66+
67+
In one terminal, activate your virtual environment and run Celery:
5168

5269
```bash
53-
PYTHONPATH=src pytest
70+
source venv/bin/activate
71+
PYTHONPATH=src celery -A config.celery worker --loglevel=info --pool=solo
5472
```
5573

56-
## 6. Updating `requirements.txt`
74+
Then in another terminal run the data ingestion script:
75+
76+
```bash
77+
source venv/bin/activate
78+
make post-deploy
79+
```
5780

58-
After installing new packages, freeze your environment:
81+
## Run Dev CLI
5982

6083
```bash
61-
pip freeze > requirements.txt
84+
source venv/bin/activate
85+
make dev-cli
6286
```
87+
88+
## Run Tests
89+
90+
```bash
91+
source venv/bin/activate
92+
make test
93+
```

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
[tool.black]
22
line-length = 88
3-
target-version = ["py312"]
3+
target-version = ["py311"]
44
exclude = '''
55
(
6-
infrastructure/db/versions/781a41a2f89f_init\.py
6+
venv
7+
| infrastructure/db/versions/781a41a2f89f_init\.py
78
)
89
'''

0 commit comments

Comments
 (0)