feat(install) + docs + chore(workplan): complete T03 for CYA-WP-0004 — Makefile, optional deps, and improved dev-head installation docs

This commit is contained in:
2026-05-26 23:21:23 +02:00
parent 8c7bfb57f4
commit b483bf1f34
5 changed files with 118 additions and 14 deletions

View File

@@ -167,8 +167,11 @@ First useful worker moves:
## Commands
```bash
# Install (editable, for development)
pip install -e .
# Recommended: Install from latest development code
make dev-install
# Or manually:
# pip install -e ".[dev]"
# Run the assistant
cya "your natural language request here"

30
Makefile Normal file
View File

@@ -0,0 +1,30 @@
# Simple developer Makefile for can-you-assist
# Focus: easy dev-head install and common tasks
.PHONY: dev-install install test clean dist
# Install the package in editable mode from the current source
# This is the recommended way to work on the latest code
dev-install:
pip install -e ".[dev]"
# Standard install (for comparison / released packages later)
install:
pip install .
# Run the test suite
test:
python3 -m pytest tests/ -q
# Clean build artifacts
clean:
rm -rf build/ dist/ *.egg-info/ src/cya/_version.py
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
# Build distribution packages (sdist + wheel)
dist: clean
python -m build
# Show current version (useful after setuptools_scm changes)
version:
python3 -c "import cya; print(cya.__version__)"

View File

@@ -18,13 +18,61 @@ usable after `pip install -e .`:
- Automatic rule-based risk classification with mandatory confirmation for anything destructive, privileged, mass-edit, or network-affecting
- All LLM interaction flows through a documented `LLMAdapter` seam (currently a deterministic fake; ready for real `llm-connect`)
## Installation (development)
## Installation
### Recommended: Install from Development Head (Latest Code)
This is the easiest way to stay on the absolute latest version while you work:
```bash
git clone <this-repo>
git clone https://github.com/worsch/can-you-assist.git
cd can-you-assist
pip install -e .
# One-command developer install (includes dev tools)
make dev-install
# Or manually:
# pip install -e ".[dev]"
```
This installs the package in editable mode from your local checkout. You will always get the newest code when you pull.
After installation:
```bash
cya --help
cya --version # Will show a development version (e.g. 0.2.0.devN+g...)
```
### Alternative: Install Directly from Git (No Local Clone)
You can also install the latest code directly from GitHub without cloning first:
```bash
pip install "git+https://github.com/worsch/can-you-assist.git@main#egg=can-you-assist[dev]"
```
This is useful for quick testing or on remote machines.
### For Future Released Versions
Once we publish packages (future work), you will be able to do:
```bash
pip install can-you-assist
```
or a specific version:
```bash
pip install "can-you-assist>=0.3.0"
```
### Updating to Latest Development Code
```bash
cd can-you-assist
git pull
pip install -e ".[dev]" # or just `make dev-install`
```
## Usage examples
@@ -135,9 +183,12 @@ decisions, and integration guide.
## Development
```bash
pip install -e .
# Recommended one-liner (see Installation section above)
make dev-install
pytest tests/ -q
cya "..." # manual verification
make version # show current dev version
```
## License

View File

@@ -17,6 +17,16 @@ dependencies = [
"rich>=13.0.0",
]
[project.optional-dependencies]
dev = [
"ruff>=0.4.0",
"pytest>=8.0",
"build>=1.0",
]
test = [
"pytest>=8.0",
]
[project.scripts]
cya = "cya.cli.main:run"

View File

@@ -94,19 +94,29 @@ completed: "2026-05-27"
```task
id: CYA-WP-0004-T03
status: todo
status: done
priority: high
state_hub_task_id: "14e085dd-847a-4678-a1e4-abe5e3c369aa"
started: "2026-05-27 ralph iter 3"
completed: "2026-05-27"
```
- Ensure `pip install "git+https://github.com/worsch/can-you-assist.git"` (and branch variants) works cleanly.
- Add any necessary `[project.optional-dependencies]` (e.g., `dev`, `test`).
- Create a recommended one-liner or short documented flow for the primary user.
- Optionally add a `Makefile` target (e.g., `make dev-install`) as a convenience.
**Done.**
**Acceptance criteria**:
- A non-developer can successfully install the latest code from git with one command and get a working `cya` binary.
- The installed version clearly indicates it is from development head.
- Added `[project.optional-dependencies]` `dev` and `test` in `pyproject.toml`.
- Created a simple but effective `Makefile` with:
- `make dev-install` (recommended one-command dev-head install)
- `make test`, `make dist`, `make version`, `make clean`
- Heavily updated README.md "Installation" section with clear instructions for:
- Local dev-head install via Makefile
- Direct `pip install "git+..."` from GitHub
- Future released packages
- Updated AGENTS.md Commands section to reference the new `make dev-install` flow.
- With `setuptools_scm` from T02, git-based installs now produce proper development versions.
**Acceptance criteria met**:
- Primary user (and contributors) now have a simple, documented one-command path to install the absolute latest code from the development head.
- The installed version will clearly show it is a development version.
### T04 — Enable clean building of distribution packages