Skip to content

Commit 62e72b6

Browse files
committed
readme
1 parent 2ec8f1f commit 62e72b6

5 files changed

Lines changed: 42 additions & 22 deletions

File tree

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,34 @@
11
# robot-stack
22

3-
Tools to inspect, tag, and build Opentrons robots across the multi-repo software stack.
3+
Python tooling to plan Opentrons robot releases across the multi-repo stack (Flex and OT-2): which repos need tags, what each tag should look like, where CI runs after you push, and which CloudFront invalidation to run when builds finish.
4+
5+
## Recommended workflow (Cursor)
6+
7+
Open this repo in [Cursor](https://cursor.com) and start a chat along these lines:
8+
9+
> I need to do a new release for **Flex** (or **OT-2**). It will be **internal** or **external**, and **stable**, **alpha**, or **beta** (Flex internal/external use **stable** or **unstable** for alpha).
10+
11+
Workspace rules in `.cursor/rules/` teach the agent how to run the scripts below. It will sync local clones, print release analysis, and suggest copy-paste `git tag` / `git push` commands. **Nothing is pushed or invalidated automatically**; review the output, confirm you agree, then run the printed steps yourself.
12+
13+
Prompt Cursor as above and it will walk you through the full release in order, running the advisory scripts and printing what to do next at each stage:
14+
15+
1. **Plan tags** — runs `just go` to show what needs tags and the tag shape per repo.
16+
2. **Push tags** — prints `git tag` / `git push` commands for you to run (stack repos first, app last).
17+
3. **Track builds** — runs `just track-builds` after the app tag is pushed to surface app, kickoff, and robot OS workflow runs.
18+
4. **Verify builds** — reminds you to wait for CI and spot-check manifests if needed.
19+
5. **Invalidate CDN** — runs `just invalidate-cloudfront` to print the exact `aws cloudfront create-invalidation` command (distribution and paths) for your tag and channel.
20+
21+
### TODO: release checklists
22+
23+
Generate a **release checklist** for each run (tag plan, commands run, build links, invalidation, sign-off). Checklists will be committed in this repository and published on [GitHub Pages](https://opentrons.github.io/robot-stack/) alongside asset inventories and release guides, with an index page listing past releases.
24+
25+
The sections below document the same commands for interactive or scripted use without Cursor.
26+
27+
**Live asset inventories and release guides:** [opentrons.github.io/robot-stack](https://opentrons.github.io/robot-stack/)
28+
29+
**Regenerate that site:** run the [Publish asset inventory to GitHub Pages](https://github.com/Opentrons/robot-stack/actions/workflows/asset-inventory-pages.yml) workflow (`workflow_dispatch` on `main`, or push to `main`).
30+
31+
## Setup
432

533
The only external dependency is [uv](https://docs.astral.sh/uv/).
634

automation/ot2_tag_allocation.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,7 @@ def _external_stability_bases_in_month(
5252
year, month, release_num, tag_pre, tag_pre_num = decode_ot2_external_version(version)
5353
except ValueError:
5454
continue
55-
if (
56-
(year, month) == (release_date.year, release_date.month)
57-
and tag_pre == stability
58-
and tag_pre_num is not None
59-
):
55+
if (year, month) == (release_date.year, release_date.month) and tag_pre == stability and tag_pre_num is not None:
6056
bases.add(release_num)
6157
return bases
6258

automation/release_guides.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from pathlib import Path
77
from typing import Final, Tuple
88

9-
from automation.asset_urls import APP_CHANNEL_YAMLS, app_manifest_url, app_yaml_url, robot_manifest_url
9+
from automation.asset_urls import APP_CHANNEL_YAMLS, app_manifest_url, robot_manifest_url
1010
from automation.flex_urls import FLEX_EXTERNAL, FLEX_INTERNAL, FLEX_ROBOT_PREFIX
1111
from automation.ot2_urls import OT2_EXTERNAL, OT2_INTERNAL, OT2_ROBOT_PREFIX
1212
from automation.site_nav import GUIDE_NAV, render_site_header, robot_name_html, site_nav_css

automation/site_nav.py

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -205,20 +205,13 @@ def _render_nav_link(item: SiteLink, current_page: str) -> str:
205205
is_current = nav_link_is_current(item, current_page)
206206
current_attr = ' aria-current="page"' if is_current else ""
207207
current_class = ' class="nav-current"' if is_current else ""
208-
return (
209-
f'<a href="{html.escape(item.filename)}"{current_class}{current_attr}>'
210-
f"{html.escape(item.title)}</a>"
211-
)
208+
return f'<a href="{html.escape(item.filename)}"{current_class}{current_attr}>{html.escape(item.title)}</a>'
212209

213210

214211
def _render_nav_block(kind: str, links: Tuple[SiteLink, ...], current_page: str) -> str:
215212
"""Render a vertical block of links under a section label."""
216213
link_html = "".join(_render_nav_link(item, current_page) for item in links)
217-
return (
218-
f'<div class="nav-block">'
219-
f'<span class="nav-kind">{html.escape(kind)}</span>{link_html}'
220-
f"</div>"
221-
)
214+
return f'<div class="nav-block"><span class="nav-kind">{html.escape(kind)}</span>{link_html}</div>'
222215

223216

224217
def render_site_header(current_page: str) -> str:
@@ -227,9 +220,9 @@ def render_site_header(current_page: str) -> str:
227220
for group in PRODUCT_NAV:
228221
groups.append(
229222
f'<div class="nav-group">'
230-
f'{robot_name_html(group.label)}'
231-
f'{_render_nav_block("Assets", group.asset_links, current_page)}'
232-
f'{_render_nav_block("Guides", group.guide_links, current_page)}'
223+
f"{robot_name_html(group.label)}"
224+
f"{_render_nav_block('Assets', group.asset_links, current_page)}"
225+
f"{_render_nav_block('Guides', group.guide_links, current_page)}"
233226
f"</div>"
234227
)
235228

justfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,24 @@
88

99
# update opentrons repositories
1010
@go *args:
11-
uv run ./automation/go.py {{args}}
11+
uv run ./automation/go.py {{ args }}
1212

1313
# find GitHub Actions build jobs for a pushed OT-2 or Flex release tag
1414
@track-builds *args:
15-
uv run ./automation/track_builds.py {{args}}
15+
uv run ./automation/track_builds.py {{ args }}
1616

1717
# print CloudFront invalidation command for a release tag
1818
@invalidate-cloudfront *args:
19-
uv run ./automation/invalidate_cloudfront.py {{args}}
19+
uv run ./automation/invalidate_cloudfront.py {{ args }}
2020

2121
# format and lint with ruff
2222
@fix:
2323
uv run ruff format .
2424
uv run ruff check --fix --unsafe-fixes .
2525

26+
# format justfile, lint/format Python, and type-check (run before commit or PR)
27+
@prep: fmt fix ty
28+
2629
@manifest:
2730
uv run ./automation/manifest.py
2831

0 commit comments

Comments
 (0)