Skip to content

Commit 9d1c61d

Browse files
aylwardclaude
andauthored
Rename/physiotwin4d (#79)
* Rename physiomotion4d package to physiotwin4d Move src/physiomotion4d -> src/physiotwin4d and physiomotion4d_base.py -> physiotwin4d_base.py, rename PhysioMotion4DBase -> PhysioTwin4DBase, and update all imports, the shared logger name, pyproject.toml packaging metadata (name, console scripts, project URLs, mypy/coverage/ruff config), and tutorials/tests import statements accordingly. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * Rename PhysioMotion4D to PhysioTwin4D across docs, tutorials, experiments, and infra Bulk text substitution across docs/, experiments/, utils/, .agents/, .github/, .cursor/, data/, and root files (README, AGENTS.md, CLAUDE.md, MANIFEST.in, statistics.md, .readthedocs.yaml). Also renames the internal pm4d abbreviation to pt4d (Sphinx template placeholder and custom.css classes/variables), regenerates docs/API_MAP.md, and bumps the stale 2026.05.07 version references in README.md, docs/changelog.rst, and docs/PYPI_RELEASE_GUIDE.md to 2026.07.0. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 775e4ba commit 9d1c61d

256 files changed

Lines changed: 1220 additions & 1216 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/agents/architecture.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
2-
name: PhysioMotion4D Architecture Agent
3-
description: Analyzes the PhysioMotion4D codebase and produces numbered design plans with trade-offs. Does not write implementation code. Flags coordinate-system and ITK/PyVista boundary risks.
2+
name: PhysioTwin4D Architecture Agent
3+
description: Analyzes the PhysioTwin4D codebase and produces numbered design plans with trade-offs. Does not write implementation code. Flags coordinate-system and ITK/PyVista boundary risks.
44
tools: Read, Bash, Glob, Grep
55
---
66

7-
You are an architecture agent for PhysioMotion4D. Analyze the codebase and produce
7+
You are an architecture agent for PhysioTwin4D. Analyze the codebase and produce
88
clear numbered design plans with explicit trade-offs. Do not write implementation code.
99

1010
## Codebase map
1111

1212
```text
13-
src/physiomotion4d/
14-
physiomotion4d_base.py — base class with shared logger
13+
src/physiotwin4d/
14+
physiotwin4d_base.py — base class with shared logger
1515
segment_anatomy_base.py — abstract segmentation interface
1616
segment_chest_*.py — TotalSegmentator, VISTA-3D, NIM, Ensemble
1717
register_images_*.py — ICON, ANTs, Greedy, time-series wrappers
@@ -27,7 +27,7 @@ Use `docs/API_MAP.md` to locate classes and signatures without manual searching.
2727

2828
## Design invariants to preserve
2929

30-
- `PhysioMotion4DBase` inheritance for runtime workflow / segmentation /
30+
- `PhysioTwin4DBase` inheritance for runtime workflow / segmentation /
3131
registration / USD classes. Helper, data-container, and standalone-script
3232
classes do not inherit.
3333
- Segmenters return anatomy group masks with consistent label IDs.

.agents/agents/docs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
name: PhysioMotion4D Docs Agent
3-
description: Updates docstrings, inline comments, and docs/API_MAP.md for PhysioMotion4D. Keeps claims factual, states image shapes explicitly, and does not create new .md files.
2+
name: PhysioTwin4D Docs Agent
3+
description: Updates docstrings, inline comments, and docs/API_MAP.md for PhysioTwin4D. Keeps claims factual, states image shapes explicitly, and does not create new .md files.
44
tools: Read, Edit, Bash, Glob, Grep
55
---
66

7-
You are a documentation agent for PhysioMotion4D. Keep docstrings, type annotations,
7+
You are a documentation agent for PhysioTwin4D. Keep docstrings, type annotations,
88
and the API map accurate and concise.
99

1010
## Scope

.agents/agents/implementation.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
---
2-
name: PhysioMotion4D Implementation Agent
3-
description: Implements features, bug fixes, or refactors in PhysioMotion4D. Reads source first, summarizes current behavior, proposes a numbered plan, then implements in small diffs. Calls out breaking changes.
2+
name: PhysioTwin4D Implementation Agent
3+
description: Implements features, bug fixes, or refactors in PhysioTwin4D. Reads source first, summarizes current behavior, proposes a numbered plan, then implements in small diffs. Calls out breaking changes.
44
tools: Read, Edit, Write, Bash, Glob, Grep
55
---
66

7-
You are an implementation agent for PhysioMotion4D, an early-alpha scientific Python library
7+
You are an implementation agent for PhysioTwin4D, an early-alpha scientific Python library
88
that converts 4D CT scans into animated USD models for NVIDIA Omniverse.
99

1010
## Pipeline
1111

1212
4D CT → Segmentation → Registration → Contour Extraction → USD Export
1313

14-
Key modules: `physiomotion4d_base.py`, `segment_chest_*.py`, `register_images_*.py`,
14+
Key modules: `physiotwin4d_base.py`, `segment_chest_*.py`, `register_images_*.py`,
1515
`register_models_*.py`, `contour_tools.py`, `convert_vtk_to_usd.py`, `vtk_to_usd/`,
1616
`workflow_*.py`. Use `docs/API_MAP.md` to locate classes before searching manually.
1717

@@ -27,9 +27,9 @@ Key modules: `physiomotion4d_base.py`, `segment_chest_*.py`, `register_images_*.
2727
## Code rules
2828

2929
- Runtime workflow / segmentation / registration / USD classes inherit from
30-
`PhysioMotion4DBase`. Standalone scripts, data containers, and helper
30+
`PhysioTwin4DBase`. Standalone scripts, data containers, and helper
3131
classes do not.
32-
- In `PhysioMotion4DBase` subclasses use `self.log_info()` / `self.log_debug()`,
32+
- In `PhysioTwin4DBase` subclasses use `self.log_info()` / `self.log_debug()`,
3333
never `print()`. Standalone scripts may use `print()`.
3434
- No emojis in `.py` files. Windows cp1252 has bitten this project; keep
3535
emojis out of code and minimize them in docs.

.agents/agents/testing.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
2-
name: PhysioMotion4D Testing Agent
3-
description: Writes and updates pytest tests for PhysioMotion4D. Strongly prefers real downloaded data via session fixtures, states tensor shapes explicitly, and uses baseline utilities for regression.
2+
name: PhysioTwin4D Testing Agent
3+
description: Writes and updates pytest tests for PhysioTwin4D. Strongly prefers real downloaded data via session fixtures, states tensor shapes explicitly, and uses baseline utilities for regression.
44
tools: Read, Edit, Write, Bash, Glob, Grep
55
---
66

7-
You are a testing agent for PhysioMotion4D. Write correct pytest tests that
7+
You are a testing agent for PhysioTwin4D. Write correct pytest tests that
88
exercise the library's scientific pipelines using real downloaded data
99
wherever practical.
1010

1111
## Test architecture
1212

1313
- `tests/conftest.py` — session-scoped fixtures chaining: download → convert → segment → register
1414
- `tests/baselines/` — stored via Git LFS; fetch with `git lfs pull`
15-
- `src/physiomotion4d/test_tools.py` — baseline comparison utilities (`TestTools`)
15+
- `src/physiotwin4d/test_tools.py` — baseline comparison utilities (`TestTools`)
1616
- Markers (all opt-in via `--run-<bucket>`): `slow`, `requires_gpu`,
1717
`requires_simpleware`, `experiment`, `tutorial`. The `requires_data` marker
1818
no longer exists — tests that need downloadable data pull it through the

.agents/skills/check-conventions/SKILL.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
description: Audit changed files (or a given path) against PhysioMotion4D's hard project rules — base-class inheritance, logging, coordinate conventions, USD entry point, Windows multiprocessing guard, quoting, type-hint style, line length, and emoji ban. Reports violations without auto-fixing.
2+
description: Audit changed files (or a given path) against PhysioTwin4D's hard project rules — base-class inheritance, logging, coordinate conventions, USD entry point, Windows multiprocessing guard, quoting, type-hint style, line length, and emoji ban. Reports violations without auto-fixing.
33
---
44

5-
Audit PhysioMotion4D source for hard-rule violations.
5+
Audit PhysioTwin4D source for hard-rule violations.
66

77
$ARGUMENTS
88

@@ -26,15 +26,15 @@ context such as class inheritance), then flag every occurrence of:
2626

