Skip to content

Commit b58d7d4

Browse files
Vasilije1990dexters1borisarzentarhande-kmatea16
authored
fix: 0.1.41 Release (#894)
<!-- .github/pull_request_template.md --> ## Description <!-- Provide a clear description of the changes in this PR --> ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin. --------- Signed-off-by: Diego B Theuerkauf <[email protected]> Co-authored-by: Igor Ilic <[email protected]> Co-authored-by: Boris Arzentar <[email protected]> Co-authored-by: Boris <[email protected]> Co-authored-by: Igor Ilic <[email protected]> Co-authored-by: Hande <[email protected]> Co-authored-by: Matea Pesic <[email protected]> Co-authored-by: hajdul88 <[email protected]> Co-authored-by: Daniel Molnar <[email protected]> Co-authored-by: Diego Baptista Theuerkauf <[email protected]> Co-authored-by: Dmitrii Galkin <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: lxobr <[email protected]> Co-authored-by: github-actions[bot] <[email protected]>
1 parent 822cc55 commit b58d7d4

File tree

213 files changed

+15947
-758
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

213 files changed

+15947
-758
lines changed

.data/code/example.txt

Lines changed: 0 additions & 28 deletions
This file was deleted.

.data/short_stories/soldiers-home.pdf

-32.9 KB
Binary file not shown.
Lines changed: 269 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,269 @@
1+
name: Reusable DB Examples Tests
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
databases:
7+
required: false
8+
type: string
9+
default: "all"
10+
description: "Which databases to run (comma-separated or 'all')"
11+
python-version:
12+
required: false
13+
type: string
14+
default: "3.11.x"
15+
secrets:
16+
LLM_MODEL:
17+
required: true
18+
LLM_ENDPOINT:
19+
required: true
20+
LLM_API_KEY:
21+
required: true
22+
LLM_API_VERSION:
23+
required: true
24+
EMBEDDING_MODEL:
25+
required: true
26+
EMBEDDING_ENDPOINT:
27+
required: true
28+
EMBEDDING_API_KEY:
29+
required: true
30+
EMBEDDING_API_VERSION:
31+
required: true
32+
QDRANT_API_URL:
33+
required: false
34+
QDRANT_API_KEY:
35+
required: false
36+
WEAVIATE_API_URL:
37+
required: false
38+
WEAVIATE_API_KEY:
39+
required: false
40+
POSTGRES_PASSWORD:
41+
required: false
42+
NEO4J_API_URL:
43+
required: false
44+
NEO4J_API_KEY:
45+
required: false
46+
47+
48+
49+
50+
jobs:
51+
run-db-example-neo4j:
52+
name: "Neo4j DB Example Test"
53+
runs-on: ubuntu-22.04
54+
if: ${{ inputs.databases == 'all' || contains(inputs.databases, 'neo4j') }}
55+
steps:
56+
- name: Check out
57+
uses: actions/checkout@master
58+
59+
- name: Cognee Setup
60+
uses: ./.github/actions/cognee_setup
61+
with:
62+
python-version: ${{ inputs.python-version }}
63+
64+
- name: Install Neo4j extra
65+
run: |
66+
poetry install -E neo4j
67+
68+
- name: Run Neo4j Example
69+
env:
70+
ENV: dev
71+
LLM_MODEL: ${{ secrets.LLM_MODEL }}
72+
LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }}
73+
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
74+
LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }}
75+
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
76+
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
77+
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
78+
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
79+
GRAPH_DATABASE_PROVIDER: "neo4j"
80+
GRAPH_DATABASE_URL: ${{ secrets.NEO4J_API_URL }}
81+
GRAPH_DATABASE_USERNAME: "neo4j"
82+
GRAPH_DATABASE_PASSWORD: ${{ secrets.NEO4J_API_KEY }}
83+
run: |
84+
poetry run python examples/database_examples/neo4j_example.py
85+
86+
run-db-example-kuzu:
87+
name: "Kuzu DB Example Test"
88+
runs-on: ubuntu-22.04
89+
if: ${{ inputs.databases == 'all' || contains(inputs.databases, 'kuzu') }}
90+
91+
steps:
92+
- name: Check out
93+
uses: actions/checkout@v4
94+
95+
- name: Cognee Setup
96+
uses: ./.github/actions/cognee_setup
97+
with:
98+
python-version: ${{ inputs.python-version }}
99+
100+
- name: Install Kuzu extra
101+
run: |
102+
poetry install -E kuzu
103+
104+
- name: Run Kuzu Example
105+
env:
106+
ENV: dev
107+
LLM_MODEL: ${{ secrets.LLM_MODEL }}
108+
LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }}
109+
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
110+
LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }}
111+
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
112+
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
113+
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
114+
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
115+
GRAPH_DATABASE_PROVIDER: "kuzu"
116+
run: |
117+
poetry run python examples/database_examples/kuzu_example.py
118+
119+
run-db-example-milvus:
120+
name: "Milvus DB Example Test"
121+
runs-on: ubuntu-22.04
122+
if: ${{ inputs.databases == 'all' || contains(inputs.databases, 'milvus') }}
123+
124+
steps:
125+
- name: Check out
126+
uses: actions/checkout@v4
127+
128+
- name: Cognee Setup
129+
uses: ./.github/actions/cognee_setup
130+
with:
131+
python-version: ${{ inputs.python-version }}
132+
133+
- name: Install Milvus extra
134+
run: |
135+
poetry install -E milvus
136+
137+
- name: Run Milvus Example
138+
env:
139+
ENV: dev
140+
LLM_MODEL: ${{ secrets.LLM_MODEL }}
141+
LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }}
142+
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
143+
LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }}
144+
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
145+
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
146+
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
147+
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
148+
run: |
149+
poetry run python examples/database_examples/milvus_example.py
150+
151+
run-db-example-weaviate:
152+
name: "Weaviate DB Example Test"
153+
runs-on: ubuntu-22.04
154+
if: ${{ inputs.databases == 'all' || contains(inputs.databases, 'weaviate') }}
155+
steps:
156+
- name: Check out
157+
uses: actions/checkout@v4
158+
159+
- name: Cognee Setup
160+
uses: ./.github/actions/cognee_setup
161+
with:
162+
python-version: ${{ inputs.python-version }}
163+
164+
- name: Install Weaviate extra
165+
run: |
166+
poetry install -E weaviate
167+
168+
- name: Run Weaviate Example
169+
env:
170+
ENV: dev
171+
LLM_MODEL: ${{ secrets.LLM_MODEL }}
172+
LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }}
173+
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
174+
LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }}
175+
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
176+
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
177+
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
178+
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
179+
VECTOR_DB_URL: ${{ secrets.WEAVIATE_API_URL }}
180+
VECTOR_DB_KEY: ${{ secrets.WEAVIATE_API_KEY }}
181+
run: |
182+
poetry run python examples/database_examples/weaviate_example.py
183+
184+
run-db-example-qdrant:
185+
name: "Qdrant DB Example Test"
186+
runs-on: ubuntu-22.04
187+
if: ${{ inputs.databases == 'all' || contains(inputs.databases, 'qdrant') }}
188+
defaults:
189+
run:
190+
shell: bash
191+
192+
steps:
193+
- name: Check out
194+
uses: actions/checkout@master
195+
196+
- name: Cognee Setup
197+
uses: ./.github/actions/cognee_setup
198+
with:
199+
python-version: ${{ inputs.python-version }}
200+
201+
- name: Install Qdrant extra
202+
run: |
203+
poetry install -E qdrant
204+
205+
- name: Run Qdrant Example
206+
env:
207+
ENV: dev
208+
LLM_MODEL: ${{ secrets.LLM_MODEL }}
209+
LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }}
210+
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
211+
LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }}
212+
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
213+
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
214+
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
215+
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
216+
VECTOR_DB_URL: ${{ secrets.QDRANT_API_URL }}
217+
VECTOR_DB_KEY: ${{ secrets.QDRANT_API_KEY }}
218+
run: |
219+
poetry run python examples/database_examples/qdrant_example.py
220+
221+
run-db-example-pgvector:
222+
name: "PostgreSQL PGVector DB Example Test"
223+
runs-on: ubuntu-22.04
224+
if: ${{ inputs.databases == 'all' || contains(inputs.databases, 'postgres') }}
225+
services:
226+
postgres:
227+
image: pgvector/pgvector:pg17
228+
env:
229+
POSTGRES_USER: cognee
230+
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
231+
POSTGRES_DB: cognee_db
232+
options: >-
233+
--health-cmd pg_isready
234+
--health-interval 10s
235+
--health-timeout 5s
236+
--health-retries 5
237+
ports:
238+
- 5432:5432
239+
240+
steps:
241+
- name: Check out
242+
uses: actions/checkout@v4
243+
with:
244+
fetch-depth: 0
245+
246+
- name: Cognee Setup
247+
uses: ./.github/actions/cognee_setup
248+
with:
249+
python-version: ${{ inputs.python-version }}
250+
251+
- name: Install PGVector extra
252+
run: |
253+
poetry install -E postgres
254+
255+
- name: Run PGVector Example
256+
env:
257+
ENV: dev
258+
LLM_MODEL: ${{ secrets.LLM_MODEL }}
259+
LLM_ENDPOINT: ${{ secrets.LLM_ENDPOINT }}
260+
LLM_API_KEY: ${{ secrets.LLM_API_KEY }}
261+
LLM_API_VERSION: ${{ secrets.LLM_API_VERSION }}
262+
EMBEDDING_MODEL: ${{ secrets.EMBEDDING_MODEL }}
263+
EMBEDDING_ENDPOINT: ${{ secrets.EMBEDDING_ENDPOINT }}
264+
EMBEDDING_API_KEY: ${{ secrets.EMBEDDING_API_KEY }}
265+
EMBEDDING_API_VERSION: ${{ secrets.EMBEDDING_API_VERSION }}
266+
run: |
267+
poetry run python examples/database_examples/pgvector_example.py
268+
269+

