Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,20 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v8.2.0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
run: uv python install 3.12

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Sync dependencies
run: uv sync --extra dev

- name: Ruff
run: ruff check vesper tests
run: uv run ruff check vesper tests

- name: Mypy
run: mypy vesper
run: uv run mypy vesper

- name: Pytest
run: pytest -q
run: uv run pytest -q
14 changes: 7 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

## Python environment

Use the project virtualenv for all Python commands:
Use `uv run` for all Python commands:

```sh
.venv/bin/python -m pytest
.venv/bin/python -m compileall vesper tests
uv run pytest
uv run python -m compileall vesper tests
```

Do not use system `python`, `pytest`, or package commands unless explicitly asked.
Expand All @@ -16,13 +16,13 @@ Do not use system `python`, `pytest`, or package commands unless explicitly aske
Preferred full verification:

```sh
.venv/bin/python -m pytest -q
uv run pytest -q
```

For focused checks:

```sh
.venv/bin/python -m pytest tests/test_service.py -q
uv run pytest tests/test_service.py -q
```

## GitHub issue/PR workflow
Expand All @@ -39,12 +39,12 @@ For issue work:

1. Create a dedicated branch before editing.
2. Keep unrelated local files out of commits, especially untracked scratch directories like `tmp/`.
3. Verify with `.venv/bin/python` commands before opening a PR.
3. Verify with `uv run` commands before opening a PR.
4. In the PR body, include a concise summary and exact test commands run.
5. After merge, switch back to `main`, fetch/prune the remote, fast-forward local `main`, and delete the local feature branch.

This repository's GitHub remote may be named `upstream` rather than `origin`; check configured remotes if a push to `origin` fails.

## Notes

The system Python environment may not have all project dependencies installed.
Run `uv sync --extra dev` first to create the environment; `uv run` executes commands within it. The system Python environment may not have all project dependencies installed.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,15 @@ The project is built around one principle: keep the main conversational agent le
## Requirements

- Python 3.12+
- uv (install: `curl -LsSf https://astral.sh/uv/install.sh | sh`)
- Cider running locally
- Cider external application access enabled
- a Cider API token if your Cider build requires one

## Install

```bash
python3 -m venv .venv
source .venv/bin/activate
pip install -e .[dev]
uv sync --extra dev
cp config.example.json config.json
```

Expand Down
24 changes: 11 additions & 13 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,41 @@ This guide is for contributors and agents changing Vesper.

## Environment

Use the project virtual environment for Python commands:
Run `uv sync --extra dev` to create the `.venv` and install the project with dev dependencies:

```bash
python3 -m venv .venv
source .venv/bin/activate
pip install -e .[dev]
uv sync --extra dev
```

When running tests or Python modules in this repository, prefer the explicit virtualenv path:
Use `uv run` for all Python commands. `uv run` executes commands inside the environment managed by `uv sync`:

```bash
.venv/bin/python -m pytest -q
.venv/bin/python -m compileall vesper tests
uv run pytest -q
uv run python -m compileall vesper tests
```

Do not assume the system Python has the project dependencies installed.
Run `uv sync --extra dev` first if the environment does not exist; `uv run` will then manage execution within it.

## Test Commands

Preferred full verification:

```bash
.venv/bin/python -m pytest -q
uv run pytest -q
```

Focused checks:

```bash
.venv/bin/python -m pytest tests/test_service.py -q
.venv/bin/python -m pytest tests/test_config.py -q
.venv/bin/python -m pytest tests/test_a2a.py tests/test_mcp.py -q
uv run pytest tests/test_service.py -q
uv run pytest tests/test_config.py -q
uv run pytest tests/test_a2a.py tests/test_mcp.py -q
```

Syntax/import check:

```bash
.venv/bin/python -m compileall vesper tests
uv run python -m compileall vesper tests
```

## Project Layout
Expand Down
Loading
Loading