diff --git a/.cursor/rules b/.cursor/rules index 4f2e2c9..b310a9d 100644 --- a/.cursor/rules +++ b/.cursor/rules @@ -2,6 +2,7 @@ Honor `.github/copilot-instructions.md`; keep USB/IP protocol details accurate ( Target Python 3.11+; use type hints and Google-style docstrings for new/changed functions. Use argparse for CLI changes; preserve `-v/--verbose` and helpful `--help` output. Run `ruff check .` and `ruff format .` before finishing; prefer small, focused diffs with tests when feasible. +Run `reuse lint` after adding or modifying files to keep licensing headers consistent. Never run or suggest privileged USB operations in tooling (no `sudo`/device claiming); prefer mocks or dry-run examples. Favor pytest for tests; mock USB devices and libusb interactions rather than touching hardware. Keep license notices intact; do not change GPL licensing text without approval. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..49567d6 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,19 @@ + + +## Contributing + +### Setup +- Python 3.11+; create a virtualenv and install dev deps: `pip install -e .[dev]`. + +### Development workflow +- Run `ruff format .` then `ruff check .` before sending changes. +- Run `mypy --ignore-missing-imports .` for type checks. +- Run `reuse lint` after adding or modifying files to keep licensing headers intact. +- Prefer small, focused PRs with CLI help text updated when flags/commands change. + +### Testing +- Use `pytest`; mock USB devices/libusb interactions rather than touching hardware. +- Avoid running privileged USB operations (`sudo`) in tests or automation.