Files
2026-03-15 04:05:29 -05:00

87 lines
1.6 KiB
Markdown

# us-cpa package
Standalone Python CLI package for the `us-cpa` skill.
## Install
From `skills/us-cpa/`:
```bash
python3 -m ensurepip --upgrade
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install -e '.[dev]'
```
## OpenClaw installation
Install the skill into the OpenClaw workspace copy, not only in the repo checkout.
1. Sync the skill into the workspace:
```bash
rsync -a --delete --exclude '.venv' \
~/.openclaw/workspace/projects/stef-openclaw-skills/skills/us-cpa/ \
~/.openclaw/workspace/skills/us-cpa/
```
2. Create a skill-local virtualenv in the workspace copy:
```bash
cd ~/.openclaw/workspace/skills/us-cpa
python3 -m venv .venv
. .venv/bin/activate
python3 -m ensurepip --upgrade
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install -e '.[dev]'
```
3. Run the workspace wrapper:
```bash
~/.openclaw/workspace/skills/us-cpa/scripts/us-cpa --help
```
The wrapper now prefers `~/.openclaw/workspace/skills/us-cpa/.venv/bin/python` when present and falls back to `python3` otherwise.
Keep the `--exclude '.venv'` flag on future syncs, otherwise the workspace virtualenv will be deleted by `rsync --delete`.
## Run
Installed entry point:
```bash
us-cpa --help
```
Repo-local wrapper without installation:
```bash
scripts/us-cpa --help
```
OpenClaw workspace wrapper:
```bash
~/.openclaw/workspace/skills/us-cpa/scripts/us-cpa --help
```
Module execution:
```bash
python3 -m us_cpa.cli --help
```
## Tests
From `skills/us-cpa/`:
```bash
PYTHONPATH=src python3 -m unittest
```
Or with the dev extra installed:
```bash
python -m unittest
```