Skip to content

Commit 6592823

Browse files
Mr-toothCopilot
andcommitted
docs(chore): refresh OSS governance and v0.8.0 user docs
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 634cd08 commit 6592823

11 files changed

Lines changed: 176 additions & 120 deletions

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: check-merge-conflict
6+
- id: check-yaml
7+
- id: end-of-file-fixer
8+
- id: trailing-whitespace
9+
210
- repo: https://github.com/astral-sh/ruff-pre-commit
311
rev: v0.15.9
412
hooks:

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Added
1313
- Added startup font-size controls for GUI entry commands via `--font-size` (`small|medium|large|xlarge`) with environment fallback `RMP_GUI_FONT_SIZE`.
14+
- Added OSS governance baseline guidance via `CLAUDE.md` and OSS-focused release checks.
1415

1516
### Changed
1617
- Refactored GUI font-size handling to track per-size availability and reject unavailable selections with explicit status feedback.
18+
- Updated OSS quickstart and IK docs to align with v0.8.0 font-size startup behavior.
1719

1820
### Fixed
1921
- Fixed persistent runtime font-size issue where only `small` effectively applied when higher-size font handles were unavailable.
2022
- Hardened font installation to fail per size instead of aborting the full font registry initialization path.
23+
- Updated OSS docs/release tests to validate OSS-owned artifacts only.
2124

2225
## [0.7.9] - 2026-04-15
2326

CLAUDE.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# CLAUDE.md
2+
3+
## Scope
4+
- Applies to the full `robot-motion-player-oss` repository.
5+
- Instruction precedence: system/developer rules > `AGENTS.md` > this file > default docs.
6+
7+
## Source of Truth (OSS)
8+
- User onboarding: `README.md`, `docs/QUICKSTART_en.md`, `docs/QUICKSTART_zh.md`
9+
- IK behavior and workflows: `docs/IK_USAGE.md`
10+
- Release-facing history: `CHANGELOG.md`
11+
12+
## Standard Workflow
13+
1. Install development dependencies with `make install-dev`.
14+
2. Validate changes with:
15+
- `make lint`
16+
- `make test` (or `make test-quick` while iterating)
17+
- `make check` before handoff
18+
3. For release or docs-governance updates, also run `make release-check`.
19+
4. Update tests/docs whenever user-facing behavior changes.
20+
21+
## Implementation Guardrails
22+
- State explicit assumptions when requirements are ambiguous.
23+
- Prefer the simplest viable solution; avoid speculative abstractions.
24+
- Keep changes surgical and within task scope.
25+
- Keep OSS tests scoped to OSS-owned files only.
26+
27+
## Release-Sensitive Rules
28+
- Keep version markers synchronized by role:
29+
- `pyproject.toml`: release version `X.Y.Z`
30+
- `motion_player/__init__.py`: metadata fallback `X.Y.Z.dev0`
31+
- `motion_player/cli/main.py`: `_get_version` fallback `X.Y.Z.dev0`
32+
- Keep `CHANGELOG.md`, `docs/QUICKSTART_en.md`, `docs/QUICKSTART_zh.md`, and `docs/IK_USAGE.md` aligned with release behavior.
33+
- Run `make release-check` before tagging.

Makefile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
.DEFAULT_GOAL := help
44

55
PIP ?= pip
6+
PYTEST ?= pytest
67

78
help: ## Show available development targets
89
@echo "robot-motion-player development commands"
9-
@awk 'BEGIN {FS = ":.*##"} /^[a-zA-Z0-9_.-]+:.*##/ {printf " %-14s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
10+
@awk 'BEGIN {FS = ":.*##"} /^[a-zA-Z0-9_.-]+:.*##/ {printf " %-14s %s\\n", $$1, $$2}' $(MAKEFILE_LIST)
1011

1112
install-dev: ## Install package with development dependencies
1213
$(PIP) install -e ".[dev]"
@@ -15,15 +16,15 @@ lint: ## Run Ruff lint checks
1516
ruff check motion_player tests
1617