.github/workflows/test_suites.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ jobs:
7777
uses: ./.github/workflows/examples_tests.yml
7878
secrets: inherit
7979

80+
db-examples-tests:
81+
name: DB Examples Tests
82+
needs: [vector-db-tests]
83+
uses: ./.github/workflows/db_examples_tests.yml
84+
secrets: inherit
85+
8086
# Additional LLM tests
8187
gemini-tests:
8288
name: Gemini Tests
@@ -113,6 +119,7 @@ jobs:
113119
python-version-tests,
114120
vector-db-tests,
115121
example-tests,
122+
db-examples-tests,
116123
gemini-tests,
117124
ollama-tests,
118125
relational-db-migration-tests,
@@ -131,6 +138,7 @@ jobs:
131138
"${{ needs.python-version-tests.result }}" == "success" &&
132139
"${{ needs.vector-db-tests.result }}" == "success" &&
133140
"${{ needs.example-tests.result }}" == "success" &&
141+
"${{ needs.db-examples-tests.result }}" == "success" &&
134142
"${{ needs.relational-db-migration-tests.result }}" == "success" &&
135143
"${{ needs.gemini-tests.result }}" == "success" &&
136144
"${{ needs.docker-compose-test.result }}" == "success" &&

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ git push origin feature/your-feature-name
9797

