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
1 change: 1 addition & 0 deletions .cursor/rules
Original file line number Diff line number Diff line change
Expand Up @@ -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.
19 changes: 19 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<!--
SPDX-FileCopyrightText: 2025 Alexander Brinkman
SPDX-License-Identifier: GPL-3.0-or-later
-->

## 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.