1718
test: ## Run full pytest suite
18-
pytest tests/ -v --tb=short
19+
$(PYTEST) tests/ -v --tb=short
1920

2021
test-quick: ## Run targeted fast test subset
21-
pytest tests/gui/test_dearpygui_panel.py tests/backends/test_mujoco_viewer.py tests/core/test_ui.py -q
22+
$(PYTEST) tests/gui/test_dearpygui_panel.py tests/backends/test_mujoco_viewer.py tests/core/test_ui.py -q
2223

2324
check: lint test ## Run lint and tests
2425

2526
precommit: ## Run pre-commit on all files
2627
pre-commit run --all-files
2728

28-
release-check: lint test ## Run release checks and verify version markers
29-
python scripts/release/check_release_markers.py
29+
release-check: lint test ## Run OSS release checks
30+
$(PYTEST) -q tests/test_docs_version_state.py tests/test_release_backfill_state.py tests/test_roadmap_versions.py

RELEASING.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,36 @@
11
# RELEASING.md
22

3-
This guide describes the standard release workflow for `robot-motion-player`.
3+
This guide describes the standard OSS release workflow for `robot-motion-player`.
44

55
## 1) Pre-release checks
66

7-
1. Confirm release scope and prepare notes in `docs/releases/vX.Y.Z.md`.
8-
2. Update `CHANGELOG.md`:
9-
- move relevant items from `[Unreleased]` into `## [X.Y.Z] - YYYY-MM-DD`.
7+
1. Confirm release scope and collect release notes in `CHANGELOG.md`.
8+
2. Update the `## [Unreleased]` section and promote release entries to `## [X.Y.Z] - YYYY-MM-DD`.
109
3. Synchronize version markers by role:
1110
- `pyproject.toml`: `[project].version = "X.Y.Z"` (release version)
1211
- `motion_player/__init__.py`: metadata fallback `"X.Y.Z.dev0"`
1312
- `motion_player/cli/main.py`: `_get_version()` fallback `"X.Y.Z.dev0"`
14-
4. Run validations:
13+
4. Keep OSS user docs aligned with the release behavior:
14+
- `docs/QUICKSTART_en.md`
15+
- `docs/QUICKSTART_zh.md`
16+
- `docs/IK_USAGE.md`
17+
5. Run validations:
1518
- `make release-check`
1619
- optional: `make precommit`
1720

1821
## 2) Tag and publish
1922

20-
1. Commit release changes (version sync, changelog, release notes).
23+
1. Commit release changes (version sync, changelog, docs).
2124
2. Create annotated tag:
2225
- `git tag -a vX.Y.Z -m "Release vX.Y.Z"`
2326
3. Push branch and tag:
2427
- `git push origin <branch>`
2528
- `git push origin vX.Y.Z`
26-
4. Create GitHub release from `vX.Y.Z` and use `docs/releases/vX.Y.Z.md` as the release body.
27-
5. For historical release backfill workflows, use:
28-
- `bash scripts/release/backfill_releases.sh`
29+
4. Create GitHub release from `vX.Y.Z` and use the corresponding `CHANGELOG.md` section as the release body.
2930

3031
## 3) Post-release checks
3132

3233
1. Verify the Git tag and GitHub release point to the intended commit.
3334
2. Verify version markers from local source files:
34-
- `python scripts/release/check_release_markers.py`
35-
- optional installed-package sanity check: `motion_player --version`
36-
3. Ensure release docs are synchronized:
37-
- `CHANGELOG.md`
38-
- `docs/releases/RELEASE_TAG_MAP.md`
39-
4. Keep `## [Unreleased]` in `CHANGELOG.md` ready for the next cycle.
35+
- `motion_player --version`
36+
3. Keep `## [Unreleased]` in `CHANGELOG.md` ready for the next cycle.

