Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
borisarzentar committed Feb 12, 2025
2 parents f1e6f3d + e7b08de commit fd9101a
Show file tree
Hide file tree
Showing 123 changed files with 7,467 additions and 1,416 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/approve_dco.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: DCO Check
name: community | DCO Check

on:
pull_request:
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/clean_old_git_actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: clean | Cleanup Old Workflow Runs

on:
schedule:
- cron: '0 3 * * 0' # Runs every Sunday at 03:00 UTC
workflow_dispatch: # Allows manual trigger

jobs:
cleanup:
runs-on: ubuntu-latest

steps:
- name: Delete old workflow runs
env:
GH_PAT: ${{ secrets.GH_PAT }}
REPO: ${{ github.repository }}
DAYS: 100 # Adjust the number of days if needed
run: |
# Get current timestamp
NOW=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
# Fetch all workflow runs
runs=$(curl -s -H "Authorization: token $GH_PAT" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/$REPO/actions/runs" | jq -c '.workflow_runs[]')
# Loop through each run
echo "$runs" | while read -r run; do
created_at=$(echo "$run" | jq -r '.created_at')
run_id=$(echo "$run" | jq -r '.id')
# Convert timestamps to seconds
created_seconds=$(date -d "$created_at" +%s)
now_seconds=$(date -d "$NOW" +%s)
# Calculate age of workflow run
age_days=$(( (now_seconds - created_seconds) / 86400 ))
if [ "$age_days" -gt "$DAYS" ]; then
echo "Deleting workflow run ID: $run_id (Created: $created_at, Age: $age_days days)"
curl -X DELETE -H "Authorization: token $GH_PAT" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/$REPO/actions/runs/$run_id"
else
echo "Skipping workflow run ID: $run_id (Created: $created_at, Age: $age_days days)"
fi
done
14 changes: 11 additions & 3 deletions .github/workflows/clean_stale_pr.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: clean | remove stale PRs

on:
# Run this action periodically (daily at 0:00 UTC in this example).
# Run this action periodically (daily at 0:00 UTC).
schedule:
- cron: "0 0 * * *"
# Optionally, also run when pull requests are labeled, unlabeled, synchronized, or reopened
Expand All @@ -13,12 +13,20 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: Mark and Close Stale
- name: Checkout repository
uses: actions/checkout@v4

- name: Mark and Close Stale PRs
uses: actions/stale@v6
with:
# Number of days of inactivity before the pull request is marked stale
days-before-stale: 60
# Number of days of inactivity after being marked stale before the pull request is closed
days-before-close: 7
# Comment to post when marking as stale
stale-pr-message: "This pull request has been automatically marke
stale-pr-message: "This pull request has been automatically marked as stale due to inactivity. It will be closed in 7 days if no further activity occurs."
# Comment to post when closing a stale pull request
close-pr-message: "This pull request has been closed due to prolonged inactivity."
# Labels for stale and closed PRs
stale-pr-label: "stale"
exempt-pr-labels: "keep-open"
2 changes: 1 addition & 1 deletion .github/workflows/ruff_format.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ruff format
name: lint | ruff format
on: [ pull_request ]

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ruff_lint.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ruff lint
name: lint | ruff lint
on: [ pull_request ]

jobs:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test_code_graph_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,9 @@ jobs:
secrets:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
LLM_API_KEY: ${{ secrets.OPENAI_API_KEY }}
EMBEDDING_PROVIDER: "fastembed"
EMBEDDING_MODEL: "sentence-transformers/all-MiniLM-L6-v2"
EMBEDDING_DIMENSIONS: 384
EMBEDDING_MAX_TOKENS: 256
GRAPHISTRY_USERNAME: ${{ secrets.GRAPHISTRY_USERNAME }}
GRAPHISTRY_PASSWORD: ${{ secrets.GRAPHISTRY_PASSWORD }}
22 changes: 22 additions & 0 deletions .github/workflows/test_eval_framework.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: test | eval_framework

on:
workflow_dispatch:
pull_request:
types: [labeled, synchronize]


concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
run_eval_framework_test:
uses: ./.github/workflows/reusable_python_example.yml
with:
example-location: ./evals/eval_framework/run_eval.py
secrets:
LLM_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
GRAPHISTRY_USERNAME: ${{ secrets.GRAPHISTRY_USERNAME }}
GRAPHISTRY_PASSWORD: ${{ secrets.GRAPHISTRY_PASSWORD }}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Install dependencies
run: |
pip install jupyter
pip install llama-index-graph-rag-cognee==0.1.2
pip install llama-index-graph-rag-cognee==0.1.3
- name: Execute Jupyter Notebook
env:
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/update-contributors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: community | contributors leaderboard

on:
schedule:
- cron: "0 0 * * 1" # Runs every Monday
workflow_dispatch: # Allows manual trigger

jobs:
update-contributors:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Generate Contributor List
run: |
echo "## 💫 Contributors" > CONTRIBUTORS.md
echo "" >> CONTRIBUTORS.md
echo "Thanks to our amazing contributors! 💖" >> CONTRIBUTORS.md
echo "" >> CONTRIBUTORS.md
echo '<a href="https://github.com/topoteretes/cognee/graphs/contributors">' >> CONTRIBUTORS.md
echo ' <img src="https://contrib.rocks/image?repo=topoteretes/cognee" />' >> CONTRIBUTORS.md
echo '</a>' >> CONTRIBUTORS.md
echo "" >> CONTRIBUTORS.md
echo "## 🏆 Top Contributors" >> CONTRIBUTORS.md
echo "" >> CONTRIBUTORS.md
echo "| Rank | Contributor | Contributions |" >> CONTRIBUTORS.md
echo "|------|------------|---------------|" >> CONTRIBUTORS.md
git shortlog -sne | sort -rn | head -10 | awk '{print "| "NR" | ["$2"](https://github.com/"$2") | "$1" Commits |"}' >> CONTRIBUTORS.md
- name: Commit and Push Changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "[email protected]"
git add CONTRIBUTORS.md
git commit -m "Update contributors list"
git push
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repos:
- id: check-added-large-files
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.9.0
rev: v0.9.5
hooks:
# Run the linter.
- id: ruff
Expand Down
2 changes: 1 addition & 1 deletion cognee-mcp/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ requires-python = ">=3.10"

dependencies = [
"cognee[codegraph]",
"mcp==1.1.3",
"mcp==1.2.1",
]

[[project.authors]]
Expand Down
8 changes: 6 additions & 2 deletions cognee-mcp/src/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,13 @@ async def run():

toolResult = await session.call_tool("prune", arguments={})

toolResult = await session.call_tool("cognify", arguments={"text": text})
toolResult = await session.call_tool(
"codify", arguments={"repo_path": "/Users/borisarzentar/Projects/django"}
)

toolResult = await session.call_tool("search", arguments={"search_query": "AI"})
toolResult = await session.call_tool(
"search", arguments={"search_type": "CODE", "search_query": "exceptions"}
)

print(f"Cognify result: {toolResult.content}")

Expand Down
Loading

0 comments on commit fd9101a

Please sign in to comment.