Skip to main content

Documentation Index

Fetch the complete documentation index at: https://motorbridge.seeedstudio.com/llms.txt

Use this file to discover all available pages before exploring further.

Best Practices: Release and Versioning

Supported Python Versions

The motorbridge SDK supports the following Python versions:
VersionStatusNotes
Python 3.10✅ SupportedMinimum version
Python 3.11✅ SupportedRecommended
Python 3.12✅ SupportedLatest stable
Python 3.13✅ SupportedNewest
Python 3.14✅ SupportedPre-release
Python 3.9 and earlier❌ Not supportedUse 3.10+

Version Numbering

The SDK follows Semantic Versioning: Current source alignment:
ComponentSource fileCurrent version
Git release tagmotorbridge repositoryv0.3.3
Python packagebindings/python/pyproject.toml0.3.3
Rust workspace cratesCargo.toml [workspace.package]0.3.3
MAJOR.MINOR.PATCH[-PRERELEASE]

Examples:
0.1.0   - Initial release
0.1.1   - Bug fix
0.1.2   - Another bug fix
0.2.0   - New features, backward compatible
1.0.0   - Stable API, breaking changes from 0.x
1.1.0a1 - Alpha pre-release
1.1.0b1 - Beta pre-release
1.1.0rc1 - Release candidate

Version Categories

CategoryExampleStability
Stable0.3.3Production ready
Pre-release0.3.3a1Testing only
Development0.3.3.dev1Internal use

Installation Channels

PyPI (Production)

# Latest stable version
pip install motorbridge

# Specific version
pip install motorbridge==0.3.3

# Upgrade
pip install --upgrade motorbridge

TestPyPI (Pre-release)

# Install from TestPyPI
pip install -i https://test.pypi.org/simple/ motorbridge==0.3.3a1
Pre-release versions may have breaking changes and are not recommended for production.

Git Installation

# Install from Git
pip install git+https://github.com/tianrking/motorbridge@v0.3.3

# Install specific branch
pip install git+https://github.com/tianrking/motorbridge@main

Checking Installed Version

Command Line

# Using pip
pip show motorbridge

# Using the Python CLI
motorbridge-cli -v

# Using the Rust CLI
motor_cli -v

# Using Python
python3 -c "import importlib.metadata; print(importlib.metadata.version('motorbridge'))"
python3 -c "import motorbridge; print(motorbridge.get_version())"

Programmatically

import motorbridge

import importlib.metadata
print(f"motorbridge version: {importlib.metadata.version('motorbridge')}")
print(f"motorbridge API version: {motorbridge.get_version()}")

Upgrade Strategies

Conservative Upgrade

Stay on stable versions, upgrade for bug fixes:
# Current: any older 0.x release
# Upgrade to latest stable: 0.3.3
pip install --upgrade motorbridge

# Or specific patch
pip install motorbridge==0.3.3

Early Adopter

Test pre-releases in development:
# Development environment
pip install -i https://test.pypi.org/simple/ motorbridge==0.3.3b1

# Test your code
python3 -m pytest tests/

# Production stays on stable
pip install motorbridge==0.3.3

Pinned Versions

For reproducible deployments:
# requirements.txt
motorbridge==0.3.3
Or with version constraints:
# Allow patches, block minor/major changes
motorbridge>=0.3.3,<0.4.0

API Stability

Version 0.x (Current)

  • API may change between minor versions
  • Breaking changes documented in release notes
  • Recommended to pin versions

Version 1.0+ (Future)

  • Semantic versioning guarantees
  • Breaking changes only in major versions
  • Deprecation warnings before removal

Changelog

v0.3.3

  • Added unified version reporting: Python motorbridge.__version__, motorbridge.get_version(), motorbridge-cli -v, and Rust motor_cli -v
  • Disabled Python CLI long-option abbreviation so invalid options such as robstride-write-param --mode save are rejected instead of being misparsed
  • Added unified --store 1 support to Python robstride-write-param and damiao-write-param
  • Added Rust CLI RobStride/Damiao parameter write persistence alignment
  • Updated RobStride type 22 save to send the official payload and wait for a status ACK

v0.3.2

  • Fixed RobStride fault/status handling so fault frames update fault cache without polluting latest kinematic state
  • Added Python binding access to the latest vendor fault code

v0.3.1

  • Added Python ABI accessors for detailed motor fault state
  • Improved RobStride thermal/fault diagnostics around abnormal feedback frames

v0.2.9

  • Added RobStride host-id-specific ABI helpers: motor_handle_robstride_ping_host_id and motor_handle_robstride_get_param_f32_host_id
  • Added Python wrappers robstride_ping_host_id(...) and robstride_get_param_f32_host_id(...)
  • Validated RobStride motor_id / device_id as 1..255 and feedback_id / host_id as 0..255
  • Updated Rust and Python RobStride scan to probe each listed --feedback-ids host ID exactly
  • Moved canonical Mintlify docs into the sibling motorbridge-docs repository

v0.2.5

  • Added Python CLI id-set --vendor robstride for RobStride device ID updates
  • Aligned Rust/Python RobStride scan defaults around host ID candidates 0xFD,0xFF,0xFE,0x00,0xAA

v0.2.3

  • Refactored ABI FFI layers to reduce duplicated controller/motor dispatch code
  • Consolidated vendor parameter FFI entrypoints
  • Aligned runtime/control robustness fixes across core, vendor controllers, Python bindings, and websocket gateway

Deprecation Policy

  1. Announcement: Feature marked as deprecated in release notes
  2. Warning: Runtime deprecation warning added
  3. Grace Period: At least one minor version
  4. Removal: Feature removed in next major/minor version
# Example deprecation warning
import warnings

def old_function():
    warnings.warn(
        "old_function is deprecated, use new_function instead",
        DeprecationWarning,
        stacklevel=2
    )
    return new_function()

Release Checklist

For maintainers releasing new versions:
  1. Update version:
    # Update [project].version in bindings/python/pyproject.toml
    version = "0.3.3"
    
  2. Update changelog:
    • Document all changes
    • Note breaking changes
  3. Tag release:
    git tag v0.3.3
    git push origin v0.3.3
    
  4. Build package:
    MOTORBRIDGE_LIB=../../target/release/libmotor_abi.so \
    MOTORBRIDGE_WS_GATEWAY_BIN=../../target/release/ws_gateway \
    python -m build
    
  5. Upload to TestPyPI:
    twine upload -r testpypi dist/*
    
  6. Verify installation:
    pip install -i https://test.pypi.org/simple/ motorbridge==0.3.3
    python3 -m pytest tests/
    
  7. Upload to PyPI:
    twine upload dist/*
    

Important Rules

Never reuse the same package version for a second upload.Once a version is uploaded to PyPI, it cannot be overwritten. Always increment the version number for new uploads.

If Upload Fails

# Bad: Trying to re-upload same version
twine upload dist/motorbridge-0.3.3.tar.gz
# Error: File already exists

# Solution: Increment version
# Update __version__ = "0.3.3"
# Rebuild and upload

CI/CD Integration

GitHub Actions Example

name: Publish

on:
  release:
    types: [published]

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Build
        run: |
          MOTORBRIDGE_LIB=../../target/release/libmotor_abi.so \
          MOTORBRIDGE_WS_GATEWAY_BIN=../../target/release/ws_gateway \
          python -m build

      - name: Publish to PyPI
        run: twine upload dist/*
        env:
          TWINE_TOKEN: ${{ secrets.PYPI_TOKEN }}

Next Steps