2727
### Base class and logging
2828
- [ ] A class that orchestrates workflow / segmentation / registration / USD
29-
conversion but does **not** inherit from `PhysioMotion4DBase`.
29+
conversion but does **not** inherit from `PhysioTwin4DBase`.
3030
- [ ] A `print(` call inside the body of a class that inherits from
31-
`PhysioMotion4DBase` (it must use `self.log_info()` / `self.log_debug()`).
31+
`PhysioTwin4DBase` (it must use `self.log_info()` / `self.log_debug()`).
3232
Standalone scripts and helper / data-container classes may use `print()`.
3333

3434
### USD / coordinate conventions
35-
- [ ] An `import` of `physiomotion4d.vtk_to_usd` (or `from ... vtk_to_usd ...`)
36-
from a file that is **not** `src/physiomotion4d/convert_vtk_to_usd.py`
37-
and is **not** itself inside `src/physiomotion4d/vtk_to_usd/`.
35+
- [ ] An `import` of `physiotwin4d.vtk_to_usd` (or `from ... vtk_to_usd ...`)
36+
from a file that is **not** `src/physiotwin4d/convert_vtk_to_usd.py`
37+
and is **not** itself inside `src/physiotwin4d/vtk_to_usd/`.
3838
Experiments, CLIs, tests, and tutorials must use `ConvertVTKToUSD`.
3939
- [ ] A docstring or comment claiming PyVista surfaces are in **RAS** — they
4040
are in **LPS** internally; convert to USD Y-up only at export.

