You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 23, 2026. It is now read-only.
- Server drivers: `*Server` (e.g., `HttpServer`, `SNMPServer`)
57
+
- Generic drivers: descriptive name (e.g., `ISCSI`, `Shell`, `Tftp`)
58
+
59
+
## 7. Directory Structure
60
+
The script creates:
61
+
```
62
+
packages/jumpstarter-driver-<driver_package>/
63
+
├── jumpstarter_driver_<driver_package>/
64
+
│ ├── __init__.py
65
+
│ ├── client.py
66
+
│ ├── driver.py
67
+
│ └── driver_test.py
68
+
├── examples/
69
+
│ └── exporter.yaml
70
+
├── .gitignore
71
+
├── pyproject.toml
72
+
└── README.md
73
+
```
74
+
75
+
## 8. Documentation
76
+
The script automatically creates:
77
+
- A README.md with basic documentation
78
+
- A symlink in `docs/source/reference/package-apis/drivers/` pointing to the README
79
+
- Template files for all necessary components
80
+
- A good example of documentation is in `docs/source/reference/package-apis/drivers/gpiod.md` and also `docs/source/reference/package-apis/drivers/pyserial.md`
81
+
82
+
## Code Style and Testing
83
+
84
+
- Follow existing code style (validate with `make lint`, fix with `make lint-fix`)
85
+
- Perform static type checking with `make ty-pkg-${package_name}`
86
+
- Add comprehensive tests and update documentation
87
+
- Verify all tests pass (`make test-pkg-${package_name}` or `make test`)
88
+
89
+
## Contributing Guidelines
90
+
91
+
- Focus on a single issue per driver
92
+
- Use clear, descriptive commit messages
93
+
- Reference issue numbers when applicable
94
+
- Follow conventional commit format when possible
95
+
- Ensure all tests pass before submitting PRs
96
+
97
+
# Driver client CLIs
98
+
99
+
Some drivers implement known classes that provide a CLI interface for the driver, but other
100
+
clients implement their own CLI interface that will appear in the `j` command inside a `jmp shell`.
101
+
102
+
Good examples can be found in `packages/jumpstarter-driver-shell/jumpstarter_driver_shell/client.py`, `packages/jumpstarter-driver-pyserial/jumpstarter_driver_pyserial/client.py` or `packages/jumpstarter-driver-probe-rs/jumpstarter_driver_probe_rs/client.py`.
103
+
104
+
# Composite drivers
105
+
106
+
Drives which have children drivers should be composite drivers, and the client interface should
107
+
inherit from `CompositeClient` in jumpstarter_driver_composite.client, also the pyproject.toml should
108
+
have a dependency on `jumpstarter-driver-composite`.
- **Coverage**: Configured per package with HTML and XML reports
121
+
122
+
### Linting and Formatting
123
+
124
+
- **Ruff**: Code formatting and linting (excludes `jumpstarter-protocol`), `make lint` and `make lint-fix` are available.
125
+
- **Typos**: Spell checking
126
+
- **Pre-commit**: Automated checks
127
+
128
+
## Key Conventions
129
+
130
+
1. **Naming**: Package names use hyphens, module names use underscores
131
+
2. **Entry points**: Drivers register via `jumpstarter.drivers` entry point
132
+
3. **Versioning**: All packages share the same version from VCS
133
+
4. **Documentation**: Each package has its own README.md, and when it's a driver we make a symlink in `docs/source/reference/package-apis/drivers/` pointing to the README.md for the driver.
134
+
5. **Testing**: Comprehensive test coverage required, but always try to focus on starting a server and client to test it e2e. Mock sometimes when there is too much dependency on system tools/services/compatibility issues between MacOs/Linux.
135
+
6. **Dependencies**: Minimal, focused dependencies per package
136
+
137
+
## Build and Distribution
138
+
139
+
- **Build system**: Hatch with custom `hatch-pin-jumpstarter` hook
140
+
- **Version source**: VCS (Git) with root-level version management
141
+
- **Distribution**: Individual packages published separately
142
+
- **Workspace**: UV manages dependencies across all packages
143
+
144
+
## Running tests
145
+
146
+
When running tests you should use the `make pkg-test-<package_name>` command.
147
+
148
+
## Running type checking
149
+
150
+
When running type checking you should use the `make pkg-ty-<package_name>` command,
151
+
never invoke pytest manually. Use this because it will be more reliable and
152
+
install the right dependencies.
153
+
154
+
## Running linting
155
+
156
+
When running linting you should use the `make lint-fix`command.
157
+
158
+
## Running python manually
159
+
160
+
If you need to run python code manually to check if it works, you should use `uv run python3`
161
+
to make sure you get the venv from uv, you may need to run `make sync` first to get all
0 commit comments