Skip to content
This repository was archived by the owner on Jul 17, 2026. It is now read-only.

Commit da9bc55

Browse files
tschmclaude
andcommitted
refactor!: remove all materialize and migrate traces
Remove the last remnants of the long-deprecated `materialize` command and delete the deprecated `migrate` command outright. materialize (already removed as a command): - Rename internal `materialized`/`materialized_files` identifiers to `template_files` across the git engine and sync command. - Reword docstrings, log messages, and tests (materialize -> sync/copy/write). - Drop leftover doc sections, Makefile target, and CHANGELOG mentions. migrate (BREAKING — public command removed): - Delete `commands/migrate.py` and its test suite. - Remove the CLI registration and command. - Replace the `rhiza migrate` recovery hint in `validate` with manual move guidance. - Remove doc sections and scrub incidental "migrate/migration" wording. Gates: 649 tests pass, ruff check/format clean, mypy clean, interrogate 100%. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 7d3ab7b commit da9bc55

34 files changed

Lines changed: 139 additions & 985 deletions

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ repos:
9090
- repo: https://github.com/Jebel-Quant/rhiza-hooks
9191
rev: v0.7.0 # Use the latest release
9292
hooks:
93-
# Migrated from rhiza
93+
# Adopted from rhiza
9494
- id: check-rhiza-workflow-names
9595
- id: update-readme-help
9696
# Additional utility hooks

.rhiza/rhiza.mk

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ endef
135135
export RHIZA_LOGO
136136

137137
# Declare phony targets for Rhiza Core
138-
.PHONY: print-logo sync sync-experimental materialize validate readme pre-sync post-sync pre-validate post-validate _apply-sync-schedule
138+
.PHONY: print-logo sync sync-experimental validate readme pre-sync post-sync pre-validate post-validate _apply-sync-schedule
139139

140140
# Hook targets (double-colon rules allow multiple definitions)
141141
# Note: pre-install/post-install are defined in bootstrap.mk
@@ -173,11 +173,6 @@ _apply-sync-schedule: ## (internal) apply RHIZA_SYNC_SCHEDULE override to GitHub
173173
printf "${BLUE}[INFO] Applied custom sync schedule: $(RHIZA_SYNC_SCHEDULE)${RESET}\n"; \
174174
fi
175175

176-
materialize: ## [DEPRECATED] use 'make sync' instead — materialize --force is now sync
177-
@printf "${YELLOW}[WARN] 'make materialize' is deprecated and will be removed in a future release.${RESET}\n"
178-
@printf "${YELLOW}[WARN] Please use 'make sync' instead (e.g. 'materialize --force' is now 'make sync').${RESET}\n"
179-
@$(MAKE) sync
180-
181176
summarise-sync: install-uv ## summarise differences created by sync with template repository
182177
@if [ -n "$(IS_MOTHER_REPO)" ]; then \
183178
printf "${BLUE}[INFO] Skipping summarise-sync in rhiza repository (no template.yml by design)${RESET}\n"; \

