Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 1.47 KB

File metadata and controls

51 lines (34 loc) · 1.47 KB

Development and testing

uv is required for development of the package. Run the following to set up the project:

uv sync

Examples

To run the example code with a locally edited version of wlsonar, use: uv run --with-editable . examples/trim_recording.py.

Linting

The package is linted with ruff and mypy:

uv run ruff check
uv run ruff format --diff
uv run mypy . --exclude examples

Testing

The package is tested with pytest:

uv run pytest

There are also end-to-end (e2e) tests to verify the package against a real Sonar 3D-15. Make sure to read the documentation of tests/test_e2e_real_sonar.py, then run the e2e test with:

uv run pytest -m e2e -s --sonar-ip <sonar ip>

Versioning

Versioning is handled with uv. Setting a new version with uv version <new version> and merging to master will build a new version on pypi. We follow semantic versioning.

Protobuf

The Sonar 3D-15 uses a .proto file to define message formats. This package includes generated Python for these messages. When changing the .proto file, run the following to generate new Python code:

uv run protoc \
    --proto_path=src/wlsonar/range_image_protocol/_proto/ \
    --python_out=src/wlsonar/range_image_protocol/_proto/ \
    --mypy_out=src/wlsonar/range_image_protocol/_proto/  \
    src/wlsonar/range_image_protocol/_proto/WaterLinkedSonarIntegrationProtocol.proto