From 244a266c06c841e37307c1e7aa33adfd06194c28 Mon Sep 17 00:00:00 2001 From: Brian K <6502571+kanya-approve@users.noreply.github.com> Date: Thu, 28 May 2026 09:38:31 -0400 Subject: [PATCH] chore: switch CI to uv, remove uv.lock from gitignore (#885) * chore: declare pytest as a uv dev dependency The contributing guide currently tells contributors `pip install pytest` as a separate step, and CI does the same. Move pytest into PEP 735 `[dependency-groups]` so it's declared in pyproject.toml and `uv sync` installs it by default (no `--with` workaround, no separate install line). Update CI to use astral-sh/setup-uv + `uv sync` + `uv run pytest`, and refresh the Contributing section of the README to match. `[dependency-groups]` is the right home (vs `[project.optional-dependencies]`) because pytest is dev-only and shouldn't appear in the published wheel's optional features list alongside things like `pdf` or `mcp`. * remove uv.lock from gitignore --- .github/workflows/ci.yml | 17 +++++++---------- .gitignore | 1 - README.md | 25 +++++++++++-------------- 3 files changed, 18 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c7864fe..aed9aed4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,23 +15,20 @@ jobs: python-version: ["3.10", "3.12"] steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 + - name: Install uv + uses: astral-sh/setup-uv@v8.1.0 with: python-version: ${{ matrix.python-version }} - name: Install dependencies - run: | - pip install -e ".[mcp,pdf,watch,sql]" - pip install pytest + run: uv sync --extra mcp --extra pdf --extra watch --extra sql - name: Run tests - run: | - python -m pytest tests/ -q --tb=short + run: uv run pytest tests/ -q --tb=short - name: Verify install works end-to-end run: | - graphify --help - graphify install + uv run graphify --help + uv run graphify install diff --git a/.gitignore b/.gitignore index 0e6fc586..bb0fe9dc 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,6 @@ skills/ docs/superpowers/ .vscode/ openspec/ -uv.lock # Local benchmark scripts — never commit scripts/run_k2_*.py scripts/llm.py diff --git a/README.md b/README.md index d0373a80..947d3f7c 100644 --- a/README.md +++ b/README.md @@ -554,34 +554,31 @@ Built for people whose work lives across hundreds of conversations and documents ### Development setup -Clone the repo and install in editable mode: +The project uses [uv](https://docs.astral.sh/uv/) for dev workflow. Install it once, then: ```bash git clone https://github.com/safishamsi/graphify.git cd graphify git checkout v8 # active development branch -# Create a virtual environment (Python 3.10+ required): -python3 -m venv .venv -source .venv/bin/activate # Windows: .venv\Scripts\activate - -# Install in editable mode with all optional extras: -pip install -e ".[all]" +# Create the project venv and install graphify + all extras + the dev group +# (pytest). uv installs the dev dependency group by default; pass --no-dev to +# skip it. +uv sync --all-extras ``` Verify the editable install: ```bash -graphify --version -python -c "import graphify; print(graphify.__file__)" +uv run graphify --version +uv run python -c "import graphify; print(graphify.__file__)" ``` ### Running tests ```bash -pip install pytest -pytest tests/ -q # run the full suite -pytest tests/test_extract.py -q # one module -pytest tests/ -q -k "python" # filter by name +uv run pytest tests/ -q # run the full suite +uv run pytest tests/test_extract.py -q # one module +uv run pytest tests/ -q -k "python" # filter by name ``` > macOS note: the test suite includes both `sample.f90` and `sample.F90` fixtures. These collide on case-insensitive HFS+ / APFS file systems. Run on Linux or in a Docker container if you need to test both Fortran variants simultaneously. @@ -590,7 +587,7 @@ pytest tests/ -q -k "python" # filter by name - Active development happens on the `v8` branch. - Commit style: `fix: ` / `feat: ` / `docs: ` -- Before opening a PR, run `pytest tests/ -q` and confirm it passes. +- Before opening a PR, run `uv run pytest tests/ -q` and confirm it passes. - Add a fixture file to `tests/fixtures/` and tests to `tests/test_languages.py` for any new language extractor. ### What to contribute