9898
2. Create a Pull Request:
9999
- Go to the [**cognee** repository](https://github.com/topoteretes/cognee)
100-
- Click "Compare & Pull Request"
100+
- Click "Compare & Pull Request" and open a PR against dev branch
101101
- Fill in the PR template with details about your changes
102102

103103
## 5. 📜 Developer Certificate of Origin (DCO)

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ uv sync --extra debug --extra api --extra postgres --extra weaviate --extra qdra
4545

4646
FROM python:3.12-slim-bookworm
4747

48+
RUN apt-get update && apt-get install -y \
49+
libpq5 \
50+
&& rm -rf /var/lib/apt/lists/*
51+
4852
WORKDIR /app
4953

5054
COPY --from=uv /app /app
@@ -57,5 +61,7 @@ RUN chmod +x /app/entrypoint.sh
5761
ENV PATH="/app/.venv/bin:$PATH"
5862

5963
ENV PYTHONPATH=/app
64+
# ENV LOG_LEVEL=ERROR
65+
ENV PYTHONUNBUFFERED=1
6066

6167
ENTRYPOINT ["/app/entrypoint.sh"]

Dockerfile_modal

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,12 @@ RUN apt-get update && apt-get install -y \
1818

1919
WORKDIR /app
2020

21-
22-
ENV PYTHONPATH=/app
23-
WORKDIR /app
24-
COPY pyproject.toml poetry.lock /app/
25-
21+
COPY pyproject.toml poetry.lock README.md /app/
2622

2723
RUN pip install poetry
2824

29-
RUN poetry install --all-extras --no-root --without dev
25+
RUN poetry config virtualenvs.create false
26+
27+
RUN poetry install --extras neo4j --extras qdrant --no-root
3028

3129
COPY cognee/ /app/cognee
32-
COPY README.md /app/README.md

0 commit comments

Comments
 (0)