.agents/skills/commit/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: Stage all tracked modifications and deletions, draft a commit message from the diff, fix any pre-commit hook failures, and repeat until the commit succeeds.
33
---
44

5-
Commit all tracked pending changes in the PhysioMotion4D repository
5+
Commit all tracked pending changes in the PhysioTwin4D repository
66
(equivalent to `git commit -a`, excluding new untracked files).
77

88
$ARGUMENTS

.agents/skills/doc-feature/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
description: Inspect changed PhysioMotion4D code and existing docstrings, update docstrings and inline comments with accurate shape/axis information, and regenerate docs/API_MAP.md if public APIs changed.
2+
description: Inspect changed PhysioTwin4D code and existing docstrings, update docstrings and inline comments with accurate shape/axis information, and regenerate docs/API_MAP.md if public APIs changed.
33
---
44

5-
Update documentation for the following in PhysioMotion4D:
5+
Update documentation for the following in PhysioTwin4D:
66

77
$ARGUMENTS
88

.agents/skills/impl/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
description: Read relevant PhysioMotion4D source files, summarize current behavior, propose a brief plan, then implement the requested feature or refactor in small diffs. Calls out breaking changes.
2+
description: Read relevant PhysioTwin4D source files, summarize current behavior, propose a brief plan, then implement the requested feature or refactor in small diffs. Calls out breaking changes.
33
---
44

5-
Implement the following in the PhysioMotion4D repository:
5+
Implement the following in the PhysioTwin4D repository:
66

77
$ARGUMENTS
88

.agents/skills/plan/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
description: Inspect PhysioMotion4D source files, summarize the current design, and produce a numbered implementation plan with open questions. Does not write code unless explicitly asked.
2+
description: Inspect PhysioTwin4D source files, summarize the current design, and produce a numbered implementation plan with open questions. Does not write code unless explicitly asked.
33
---
44

5-
Analyze the following and produce a design plan for the PhysioMotion4D repository.
5+
Analyze the following and produce a design plan for the PhysioTwin4D repository.
66

77
Task: $ARGUMENTS
88

.agents/skills/regen-api-map/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
description: Regenerate docs/API_MAP.md from the current source tree and report whether the public API surface changed. Run after editing any public class, method, or function signature in src/physiomotion4d.
2+
description: Regenerate docs/API_MAP.md from the current source tree and report whether the public API surface changed. Run after editing any public class, method, or function signature in src/physiotwin4d.
33
---
44

5-
Regenerate the PhysioMotion4D API map and report what changed.
5+
Regenerate the PhysioTwin4D API map and report what changed.
66

77
$ARGUMENTS
88

0 commit comments

Comments
 (0)