docs/IK_USAGE.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,18 @@ Both runtime backend paths (`.xml` MuJoCo and `.urdf` Pinocchio when installed)
2020

2121
Unit conversion is done only at the UI/payload boundary.
2222

23+
## GUI Startup Font Size (v0.8.0)
24+
25+
For GUI entry commands, startup font-size can be set with `--font-size`:
26+
27+
```bash
28+
motion_player play --motion <clip.pkl> --robot <robot.xml> --gui --font-size large
29+
motion_player gui --motion <clip.pkl> --robot <robot.xml> --font-size xlarge
30+
```
31+
32+
Supported values are `small`, `medium`, `large`, `xlarge`.
33+
You can set `RMP_GUI_FONT_SIZE` as the default startup selection.
34+
2335
## GUI Workflow
2436

2537
Use either:

docs/QUICKSTART_en.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,23 @@ motion_player gui --motion path/to/clip.pkl --robot path/to/robot.xml
2727
`motion_player gui` now prefers an isolated panel process mode. If panel startup fails,
2828
the runtime prints a warning and continues in MuJoCo keyboard-only mode.
2929

30+
### v0.8.0 GUI startup font-size controls
31+
32+
Use startup font-size selection when launching GUI entry commands:
33+
34+
```bash
35+
motion_player play --motion path/to/clip.pkl --robot path/to/robot.xml --gui --font-size large
36+
motion_player gui --motion path/to/clip.pkl --robot path/to/robot.xml --font-size xlarge
37+
```
38+
39+
You can also set a default via environment variable:
40+
41+
```bash
42+
export RMP_GUI_FONT_SIZE=medium
43+
```
44+
45+
Supported values: `small`, `medium`, `large`, `xlarge`.
46+
3047
## 3) Essential keys
3148

3249
- `Space`: play/pause
@@ -55,16 +72,6 @@ if no CJK font is available, the panel falls back to the best readable platform
5572
The output menu provides a `Clear` action, and export progress advances per rendered frame.
5673
For details, see [IK Usage Guide](IK_USAGE.md).
5774

58-
GUI visual QA command (desktop session):
59-
60-
```bash
61-
RMP_GUI_SNAPSHOT_OUT=/tmp/rmp-monitor-card.png \
62-
RMP_GUI_LAYOUT_REPORT_OUT=/tmp/rmp-monitor-card-layout.json \
63-
motion_player play --motion path/to/clip.pkl --robot path/to/robot.xml --gui
64-
```
65-
66-
Expected report field in `/tmp/rmp-monitor-card-layout.json`: `"fits_all_lines": true`.
67-
6875
## 4) Generate quality report
6976

7077
```bash
@@ -102,7 +109,7 @@ Notes:
102109
motion_player export \
103110
--motion path/to/clip.pkl \
104111
--robot path/to/robot.xml \
105-
--output /tmp/clip.gif \
112+
--output clip.gif \
106113
--fps 20
107114
```
108115

docs/QUICKSTART_zh.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,23 @@ motion_player gui --motion path/to/clip.pkl --robot path/to/robot.xml
2727
`motion_player gui` 现在默认优先使用面板隔离进程模式。
2828
若面板启动失败,运行时会打印告警并自动回退到 MuJoCo 键盘控制模式。
2929

30+
### v0.8.0 GUI 启动字号控制
31+
32+
可在 GUI 入口命令启动时指定字号:
33+
34+
```bash
35+
motion_player play --motion path/to/clip.pkl --robot path/to/robot.xml --gui --font-size large
36+
motion_player gui --motion path/to/clip.pkl --robot path/to/robot.xml --font-size xlarge
37+
```
38+
39+
也可通过环境变量设置默认值:
40+
41+
```bash
42+
export RMP_GUI_FONT_SIZE=medium
43+
```
44+
45+
支持值:`small``medium``large``xlarge`
46+
3047
## 3)常用按键
3148

