Skip to content

Contributing

You need uv. For the documentation you also need Node.js 22 or later.

Terminal window
git clone https://github.com/asEmbodiedAISyst/eskin.git
cd eskin
uv sync
uv run pre-commit install

Run these commands before you open a pull request. The CI runs the same commands.

Terminal window
uv run ruff check
uv run ruff format --check
uv run pytest
npm --prefix docs ci && npm --prefix docs run build

The tests do not need hardware. They use encode_frame() and a fake serial object.

No automatic test uses a real sensor. After a change in reader.py or protocol.py, do this check with a sensor connected:

Terminal window
uv run eskin stream -n 300

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

  • pyserial is 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.
  1. Change version in pyproject.toml. This is the only place that holds the version.
  2. Run the checks.
  3. Merge to main, then push the tag v<version>, for example v0.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.