docs: realistic install instructions, source URL, dev section
- README install section now reflects reality (git URL, not PyPI) - Add a Source link at the top and a Development section at the bottom - Update Running-the-bundled-example to clone-then-uv-sync flow since examples/ is sdist-only - pyproject.toml: replace github.com/your-org placeholder with the actual git.vercanti.com URL Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
40
README.md
40
README.md
@@ -7,13 +7,29 @@ Useful when you need mouse movement that is statistically indistinguishable
|
||||
from a real user — for ML-based bot-detection research, behavioral biometrics
|
||||
prototyping, or replay-based test fixtures.
|
||||
|
||||
- Source: <https://git.vercanti.com/yellowdog/human_mouse>
|
||||
- License: MIT
|
||||
|
||||
## Install
|
||||
|
||||
The package is not on PyPI yet. Install directly from the git remote:
|
||||
|
||||
```bash
|
||||
uv add human_mouse # or: pip install human_mouse
|
||||
uv add "human_mouse[demo]" # also installs cloakbrowser for the example
|
||||
# core only
|
||||
uv add "human_mouse @ git+https://git.vercanti.com/yellowdog/human_mouse.git"
|
||||
|
||||
# with the bundled CloakBrowser example
|
||||
uv add "human_mouse[demo] @ git+https://git.vercanti.com/yellowdog/human_mouse.git"
|
||||
```
|
||||
|
||||
Or pin to a specific commit / tag:
|
||||
|
||||
```bash
|
||||
uv add "human_mouse @ git+https://git.vercanti.com/yellowdog/human_mouse.git@v0.1.0"
|
||||
```
|
||||
|
||||
`pip install` works with the same `git+https://...` URL.
|
||||
|
||||
## One-time dataset download
|
||||
|
||||
```python
|
||||
@@ -85,10 +101,13 @@ hm.replay(page, points, speed=1.0)
|
||||
## Running the bundled example
|
||||
|
||||
The `examples/` folder ships a Playwright canvas page (`demo.html`) plus a
|
||||
runner script that uses [CloakBrowser](https://github.com/CloakHQ/CloakBrowser):
|
||||
runner script that uses [CloakBrowser](https://github.com/CloakHQ/CloakBrowser).
|
||||
You need a local checkout for this since `examples/` ships only in the sdist:
|
||||
|
||||
```bash
|
||||
uv add "human_mouse[demo]"
|
||||
git clone https://git.vercanti.com/yellowdog/human_mouse.git
|
||||
cd human_mouse
|
||||
uv sync --extra demo
|
||||
python -m human_mouse download ./sapimouse_data # one-time, ~8 MB
|
||||
uv run python examples/cloakbrowser_demo.py sapi # one trajectory
|
||||
uv run python examples/cloakbrowser_demo.py multi --n 10 # 10 overlaid
|
||||
@@ -99,6 +118,19 @@ Outputs land in `./outputs/`:
|
||||
- `sapi.png` + `sapi.json` — single trajectory screenshot and per-event coords
|
||||
- `multi/overlay.png` + per-run JSONs + `summary.json`
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
git clone https://git.vercanti.com/yellowdog/human_mouse.git
|
||||
cd human_mouse
|
||||
uv sync --all-extras # core + [demo] + [dev]
|
||||
uv run pytest # 23 tests, ~40s with SapiMouse present
|
||||
uv build # produces wheel + sdist in dist/
|
||||
```
|
||||
|
||||
Integration tests auto-skip when `sapimouse_data/sapimouse/` is missing, so
|
||||
the core 10 unit tests run on a fresh clone without the dataset.
|
||||
|
||||
## What `replay` is and isn't
|
||||
|
||||
**Is**: a deterministic replay of one real human's mouse path, warped to your
|
||||
|
||||
Reference in New Issue
Block a user