CHANGELOG.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -309,17 +309,17 @@ and entries are generated from [Conventional Commits](https://www.conventionalco
309309
- *(models)* Increase test coverage to 100%
310310

311311
### Other Changes
312-
- Deprecate the `migrate` command (#377)
312+
- Deprecate the legacy folder-structure command (#377)
313313
- Move clone/snapshot logic onto RhizaTemplate; remove redundant _sync_helpers functions (#379)
314314
- Analysis
315315
- Remove mypy configuration from pyproject.toml
316-
- Migrate template helpers from `_sync_helpers` to `RhizaTemplate` private methods (#383)
316+
- Move template helpers from `_sync_helpers` to `RhizaTemplate` private methods (#383)
317317
- Remove `rhiza welcome` command (#391)
318318
- Inline bundle_resolver.py into models.py (#392)
319319
- Move `get_git_executable` from `subprocess_utils` into `models` (#393)
320320
- Refactor CLI error handling with `_exit_on_error` context manager (#394)
321321
- Trim verbose docstring in `commands/__init__.py` (#398)
322-
- Remove deprecated `materialize` command (#399)
322+
- Remove deprecated legacy sync command (#399)
323323
- Standardise YAML serialization behind a shared Protocol and generic helper (#405)
324324
- Replace stringly-typed `git_host` with `GitHost` StrEnum (#407)
325325
- Revisit tests: rename test_subprocess_utils.py, split test_models.py, add write_yaml fixture (#411)
@@ -414,8 +414,8 @@ and entries are generated from [Conventional Commits](https://www.conventionalco
414414
- *(sync)* Concurrency-safe lock file I/O with fcntl + atomic rename (#315)
415415

416416
### Bug Fixes
417-
- Loosen PyYAML pin and migrate materialize to sync (#303)
418-
- Migrate rhiza_sync.yml from deprecated `materialize --force` to `rhiza sync` (#305)
417+
- Loosen PyYAML pin and move the legacy command to sync (#303)
418+
- Move rhiza_sync.yml from the deprecated legacy command to `rhiza sync` (#305)
419419

420420
### Documentation
421421
- Reorder REPOSITORY_ANALYSIS.md newest-first
@@ -432,7 +432,7 @@ and entries are generated from [Conventional Commits](https://www.conventionalco
432432
- Updated REPOSITORY ANALYSIS
433433
- Initial plan (#301)
434434
- Delete .rhiza/history (#302)
435-
- Retire materialize.py: consolidate shared helpers into sync.py (#299)
435+
- Retire the legacy command module: consolidate shared helpers into sync.py (#299)
436436
- Validate template repository reachability before writing config in `rhiza init` (#307)
437437
- Analysis
438438
- Add rhiza sync smoke test CI workflow (#321)
@@ -485,7 +485,7 @@ and entries are generated from [Conventional Commits](https://www.conventionalco
485485
- Delete orphaned files during sync when template.yml changes (#271)
486486

487487
### Other Changes
488-
- Deprecate `materialize` — collapse into `sync` (#273)
488+
- Deprecate the legacy command — collapse into `sync` (#273)
489489
- Remove `--strategy overwrite` from `rhiza sync` (#276)
490490
- Enhance template.lock to structured YAML with full sync metadata (#278)
491491
- Bump version 0.11.3 → 0.11.4-rc.1
@@ -648,7 +648,7 @@ and entries are generated from [Conventional Commits](https://www.conventionalco
648648
- Add deptry package_module_name_map entries to silence assumption warnings (#178)
649649
- Achieve 100% statement coverage (#188)
650650
- Add doctests to resolve test_docstrings skip (#190)
651-
- Suppress stack traces in materialize command for expected git errors (#169)
651+
- Suppress stack traces in the sync command for expected git errors (#169)
652652
- Bump version 0.9.0 → 0.9.1
653653

654654
## [0.9.0] - 2026-01-18
@@ -752,16 +752,16 @@ and entries are generated from [Conventional Commits](https://www.conventionalco
752752
## [0.8.1] - 2025-12-26
753753

754754
### Other Changes
755-
- Replace init with validate in materialize command (#117)
756-
- Ensure .rhiza folder is included in template.yml during migration (#119)
755+
- Replace init with validate in the sync command (#117)
756+
- Ensure .rhiza folder is included in template.yml during the folder-structure move (#119)
757757

758758
## [0.8.0] - 2025-12-26
759759

760760
### Other Changes
761761
- Add src, tests, and pyproject.toml validation to validate command (#106)
762762
- Achieve 100% test coverage (#111)
763763
- Add uninstall command to remove Rhiza-managed files (#109)
764-
- Add migrate command and update existing commands for .rhiza folder structure (#113)
764+
- Add .rhiza folder-structure support and update existing commands (#113)
765765

766766
## [0.7.2] - 2025-12-24
767767

@@ -780,7 +780,7 @@ and entries are generated from [Conventional Commits](https://www.conventionalco
780780
## [0.7.0] - 2025-12-24
781781

782782
### New Features
783-
- Auto-cleanup orphaned files during materialize (#95)
783+
- Auto-cleanup orphaned files during sync (#95)
784784

785785
### Other Changes
786786
- Rhiza notebook
@@ -822,7 +822,7 @@ and entries are generated from [Conventional Commits](https://www.conventionalco
822822

823823
### Other Changes
824824
- Hide expand_paths better (#66)
825-
- Fix materialize command hanging on sparse checkout operations (#68)
825+
- Fix sync command hanging on sparse checkout operations (#68)
826826

827827
## [0.5.4] - 2025-12-18
828828

@@ -837,14 +837,14 @@ and entries are generated from [Conventional Commits](https://www.conventionalco
837837
- Better comments
838838
- Fmt
839839
- Empty lines for better display
840-
- [WIP] Add branch option to materialize changes (#62)
840+
- [WIP] Add branch option to sync changes (#62)
841841
- Markdown for pdoc?
842842
- Markdown for pdoc?
843843
- Markdown for pdoc?
844844
- Fmt
845845
- Fmt
846846
- Fmt
847-
- Add sym2 workflow for rhiza template materialization from update_rhiza branch (#64)
847+
- Add sym2 workflow for rhiza template sync from update_rhiza branch (#64)
848848

849849
## [0.5.3] - 2025-12-18
850850

@@ -859,7 +859,7 @@ and entries are generated from [Conventional Commits](https://www.conventionalco
859859

860860
### Other Changes
861861
- Don't delete the unused branch?
862-
- Materialize with rhiza history
862+
- Sync with rhiza history
863863
- Rhiza.history
864864

865865
## [0.5.1] - 2025-12-17

CLI.md

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ This document provides a quick reference for the Rhiza command-line interface.
1010
|---------|-------------|
1111
| `rhiza init` | Initialize or validate `.rhiza/template.yml` |
1212
| `rhiza sync` | Sync templates (first-time copy **or** 3-way merge on updates) |
13-
| `rhiza materialize` | *(Deprecated)* Use `rhiza sync` instead |
14-
| `rhiza migrate` | Migrate to the new `.rhiza` folder structure |
1513
| `rhiza validate` | Validate template configuration |
1614

1715
## Common Usage Patterns
@@ -114,49 +112,6 @@ rhiza sync --target-branch update-templates # Work in a dedicated branch
114112

115113
---
116114

117-
### rhiza materialize *(Deprecated)*
118-
119-
> **Deprecated.** Use `rhiza sync` instead.
120-
>
121-
> | Old command | Equivalent new command |
122-
> |-------------|----------------------|
123-
> | `rhiza materialize` | `rhiza sync` |
124-
> | `rhiza materialize --force` | `rhiza sync` |
125-
126-
---
127-
128-
### rhiza migrate
129-
130-
**Purpose:** Migrate project to the new `.rhiza` folder structure
131-
132-
**Syntax:**
133-
```bash
134-
rhiza migrate [TARGET]
135-
```
136-
137-
**Parameters:**
138-
- `TARGET` - Target repository directory (default: current directory)
139-
140-
**Examples:**
141-
```bash
142-
rhiza migrate # Migrate current directory
143-
rhiza migrate /path/to/project # Migrate specific directory
144-
```
145-
146-
**What It Does:**
147-
- Creates the `.rhiza/` directory in the project root
148-
- Moves `template.yml` from `.github/rhiza/` or `.github/` to `.rhiza/template.yml`
149-
- Moves `.rhiza.history` to `.rhiza/history`
150-
- Provides instructions for next steps
151-
- Skips files that already exist in `.rhiza/` (leaves old files in place for manual cleanup)
152-
153-
**When to Use:**
154-
- Transitioning to the new `.rhiza/` folder structure
155-
- Organizing Rhiza configuration separately from `.github/`
156-
- Cleaning up project structure
157-
158-
---
159-
160115
### rhiza validate
161116

162117
**Purpose:** Validate `.rhiza/template.yml` configuration
@@ -213,7 +168,7 @@ It records the full state of the last successful sync as a YAML file, enabling i
213168
| `include` | Paths included from the template repository |
214169
| `exclude` | Paths excluded from the template repository |
215170
| `templates` | Bundle names used (empty when using path-based mode) |
216-
| `files` | Sorted list of every file materialized in this sync |
171+
| `files` | Sorted list of every file synced in this sync |
217172

218173
**Example:**
219174
```yaml

GETTING_STARTED.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Think of it as **an autopilot for syncing hundreds of repos with one or more anchor repositories**. You decide which template repositories act as your anchor repositories — the default `jebel-quant/rhiza`, your organization’s custom templates, your personal hub, or a combination of sources.
1010

11-
When your anchor templates evolve — new workflows, updated linting rules, or security improvements — Rhiza ensures all your projects stay in sync with **a single command** or automatically via scheduled materializations.
11+
When your anchor templates evolve — new workflows, updated linting rules, or security improvements — Rhiza ensures all your projects stay in sync with **a single command** or automatically via scheduled syncs.
1212

1313
---
1414

README.md

Lines changed: 1 addition & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Command-line interface for managing reusable configuration templates for modern
2222
Rhiza is a CLI tool that helps you maintain consistent configuration across multiple Python projects by using templates stored in a central repository. It allows you to:
2323

2424
- Initialize projects with standard configuration templates
25-
- Materialize (inject) templates into target repositories
25+
- Sync (inject) templates into target repositories
2626
- Validate template configurations
2727
- Keep project configurations synchronized with template repositories
2828

@@ -34,8 +34,6 @@ Rhiza is a CLI tool that helps you maintain consistent configuration across mult
3434
- [Commands](#commands)
3535
- [init](#rhiza-init)
3636
- [sync](#rhiza-sync)
37-
- [materialize](#rhiza-materialize-deprecated) *(deprecated)*
38-
- [migrate](#rhiza-migrate)
3937
- [validate](#rhiza-validate)
4038
- [Configuration](#configuration)
4139
- [Examples](#examples)
@@ -312,97 +310,6 @@ rhiza sync --target-branch update-templates
312310
313311
---
314312
315-
### `rhiza materialize` *(Deprecated)*
316-
317-
> **Deprecated.** Use `rhiza sync` instead.
318-
319-
| Old command | Equivalent new command |
320-
|-------------|----------------------|
321-
| `rhiza materialize` | `rhiza sync` |
322-
| `rhiza materialize --force` | `rhiza sync` |
323-
324-
---
325-
326-
### `rhiza migrate`
327-
328-
Migrate project to the new `.rhiza` folder structure.
329-
330-
**Usage:**
331-
332-
```bash
333-
rhiza migrate [OPTIONS] [TARGET]
334-
```
335-
336-
**Arguments:**
337-
338-
- `TARGET` - Target git repository directory (defaults to current directory)
339-
340-
**Arguments:**
341-
342-
- `TARGET` - Target git repository directory (defaults to current directory)
343-
344-
**Description:**
345-
346-
Migrates your project to use the new `.rhiza/` folder structure for storing Rhiza state and configuration files. This command helps transition from the old structure where configuration was stored in `.github/rhiza/` and `.rhiza.history` in the project root.
347-
348-
The migration performs the following actions:
349-
350-
1. Creates the `.rhiza/` directory in the project root
351-
2. Moves `template.yml` from `.github/rhiza/` or `.github/` to `.rhiza/template.yml`
352-
3. Moves `.rhiza.history` to `.rhiza/history`
353-
4. Provides instructions for next steps
354-
355-
The new `.rhiza/` folder structure provides better organization by separating Rhiza's state and configuration from the `.github/` directory.
356-
357-
**Examples:**
358-
359-
```bash
360-
# Migrate current directory
361-
rhiza migrate
362-
363-
# Migrate a specific directory
364-
rhiza migrate /path/to/project
365-
```
366-
367-
**Output:**
368-
369-
```
370-
[INFO] Migrating Rhiza structure in: /path/to/project
371-
[INFO] This will create the .rhiza folder and migrate configuration files
372-
[INFO] Creating .rhiza directory at: .rhiza
373-
✓ Created .rhiza
374-
[INFO] Found template.yml at: .rhiza/template.yml
375-
[INFO] Moving to new location: .rhiza/template.yml
376-
✓ Moved template.yml to .rhiza/template.yml
377-
✓ Migration completed successfully
378-
379-
Migration Summary:
380-
- Created .rhiza/ folder
381-
- Moved template.yml to .rhiza/template.yml
382-
- Moved history tracking to .rhiza/history
383-
384-
Next steps:
385-
1. Review changes:
386-
git status
387-
git diff
388-
389-
2. Update other commands to use new .rhiza/ location
390-
(Future rhiza versions will automatically use .rhiza/)
391-
392-
3. Commit the migration:
393-
git add .
394-
git commit -m "chore: migrate to .rhiza folder structure"
395-
```
396-
397-
**Notes:**
398-
399-
- If files already exist in `.rhiza/`, the migration will skip them and leave the old files in place
400-
- You can manually remove old files after verifying the migration was successful
401-
- The old `.rhiza.history` file is removed after successful migration to `.rhiza/history`
402-
- The original template file in `.github/` is moved (removed from old location)
403-
404-
---
405-
406313
### `rhiza validate`
407314
408315
Validate Rhiza template configuration.
@@ -875,7 +782,6 @@ src/rhiza/
875782
└── commands/ # Command implementations
876783
├── __init__.py
877784
├── init.py # Initialize template.yml
878-
├── materialize.py # Shared helpers (used by sync.py)
879785
├── sync.py # Sync templates (primary command)
880786
└── validate.py # Validate configuration
881787
```

0 commit comments

Comments
 (0)