diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f1f9af..b78c153 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,15 @@ # Changelog +## Unreleased + +Internal: removed the pre-publish `make dev-sdk` target and the SDK relock TODOs now that `diffbot` 3.4.0 is on PyPI. No package changes. + ## 0.3.0 - 2026-11-17 Require `diffbot>=3.4.0,<4`. 0.2.0 is already on PyPI, so this release is 0.3.0. DQL follows the SDK: POST `https://kg.diffbot.com/kg/v3/dql` with a JSON body; the token stays the `token` query parameter. GET remains the low-level escape hatch. -Relock with `uv lock --upgrade-package diffbot` once 3.4.0 is on PyPI. That command needs the sibling `../langchain` checkout so the editable `langchain-core` / `langchain-tests` sources stay in `uv.lock`. `make dev-sdk` is only a pre-publish local install; do not commit it. +`uv.lock` resolves `diffbot` 3.4.0 from PyPI (`uv lock --no-sources`). Publishing is PyPI trusted publishing from `.github/workflows/release.yml` (no token, no GitHub environment). Tag `v0.3.0`. The SDK still has no `py.typed` marker, so the mypy override stays. diff --git a/CLAUDE.md b/CLAUDE.md index 6422d0b..ec8ed60 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -5,7 +5,7 @@ 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`. Until 3.4.0 is on PyPI, `make dev-sdk` can install a sibling checkout over the synced env; run the `make` targets with `UV_NO_SYNC=true` so `uv run` doesn't re-resolve and replace it. Do not commit that editable install. Relock with `uv lock --upgrade-package diffbot` once 3.4.0 is published (that command needs the sibling `../langchain` checkout). `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` are still resolved during local dev from the sibling `../langchain/` checkout via `[tool.uv.sources]` — release builds use the published versions. - **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. - **Test runner**: `pytest` with `asyncio_mode = "auto"`. diff --git a/Makefile b/Makefile index 446098f..4c5df69 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,4 @@ -.PHONY: dev-sdk format lint test test_integration typing build clean bump-patch bump-minor bump-major set-token-pypi set-token-testpypi release-test release verify-release-test verify-release - -# Dev-only: install a local Diffbot SDK checkout over the synced env (no-op if -# ../diffbot-python is absent). The release dependency is diffbot>=3.4.0,<4 from -# PyPI. Pair with UV_NO_SYNC=true so `make test` doesn't re-resolve and replace it. -# Do not commit the editable install. -dev-sdk: - @if [ -d ../diffbot-python ]; then uv pip install -e ../diffbot-python; \ - else echo "../diffbot-python not found; skipping"; fi +.PHONY: format lint test test_integration typing build clean bump-patch bump-minor bump-major set-token-pypi set-token-testpypi release-test release verify-release-test verify-release format: uv run --group lint ruff format . diff --git a/pyproject.toml b/pyproject.toml index 3050c8c..6059557 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,9 +24,6 @@ requires-python = ">=3.10,<4.0" dependencies = [ "langchain-core>=1.0,<2.0", "httpx>=0.27,<1.0", - # Relock after 3.4.0 is on PyPI: `uv lock --upgrade-package diffbot` - # (needs the sibling ../langchain checkout). `make dev-sdk` is only for a - # pre-publish local install; do not commit that path. "diffbot>=3.4.0,<4", ] @@ -58,10 +55,9 @@ test = [ lint = ["ruff>=0.6,<1.0"] typing = ["mypy>=1.10,<2.0"] -# Dev-only: the unreleased Diffbot SDK is installed from a sibling checkout by -# `make dev-sdk` (`uv pip install -e ../diffbot-python`, skipped when that -# directory is absent). It is deliberately NOT a uv source: a path source can't -# be conditional on the checkout existing and would break every other install. +# 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 }