Switch to hatchling, uv sources, and from_artifact() APIs#8
Merged
Conversation
- Build backend: setuptools -> hatchling with [tool.hatch.build.targets.wheel] - pyproject.toml: rename test -> dev extra, add ruff config, add pythonpath to pytest, add [tool.uv.sources] pointing to sibling vtk-* packages so `uv add vtk-mcp` resolves them from local paths during development - config.py: knowledge_artifact_path is now Optional (None = auto-download via VTKAPIIndex.from_artifact); qdrant_url is Optional (None = use Retriever.from_artifact embedded storage); enable_retrieval defaults False - composition.py: calls VTKAPIIndex.from_artifact(vtk_version) when no local path is given; calls Retriever.from_artifact when qdrant_url is unset, so no Qdrant server is needed for retrieval - __main__.py: expose --vtk-version / VTK_MCP_VTK_VERSION CLI option - ci.yml: replace pip+venv with uv, install sibling packages from GitHub, replace black/flake8 with ruff lint + format checks - Apply ruff formatting across all src/vtk_mcp source files
…d time - Use uv for fast dependency installation - Install vtk-knowledge and vtk-validate from GitHub (not on PyPI) - Install vtk-mcp[retrieval] to pull in vtk-index - Pre-download VTKAPIIndex artifact and Retriever embedded Qdrant storage during image build so the container is fully ready without network access - VTK_VERSION build arg selects which artifact version to cache (default 9.3.0)
setup-uv creates a venv; use `uv venv` + `uv pip install` (no --system) and invoke binaries directly via .venv/bin/ as vtk-index does.
- pyproject.toml [tool.uv.sources]: switch from local path overrides to git URLs so `uv sync` works in CI without sibling projects checked out locally - ci.yml: use `uv sync --extra dev` + `uv run` instead of separate uv pip install steps; revert docker-deploy back to deploy.Dockerfile - deploy.Dockerfile: rewrite to use uv, install vtk-* from GitHub, and pre-cache the vtk-knowledge JSONL and vtk-index embedded Qdrant storage at image build time so the container serves requests without network access
- lint/test jobs: back to pip + setup-python (no uv dependency) - new uv-smoke job: verifies `uv sync --extra dev` resolves correctly and the package imports, exercising the [tool.uv.sources] git URL entries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[tool.hatch.build.targets.wheel](mirrors vtk-knowledge/vtk-index/vtk-validate)[tool.uv.sources]mapsvtk-knowledge,vtk-validate, andvtk-indexto local sibling paths for development; when installed viauv add vtk-mcpfrom another project, uv resolves them from GitHubknowledge_artifact_pathis nowOptional— when unset,VTKAPIIndex.from_artifact(vtk_version)downloads the JSONL from ghcr.io automatically; no local file requiredqdrant_urlis nowOptional— when unset and retrieval is enabled,Retriever.from_artifact(vtk_version)downloads the pre-built embedded Qdrant storage; no server required--vtk-version/VTK_MCP_VTK_VERSIONselects which VTK artifact to fetchuv+ruff(matching sibling projects); installs vtk-knowledge and vtk-validate from GitHub in CIsrc/vtk_mcpsource filesTest plan
pytest -m unit)pytest tests/test_client_no_server.py)ruff check src/— no errorsruff format --check src/— clean