Skip to content

refactor: consolidate sync_manifest.py and utils.py into manifest-as-config (#89) - #140

Merged
gerchowl merged 10 commits into
devfrom
feature/89-consolidate-sync-manifest-utils
Feb 23, 2026
Merged

gerchowl merged 10 commits into
devfrom
feature/89-consolidate-sync-manifest-utils

Conversation

@gerchowl

@gerchowl gerchowl commented Feb 21, 2026 •

Copy link
Copy Markdown
Contributor

Refactors sync_manifest.py and utils.py per #89:

  • Extract transform classes to scripts/transforms.py (Sed, RemoveLines, StripTrailingBlankLines, RemoveBlock, RemovePrecommitHooks, ReplaceBlock)
  • Unify sed logic via substitute_in_file() in utils — shared by sed_inplace (literal) and Sed transform (regex)
  • Convert MANIFEST to declarative config — scripts/manifest.toml with TOML, loaded via tomllib

Acceptance criteria

  • No duplicate text-replacement logic between the two files
  • sync_manifest.py manifest entries are declarative config (not Python code defining data)
  • utils.py CLI (version, sed subcommands) continues to work unchanged
  • just sync-workspace produces identical output before and after
  • All existing tests pass

Refs: #89

gerchowl and others added 5 commits February 21, 2026 02:29
- Add substitute_in_file(path, pattern, replacement, regex=, global_replace=)
- sed_inplace uses substitute_in_file for literal replacement
- Sed transform uses substitute_in_file for regex replacement

Refs: #89
Co-authored-by: Cursor <[email protected]>
- Add scripts/manifest.toml with TOML config for sync entries
- Load manifest via tomllib, build Entry/transform instances from config
- Manifest is now data-only, not Python code defining data

Refs: #89
Co-authored-by: Cursor <[email protected]>
@gerchowl
gerchowl requested a review from c-vigo as a code owner February 21, 2026 18:00
Remove conflict markers from scripts/sync_manifest.py, keep declarative manifest.toml.
Merge CHANGELOG entries from dev (#71, #147). Add justfile.base to manifest.toml.

Refs: #89
Co-authored-by: Cursor <[email protected]>
@gerchowl
gerchowl merged commit 1d43476 into dev Feb 23, 2026
12 checks passed
@gerchowl
gerchowl deleted the feature/89-consolidate-sync-manifest-utils branch February 23, 2026 22:50
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.

2 participants