Contributing
Set up
Section titled “Set up”You need uv. For the documentation you also need Node.js 22 or later.
git clone https://github.com/asEmbodiedAISyst/eskin.gitcd eskinuv syncuv run pre-commit installChecks
Section titled “Checks”Run these commands before you open a pull request. The CI runs the same commands.
uv run ruff checkuv run ruff format --checkuv run pytestnpm --prefix docs ci && npm --prefix docs run buildThe tests do not need hardware. They use encode_frame() and a fake serial object.
Test with hardware
Section titled “Test with hardware”No automatic test uses a real sensor. After a change in reader.py or protocol.py, do this check with a sensor connected:
uv run eskin stream -n 300The frame rate must be near the value in Wire protocol, and resyncs must not increase after the first frames.
Then run uv run eskin viz, press the pad, and press re-calibrate. The picture must continue to update.
pyserialis the only runtime dependency. Put other packages in[project.optional-dependencies].- The visualiser uses only the standard library on the Python side, and has no build step for the page.
- Only the reader thread reads the serial port in background mode. Give work to it through a request, as
calibrate()does. - Add a test for each protocol edge case that you find on hardware.
- Write comments and docstrings in English. Use type hints in new code.
- Change the documentation in English and in Chinese together. See Documentation.
Release
Section titled “Release”- Change
versioninpyproject.toml. This is the only place that holds the version. - Run the checks.
- Merge to
main, then push the tagv<version>, for examplev0.1.0.
The workflow pypi.yml builds the package and publishes it to PyPI with Trusted Publishing. It stops if the tag and the version in pyproject.toml are different.