Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ permissions:
contents: write

env:
PYTHON_VERSION: "3.11"
PYTHON_VERSION: "3.13"

jobs:
build:
Expand All @@ -31,7 +31,7 @@ jobs:

- name: Install dependencies
shell: bash
run: uv sync
run: uv sync --all-packages

- name: mkdocs build
shell: bash
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/python-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Python Build and Type Check
on:
push:
branches:
- "**/main" # match branches like feature/main
- "main" # match the main branch
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
branches:
- "**/main"
- "main"
paths-ignore:
- "**/*.md"
- ".semversioner/**"

permissions:
contents: read
pull-requests: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
# Only run the for the latest commit
cancel-in-progress: true

jobs:
python-ci:
# skip draft PRs
if: github.event.pull_request.draft == false
strategy:
matrix:
python-version: ["3.11", "3.13"]
os: [ubuntu-latest, windows-latest]
fail-fast: false # Continue running all jobs even if one fails
env:
DEBUG: 1

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
python:
- 'graphrag/**/*'
- 'uv.lock'
- 'pyproject.toml'
- '**/*.py'
- '**/*.toml'
- '**/*.ipynb'
- '.github/workflows/python*.yml'
- 'tests/**/*'

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v6

- name: Install dependencies
shell: bash
run: |
uv sync --all-packages

- name: Check
run: |
uv run poe check

- name: Build
run: |
uv build --all-packages
7 changes: 3 additions & 4 deletions .github/workflows/python-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
if: github.event.pull_request.draft == false
strategy:
matrix:
python-version: ["3.10"]
python-version: ["3.13"]
os: [ubuntu-latest, windows-latest]
fail-fast: false # continue running all jobs even if one fails
env:
Expand Down Expand Up @@ -67,12 +67,11 @@ jobs:
- name: Install dependencies
shell: bash
run: |
uv sync
uv pip install gensim
uv sync --all-packages

- name: Build
run: |
uv build
uv build --all-packages

- name: Install and start Azurite
shell: bash
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/python-notebook-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ jobs:
if: github.event.pull_request.draft == false
strategy:
matrix:
python-version: ["3.10"]
python-version: ["3.13"]
os: [ubuntu-latest, windows-latest]
fail-fast: false # Continue running all jobs even if one fails
env:
DEBUG: 1
GRAPHRAG_API_KEY: ${{ secrets.OPENAI_NOTEBOOK_KEY }}
GRAPHRAG_API_KEY: ${{ secrets.OPENAI_API_KEY }}
GRAPHRAG_API_BASE: ${{ secrets.GRAPHRAG_API_BASE }}

runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -67,8 +68,7 @@ jobs:
- name: Install dependencies
shell: bash
run: |
uv sync
uv pip install gensim
uv sync --all-packages
- name: Notebook Test
run: |
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [main]

env:
PYTHON_VERSION: "3.10"
PYTHON_VERSION: "3.13"

jobs:
publish:
Expand All @@ -17,8 +17,6 @@ jobs:

environment:
name: pypi
url: https://pypi.org/p/graphrag

permissions:
id-token: write

Expand All @@ -38,14 +36,14 @@ jobs:

- name: Install dependencies
shell: bash
run: uv sync
run: uv sync --all-packages

- name: Export Publication Version
run: echo "version=$(uv version --short)" >> $GITHUB_OUTPUT

- name: Build Distributable
shell: bash
run: uv build
run: uv run poe build

- name: Inspect all distribution members and metadata
shell: bash
Expand Down Expand Up @@ -99,8 +97,4 @@ jobs:
PY

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist
skip-existing: true
verbose: true
run: uv publish
7 changes: 3 additions & 4 deletions .github/workflows/python-smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
if: github.event.pull_request.draft == false
strategy:
matrix:
python-version: ["3.10"]
python-version: ["3.13"]
os: [ubuntu-latest, windows-latest]
fail-fast: false # Continue running all jobs even if one fails
env:
Expand Down Expand Up @@ -72,12 +72,11 @@ jobs:
- name: Install dependencies
shell: bash
run: |
uv sync
uv pip install gensim
uv sync --all-packages

