Update Dependencies (GraphRAG monorepo)
Goal
Raise dependency versions across this uv workspace, re-lock, and fix any code or test
fallout until uv run poe check and uv run poe test_unit are both green — without
touching the version machinery that the release process owns.
Hard rules (non-negotiable)
- Only the Microsoft feed proxy. All resolves and syncs MUST use
https://packagefeedproxy.microsoft.io/pypi/simple(the[[tool.uv.index]]configured in the rootpyproject.toml). Never resolve against public PyPI, never add--index/--default-index/--index-urloverrides, and never setUV_INDEX_URLorPIP_INDEX_URLto pypi.org. Do not disable or reorder the configured index. - Target versions must be at least 7 days old. Only bump to a version that was released
more than 7 days ago. The proxy does not serve versions published within the last week —
syncing to a too-new version WILL fail. Before pinning a specific version, verify its
release date and pick the newest release older than 7 days; otherwise let the specifier
float and let
uv lockchoose (it can only see eligible versions on the proxy anyway).
Layout facts
- This is a uv workspace monorepo. The root
pyproject.tomlholds thedevgroup under[dependency-groups]and the[tool.poe.tasks]commands. - Runtime dependencies live in each member's
packages/*/pyproject.tomlunder[project] dependencies. - Workspace members are wired via
[tool.uv.sources]({ workspace = true }) and pinned to each other withgraphrag-*==X.Y.Zlines. - Package resolution goes through a Microsoft-internal index (
[[tool.uv.index]]); expect that feed to be used, not public PyPI directly.
Do NOT edit these (release-owned)
- Cross-package pins
graphrag-cache==...,graphrag-llm==..., etc. in any package. These are rewritten automatically byscripts/update_workspace_dependency_versions.pyfrom the semversioner version. Hand-editing them causes drift. [project] versionfields — managed by semversioner ("do not change the version here manually").graspologic-native>=1.2,<1.3— held below 1.3 on purpose; 1.3.x changes Leiden clustering output and breaks golden regression data. Only bump with a deliberate golden-data refresh, and say so explicitly.
Process
Baseline first. Confirm a clean working tree and that checks/tests already pass before changing anything, so later failures are attributable to the bump:
uv run poe checkuv run poe test_unitPrefer a dedicated branch (e.g.dep-sweep).
Decide the scope. Either a targeted set of packages the user named, or a full sweep. Edit the
~=/>=/<specifiers in the relevant[project] dependencies(packages/*/pyproject.toml) and the rootdevgroup. Leave the release-owned lines above untouched.Resolve and lock. All of these use the configured Microsoft feed proxy — do not pass any index override (see Hard rules).
- For a full "get latest allowed" pass:
uv lock --upgrade. - For targeted bumps after editing specifiers:
uv lock. - Then install:
uv sync --all-packages. If resolution fails, read the conflict, relax/adjust the offending specifier, and re-lock. Do not deleteuv.lockto force it. - If a sync fails to find a version you just pinned, it is almost certainly younger than 7 days on the proxy — step down to the newest release older than one week.
- For a full "get latest allowed" pass:
Static checks. Run
uv run poe check(this isruff format --check+ruff check+pyright). Apply safe autofixes withuv run poe fix; format withuv run poe format. Fix remaining lint/type errors by hand — see Gotchas and the migration reference.Tests. Run
uv run poe test_unit(NOTuv run poe test, which runs the full coverage suite). Runuv run poe test_verbsanduv run poe test_integrationwhen the change is broad or touches indexing/query. Investigate every new failure.Repair breakages. For test/type failures caused by a library's API change, load
references/migration-gotchas.mdand apply the documented pattern. Keep fixes minimal and consistent with sibling code; prefer a real fix over a# noqa.Record the change. Add a changelog entry:
uv run semversioner add-change -t patch -d "<short description>"(useminor/majoronly if the user's intent warrants it).Final verification. Re-run
uv run poe checkanduv run poe test_unit; both must be green (see the known-flake note below before calling a failure a regression).
Gotchas (this repo)
test_unit, nottest.poe testruns coverage over everything and is slow; usetest_unitfor the fast feedback loop.- Ruff runs in preview mode (
preview = true,target-version = "py310"). Preview-only rules such asRUF069(float equality) andASYNC119fire here even though they may not in other repos. - Known pre-existing flake:
tests/unit/indexing/test_profiling.py::TestWorkflowProfiler::test_handles_exception_in_contextis timing-sensitive and can fail intermittently — it is not a dependency regression. uv sync --all-packages(not bareuv sync) to install every workspace member.- pandas is on the 3.0 line and numpy on 2.x. Their major-version API changes are the usual source of post-bump breakage — see the reference file.
- Version-bump edits touch many
pyproject.tomlfiles; make sure you did not accidentally modify agraphrag-*==pin or aversionfield while editing nearby specifiers.
Load-on-demand reference
When a bump breaks tests or type-checking with a library API change (especially pandas or
numpy), read references/migration-gotchas.md for
verified, repo-specific fix patterns before improvising.
Completion checklist
- All resolves/syncs used the
packagefeedproxy.microsoft.ioindex; no public-PyPI or index-override was introduced. - No dependency was bumped to a version released within the last 7 days.
- Only intended specifiers changed; no
graphrag-*==pin orversionfield edited. -
uv.lockregenerated viauv lock/uv lock --upgrade(not hand-edited or deleted). -
uv run poe checkpasses (ruff format, ruff lint, pyright). -
uv run poe test_unitpasses (ignoring only the known profiling flake). - Broader suites run if the change was broad (
test_verbs/test_integration). - A semversioner changelog entry was added.
- Any risky/held pin (e.g.
graspologic-native) left in place unless explicitly bumped.