3249
- `Space`:播放/暂停
@@ -54,16 +71,6 @@ Tune 工作流采用双层数据流:`Current Pose`(运行态只读)与 `Ta
5471
输出菜单提供 `清空` 操作,导出进度条按逐帧渲染进度更新。
5572
当前 IK 说明请参考 [IK 使用说明](IK_USAGE.md)
5673

57-
GUI 可视化质检命令(桌面会话):
58-
59-
```bash
60-
RMP_GUI_SNAPSHOT_OUT=/tmp/rmp-monitor-card.png \
61-
RMP_GUI_LAYOUT_REPORT_OUT=/tmp/rmp-monitor-card-layout.json \
62-
motion_player play --motion path/to/clip.pkl --robot path/to/robot.xml --gui
63-
```
64-
65-
`/tmp/rmp-monitor-card-layout.json` 的期望字段:`"fits_all_lines": true`
66-
6774
## 4)导出质量报告
6875

6976
```bash
@@ -101,7 +108,7 @@ motion_player convert --input path/to/robot.xml --output path/to/robot.urdf
101108
motion_player export \
102109
--motion path/to/clip.pkl \
103110
--robot path/to/robot.xml \
104-
--output /tmp/clip.gif \
111+
--output clip.gif \
105112
--fps 20
106113
```
107114

tests/test_docs_version_state.py

Lines changed: 21 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
"""Version and roadmap consistency checks."""
2-
3-
from __future__ import annotations
1+
"""Version and OSS docs consistency checks."""
42

53
from pathlib import Path
64

@@ -32,37 +30,26 @@ def test_version_markers_follow_project_version() -> None:
3230
assert f'return "{expected_dev_version}"' in cli_text
3331

3432

35-
def test_design_and_summary_keep_full_gui_roadmap_order() -> None:
36-
design = Path("docs/design.md").read_text(encoding="utf-8")
37-
summary = Path("docs/summary.md").read_text(encoding="utf-8")
38-
assert "**Version / 版本**: 0.7.0" in design
39-
assert "| v0.5.0 | Full GUI integration milestone" in design
40-
assert "| v0.6.0 | IK tuning workflow hardening" in design
41-
assert "| v0.7.0 | Marked-frame history and quick revisit UX in CLI/GUI" in design
42-
assert "| v0.8.x | Font architecture stabilization and reliability hardening" in design
43-
assert "| v0.9.x | Physics replay (PD control), deterministic tests" in design
44-
assert "| v1.0.0 | Isaac/NV backend, HDF5 support, plugin completion" in design
45-
assert "| v1.1.0 | Web/Jupyter viewer export, packaging/distribution hardening" in design
46-
assert "Phase 5 — Full GUI Integration (Milestone 0.5.0)" in summary
47-
assert "Phase 6 — IK Tuning Workflow + Conversion Interop (Milestone 0.6.0)" in summary
48-
assert "Phase 7 — Marked-Frame UX + Docs/Release Sync (Milestone 0.7.0)" in summary
49-
assert (
50-
"Phase 8 — Font Architecture Stabilization + Reliability Hardening (Milestone 0.8.x)"
51-
in summary
52-
)
53-
assert "Phase 9 — Physics Replay + Advanced Evaluation (Milestone 0.9.0)" in summary
54-
assert "Phase 10 — Multi-Backend & Plugin System (Milestone 1.0.0)" in summary
55-
assert "Phase 11 — Distribution & Community (Milestone 1.1.0)" in summary
33+
def test_v080_docs_align_with_font_size_release_behavior() -> None:
34+
quickstart_en = Path("docs/QUICKSTART_en.md").read_text(encoding="utf-8")
35+
quickstart_zh = Path("docs/QUICKSTART_zh.md").read_text(encoding="utf-8")
36+
ik_usage = Path("docs/IK_USAGE.md").read_text(encoding="utf-8")
37+
changelog = Path("CHANGELOG.md").read_text(encoding="utf-8")
38+
39+
assert "## [0.8.0]" in changelog
40+
assert "--font-size" in changelog
41+
assert "RMP_GUI_FONT_SIZE" in changelog
5642

43+
for text in (quickstart_en, quickstart_zh, ik_usage):
44+
assert "--font-size" in text
45+
assert "RMP_GUI_FONT_SIZE" in text
5746

58-
def test_readme_has_professional_banner_and_dual_mode_sections() -> None:
47+
48+
def test_readme_references_oss_docs_only() -> None:
5949
readme = Path("README.md").read_text(encoding="utf-8")
60-
readme_cn = Path("README_CN.md").read_text(encoding="utf-8")
61-
assert "![RMP Banner](docs/assets/banner.svg)" in readme
62-
assert "## CLI Mode" in readme
63-
assert "## Full GUI Mode" in readme
64-
assert "[中文 README](README_CN.md)" in readme
65-
assert "[English README](README.md)" in readme_cn
66-
assert "https://github.com/YanjieZe/GMR" in readme
67-
assert "https://github.com/Mr-tooth/rsl-rl-ex" in readme
68-
assert "jGMR" not in readme
50+
51+
assert "[English](README.md)" in readme
52+
assert "[中文](docs/QUICKSTART_zh.md)" in readme
53+
assert "docs/QUICKSTART_en.md" in readme
54+
assert "docs/IK_USAGE.md" in readme
55+
assert "README_CN.md" not in readme
Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,34 @@
1-
"""Release tag map and backfill-script consistency checks."""
2-
3-
from __future__ import annotations
1+
"""OSS release governance checks."""
42

53
from pathlib import Path
64

5+
PRIVATE_RELEASE_PATHS = (
6+
Path("docs/releases"),
7+
Path("scripts/release/backfill_releases.sh"),
8+
)
9+
10+
11+
def test_private_release_artifacts_are_not_present_in_oss() -> None:
12+
for path in PRIVATE_RELEASE_PATHS:
13+
assert not path.exists(), f"private-only artifact should be absent in OSS: {path}"
14+
715

8-
def test_release_map_covers_v040_to_v052() -> None:
9-
text = Path("docs/releases/RELEASE_TAG_MAP.md").read_text(encoding="utf-8")
10-
for tag in ("v0.4.0", "v0.4.1", "v0.5.0", "v0.5.1", "v0.5.2"):
11-
assert f"| {tag} |" in text
16+
def test_releasing_guide_targets_oss_artifacts() -> None:
17+
text = Path("RELEASING.md").read_text(encoding="utf-8")
1218

19+
assert "CHANGELOG.md" in text
20+
assert "docs/QUICKSTART_en.md" in text
21+
assert "docs/QUICKSTART_zh.md" in text
22+
assert "docs/IK_USAGE.md" in text
23+
assert "docs/releases" not in text
24+
assert "backfill_releases.sh" not in text
1325

14-
def test_backfill_script_lists_v040_to_v052() -> None:
15-
text = Path("scripts/release/backfill_releases.sh").read_text(encoding="utf-8")
16-
for tag in ("v0.4.0", "v0.4.1", "v0.5.0", "v0.5.1", "v0.5.2"):
17-
assert tag in text
1826

27+
def test_make_release_check_uses_oss_tests() -> None:
28+
text = Path("Makefile").read_text(encoding="utf-8")
1929

20-
def test_release_note_files_exist_for_v040_to_v052() -> None:
21-
for tag in ("v0.4.0", "v0.4.1", "v0.5.0", "v0.5.1", "v0.5.2"):
22-
path = Path(f"docs/releases/{tag}.md")
23-
assert path.exists()
30+
assert "release-check" in text
31+
assert "tests/test_docs_version_state.py" in text
32+
assert "tests/test_release_backfill_state.py" in text
33+
assert "tests/test_roadmap_versions.py" in text
34+
assert "scripts/release/check_release_markers.py" not in text

0 commit comments

Comments
 (0)