- name: Build
run: |
uv build
uv build --all-packages

- name: Install and start Azurite
shell: bash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python CI
name: Python Unit Tests
on:
push:
branches:
Expand Down Expand Up @@ -32,7 +32,7 @@ jobs:
if: github.event.pull_request.draft == false
strategy:
matrix:
python-version: ["3.10", "3.11"] # add 3.12 once gensim supports it. TODO: watch this issue - https://github.com/piskvorky/gensim/issues/3510
python-version: ["3.13"]
os: [ubuntu-latest, windows-latest]
fail-fast: false # Continue running all jobs even if one fails
env:
Expand Down Expand Up @@ -67,16 +67,7 @@ jobs:
- name: Install dependencies
shell: bash
run: |
uv sync
uv pip install gensim

- name: Check
run: |
uv run poe check

- name: Build
run: |
uv build
uv sync --all-packages

- name: Unit Test
run: |
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ output/lancedb
venv/
.conda
.tmp
packages/graphrag-llm/notebooks/metrics
packages/graphrag-llm/notebooks/cache

.env
build.zip
Expand Down Expand Up @@ -58,3 +60,6 @@ docsite/

# Jupyter notebook
.ipynb_checkpoints/

# Root build assets
packages/*/LICENSE
10 changes: 10 additions & 0 deletions .semversioner/3.0.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"description": "Monorepo restructure\n\n New Packages:\n - graphrag-cache\n - graphrag-chunking\n - graphrag-common\n - graphrag-input\n - graphrag-llm\n - graphrag-storage\n - graphrag-vectors\n\n Changes:\n - New config: run graphrag init --force to reinitialize config with new layout and options.",
"type": "major"
}
],
"created_at": "2026-01-27T18:50:37+00:00",
"version": "3.0.0"
}
41 changes: 35 additions & 6 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,19 @@
"args": [
"index",
"--root",
"<path_to_index_folder>"
"${input:root_folder}"
],
"console": "integratedTerminal"
},
{
"name": "Update",
"type": "debugpy",
"request": "launch",
"module": "graphrag",
"args": [
"update",
"--root",
"${input:root_folder}"
],
"console": "integratedTerminal"
},
Expand All @@ -21,10 +33,10 @@
"module": "graphrag",
"args": [
"query",
"${input:query}",
"--root",
"<path_to_index_folder>",
"--method", "basic",
"--query", "What are the top themes in this story",
"${input:root_folder}",
"--method", "${input:query_method}"
]
},
{
Expand All @@ -35,7 +47,7 @@
"args": [
"poe", "prompt-tune",
"--config",
"<path_to_ragtest_root_demo>/settings.yaml",
"${input:root_folder}/settings.yaml",
]
},
{
Expand Down Expand Up @@ -74,5 +86,22 @@
"console": "integratedTerminal",
"justMyCode": false
},
]
],
"inputs": [
{
"id": "root_folder",
"type": "promptString",
"description": "Enter the root folder path"
},
{
"id": "query_method",
"type": "promptString",
"description": "Enter the query method (e.g., 'global', 'local')"
},
{
"id": "query",
"type": "promptString",
"description": "Enter the query text"
}
]
}
2 changes: 1 addition & 1 deletion .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ trigger:

variables:
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
pythonVersion: "3.10"
pythonVersion: "3.13"
poetryVersion: "1.6.1"
nodeVersion: "18.x"
artifactsFullFeedName: "Resilience/resilience_python"
Expand Down
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
# Changelog

Note: version releases in the 0.x.y range may introduce breaking changes.

## 3.0.0

- major: Monorepo restructure

New Packages:
- graphrag-cache
- graphrag-chunking
- graphrag-common
- graphrag-input
- graphrag-llm
- graphrag-storage
- graphrag-vectors

Changes:
- New config: run graphrag init --force to reinitialize config with new layout and options.

## 2.7.1

- patch: Pin pandas==2.3.3.
Expand Down
Loading
Loading