This guide covers the maintenance workflow for CANViewer.
- Python 3.11 or newer
- uv
makeis optional, but the Makefile mirrors the common commands
Install the full development environment:
uv sync --all-groupsRun the application:
uv run python main.pyRun with a gs_usb-compatible CAN device:
uv run python main.py -c gs_usbRun all local static checks:
make analyzeEquivalent commands:
uv run --group dev ruff format --check .
uv run --group dev ruff check .
uv run --group dev ty check .
uv run --group dev mypy .Format and apply safe lint fixes:
make formatEquivalent commands:
uv run --group dev ruff format .
uv run --group dev ruff check --fix .ty is currently run alongside mypy. Keep both until ty has proven stable for this codebase.
Update all locked dependencies:
uv lock --upgrade
uv sync --locked --all-groupsThen run:
make analyze
uv run --group build python scripts/build_nuitka.py --helpWhen updating dependencies, watch for Python version constraints. For example, returns 0.27 requires Python 3.11 or newer, so the project currently uses requires-python = ">=3.11,<3.14".
Local build commands:
make build
make build-dmg
make build-appimagePlatform outputs:
- macOS:
dist/CANViewer.app, optionallydist/CANViewer.dmg - Linux:
dist/CANViewer-<arch>.AppImage - Windows:
dist/CANViewer.exe
The shared build entrypoint is:
uv run --group build python scripts/build_nuitka.py --cleanUseful options:
--dmg: create a macOS DMG after building the app bundle--appimage: create a Linux AppImage after building the standalone app
After building an AppImage, install it into the user profile and register a desktop entry:
make install-linux-desktopThis installs into:
~/.local/bin/CANViewer.AppImage~/.local/share/applications/com.tomixrm.CANViewer.desktop~/.local/share/icons/hicolor/256x256/apps/CANViewer.png
The release workflow supports two modes:
workflow_dispatch: build and upload artifacts onlyv*.*.*tag push: build artifacts and create a GitHub Release
The release job is guarded so manual runs do not publish releases:
if: startsWith(github.ref, 'refs/tags/v')Use manual dispatch to test the full build matrix before cutting a release tag.
-
Run local checks with
make analyze. -
Run a manual GitHub Actions build from the target branch.
-
Inspect uploaded artifacts for all platforms.
-
Create and push a release tag, for example:
git tag v0.0.10 git push origin v0.0.10
-
Confirm the GitHub Release contains:
CANViewer-*.AppImageCANViewer.exeCANViewer.dmg