Skip to content

Add git-based version stamping and publish workflow (closes #329) - #335

Open
michael-christen wants to merge 3 commits into
masterfrom
bazel_version_329
Open

Add git-based version stamping and publish workflow (closes #329)#335
michael-christen wants to merge 3 commits into
masterfrom
bazel_version_329

Conversation

@michael-christen

@michael-christen michael-christen commented Apr 27, 2026

Copy link
Copy Markdown
Owner

Summary

Implements Bazel version stamping for the Python wheel, closing out the experiment from #329.

  • tools/workspace_status.sh — outputs STABLE_GIT_VERSION; uses the exact git tag (strip leading v) when on a release commit, otherwise falls back to 0.0.<commit-count> for dev builds
  • .bazelrc — registers workspace_status_command globally so --stamp alone activates versioning
  • packaging/BUILD — changes version = "0.0.0" to version = "{STABLE_GIT_VERSION}" with stamp = -1; uses the py_wheel_all.dist target (provided by the py_wheel macro) to resolve the stamped filename at execution time
  • .github/workflows/publish-wheel.yml — triggers on v* tags, builds the stamped dist with --stamp, and uploads the wheel as a GitHub Release artifact via gh release create

Key behavior:

  • bazel build //packaging:py_wheel_all — filename has literal {STABLE_GIT_VERSION} placeholder (fine for dev; not for distribution)
  • bazel build --stamp //packaging:py_wheel_all.dist — produces correctly named wheel (e.g. mchristen_toolbox-0.0.200-py3-none-any.whl locally)
  • git tag v1.0.0 && git push origin v1.0.0 — triggers the publish workflow, which produces mchristen_toolbox-1.0.0-py3-none-any.whl and attaches it to a GitHub Release

Test plan

  • bazel build //packaging:py_wheel_all succeeds with placeholder in filename
  • bazel build --stamp //packaging:py_wheel_all.dist produces correctly stamped wheel (mchristen_toolbox-0.0.200-py3-none-any.whl)
  • Wheel METADATA confirms Version: 0.0.200

michael-christen and others added 2 commits April 13, 2026 04:24
Naming is up for debate. Arguably this is my second version. I could
also abbreviate it to sbr

Mechanical WIP here:
https://cad.onshape.com/documents?nodeId=2f14397cff1201652b29e7ee&resourceType=folder

Next step:
- [x] Re-implement schematic with the updated BOM
- [x] Define BOM

Current BOM: https://www.pololu.com/salesorder/1J540243?s=ac1e0b12

- M2T550 I2C Motor Controller
- Encoders ...
- The sensors are powered through the Vcc (pin 4, blue wire) and GND
(pin
1, green wire) pins; Vcc can be 2.7 V to 18 V. The quadrature outputs A
and B (yellow and white wires) are digital signals that are either
driven
low (0 V) or pulled to Vcc through 10 kΩ pull-up resistors, depending on
the orientation of the motor. The sensors’ comparators have built-in
hysteresis, which prevents spurious signals in cases where the motor is
      near a transition point. The A and B signals are square waves with
roughly 50% duty cycles that are approximately 90° out of phase. The
order of the A-B transitions indicates motor direction, and the
frequency
      indicates motor speed.
    - https://www.pololu.com/product/5187
- MinIMU-9: LSM6DSO, LIS3MDL
- Chip: Raspberry Pi Pico W
- Comms: (chip) wifi for telemetry and programmatic commanding,
bluetooth for controller interface

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@michael-christen michael-christen changed the title version info Add git-based version stamping and publish workflow (closes #329) Apr 27, 2026
@michael-christen

Copy link
Copy Markdown
Owner Author

session: pr_335_git_stamp_publish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant