From c72e96a6e99d0f20495946db2a0b334c099c153f Mon Sep 17 00:00:00 2001 From: "Andrew (shixish)" Date: Sun, 29 Nov 2026 13:07:44 -1000 Subject: [PATCH] Remove the [tool.uv.sources] table so Dependabot can run Dependabot's uv updater failed because the table pointed langchain-core and langchain-tests at a sibling ../langchain checkout that is not there in the Dependabot job. CI and release builds already resolved both from PyPI with --no-sources. uv.lock already used the PyPI registry for both, so it does not change (uv 0.9.5 `uv lock --check` passes). The --no-sources flags stay in the workflows; they are now redundant but harmless. Comments in ci.yml and CLAUDE.md that described the table are updated. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 12 +++++------- CLAUDE.md | 6 +++--- pyproject.toml | 7 ------- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5f6236f..66fdcf1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,10 +14,9 @@ permissions: contents: read env: - # `[tool.uv.sources]` pins langchain-core / langchain-tests to a sibling - # `../langchain/` checkout that does not exist on CI. `--no-sources` ignores - # that table and resolves them from PyPI instead — the same path release - # builds take. It forces re-resolution, so the lockfile is not used here. + # `uv sync` below passes `--no-sources`. pyproject.toml no longer has a + # `[tool.uv.sources]` table, so the flag is redundant but harmless; every + # dependency resolves from PyPI, the same path release builds take. UV_NO_SYNC: "true" jobs: @@ -54,7 +53,6 @@ jobs: - run: uv sync --no-sources --group test - run: make test - name: Check for unexpected file changes - # `uv sync --no-sources` rewrites uv.lock in place (local editable - # source -> PyPI registry); that diff is expected in CI. Exclude it so - # the guard still catches stray files a test might have written. + # uv.lock is excluded so a lockfile rewrite by `uv sync` cannot fail + # this guard; it still catches stray files a test might have written. run: git diff --exit-code -- ':!uv.lock' diff --git a/CLAUDE.md b/CLAUDE.md index ec8ed60..7811018 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -5,9 +5,9 @@ LangChain integration package for the Diffbot APIs (Knowledge Graph, Extract, We ## Stack - **Build/deps**: `uv` (not Poetry/pip). `pyproject.toml` is PEP 621 with `hatchling` as the build backend. Dependency groups (`test`, `lint`, `typing`) are declared under `[dependency-groups]` and invoked via `uv run --group ...`. -- **HTTP / Diffbot transport**: the official [`diffbot-python`](https://github.com/diffbot/diffbot-python) SDK. It wraps `httpx` under the hood, so `respx` continues to work for unit tests — mocks target the real upstream URLs (KG: `POST https://kg.diffbot.com/kg/v3/dql` with a JSON body, web search: `https://llm.diffbot.com/api/v1/web_search`, extract: `https://api.diffbot.com/v3/analyze`, ask: `https://llm.diffbot.com/rag/v1/chat/completions`, NLP: `https://nl.diffbot.com/v1/`, crawl: `https://api.diffbot.com/v3/crawl`, ontology: `https://kg.diffbot.com/kg/ontology`). It is published on PyPI as `diffbot` and declared as `diffbot>=3.4.0,<4`; `uv.lock` resolves it from PyPI. To pick up a new SDK release, run `uv lock --upgrade-package diffbot --no-sources` with the uv version CI pins (0.9.5, so the lock stays at `revision = 3`). `langchain-core` / `langchain-tests` are still resolved during local dev from the sibling `../langchain/` checkout via `[tool.uv.sources]` — release builds use the published versions. +- **HTTP / Diffbot transport**: the official [`diffbot-python`](https://github.com/diffbot/diffbot-python) SDK. It wraps `httpx` under the hood, so `respx` continues to work for unit tests — mocks target the real upstream URLs (KG: `POST https://kg.diffbot.com/kg/v3/dql` with a JSON body, web search: `https://llm.diffbot.com/api/v1/web_search`, extract: `https://api.diffbot.com/v3/analyze`, ask: `https://llm.diffbot.com/rag/v1/chat/completions`, NLP: `https://nl.diffbot.com/v1/`, crawl: `https://api.diffbot.com/v3/crawl`, ontology: `https://kg.diffbot.com/kg/ontology`). It is published on PyPI as `diffbot` and declared as `diffbot>=3.4.0,<4`; `uv.lock` resolves it from PyPI. To pick up a new SDK release, run `uv lock --upgrade-package diffbot --no-sources` with the uv version CI pins (0.9.5, so the lock stays at `revision = 3`). `langchain-core` / `langchain-tests` also come from PyPI, locally and in release builds; there is no `[tool.uv.sources]` table. - **Models**: `pydantic` v2. -- **LangChain**: targets `langchain-core >=1.0,<2.0`. During local dev `langchain-core` and `langchain-tests` are resolved from a sibling `../langchain/` checkout via `[tool.uv.sources]` — release builds use the published versions. +- **LangChain**: targets `langchain-core >=1.0,<2.0`. `langchain-core` and `langchain-tests` resolve from PyPI everywhere, the same as release builds. - **Test runner**: `pytest` with `asyncio_mode = "auto"`. ## Architectural decisions @@ -78,7 +78,7 @@ make test_integration # integration tests (needs DIFFBOT_API_TOKEN) `.github/workflows/ci.yml` runs on every push to `main` and every PR: `make lint` + `make typing` (Python 3.12) and `make test` (Python 3.10 and 3.13). `.github/workflows/integration.yml` runs `make test_integration` on push to `main`, on a twice-monthly drift schedule (1st and 15th at 14:17 UTC), and on-demand (`workflow_dispatch`), reading the repo-level `DIFFBOT_API_TOKEN` secret. It is kept off the per-PR path on purpose so the token is never exposed to untrusted fork PR code. -CI cannot use the `[tool.uv.sources]` table, which pins `langchain-core` / `langchain-tests` to the sibling `../langchain/` checkout that only exists locally. Every CI install is `uv sync --no-sources` (resolves those from PyPI, the same path release builds take) and sets `UV_NO_SYNC=true` so the `make` targets' `uv run` reuse the synced env instead of re-resolving against the sources table. `--no-sources` re-resolves, so `uv.lock` is not used in CI. +Every CI install is `uv sync --no-sources` and sets `UV_NO_SYNC=true` so the `make` targets' `uv run` reuse the synced env. pyproject.toml has no `[tool.uv.sources]` table (it was removed so Dependabot's `uv` updater can resolve the project), so `--no-sources` is now redundant but harmless; everything resolves from PyPI, the same path release builds take. ## Releasing diff --git a/pyproject.toml b/pyproject.toml index 6059557..a05c9b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,13 +55,6 @@ test = [ lint = ["ruff>=0.6,<1.0"] typing = ["mypy>=1.10,<2.0"] -# Local dev only: langchain-core / langchain-tests from a sibling ../langchain -# checkout. CI and release builds pass --no-sources and use PyPI. The diffbot SDK -# is deliberately not a source; it always comes from PyPI. -[tool.uv.sources] -langchain-core = { path = "../langchain/libs/core", editable = true } -langchain-tests = { path = "../langchain/libs/standard-tests", editable = true } - [tool.hatch.build.targets.wheel] packages = ["langchain_diffbot"]