Skip to content

refactor: eliminate duplicate shell script and templates via symlinks#15

Merged
zywkloo merged 2 commits into
mainfrom
claude/planwt-symlink-refactor-fTvve
May 28, 2026
Merged

refactor: eliminate duplicate shell script and templates via symlinks#15
zywkloo merged 2 commits into
mainfrom
claude/planwt-symlink-refactor-fTvve

Conversation

@zywkloo

@zywkloo zywkloo commented May 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • src/wtcraft/_shell.sh → replaced with symlink ../../scripts/wtcraft
  • src/wtcraft/templates/ → replaced with symlink ../../templates
  • Eliminates ~662 lines of duplicated content maintained in two places

Why no other files changed

  • pyproject.toml — setuptools follows symlinks when collecting package-data, so the existing entries bundle the real file contents unchanged
  • src/wtcraft/_cli.pyos.path.isfile / os.path.isdir resolve symlinks transparently; os.path.realpath() on lines 25-26 already normalises the path
  • MANIFEST.in — unaffected
  • tests/smoke.sh — references scripts/wtcraft directly, unaffected

Test plan

  • diff src/wtcraft/_shell.sh scripts/wtcraft — no diff (files were identical before replacement)
  • diff -r src/wtcraft/templates templates — no diff
  • os.path.isfile(shell_path) and os.path.isdir(tmpl_dir) both return True through symlinks
  • readlink -f confirms symlinks resolve to canonical repo paths
  • pip install -e . && wtcraft --help — verify installed entry point works
  • bash tests/smoke.sh — full smoke test

https://claude.ai/code/session_01PMQRznX4uyUZLJ7PR1kPax


Generated by Claude Code

claude added 2 commits May 28, 2026 02:21
src/wtcraft/_shell.sh → ../../scripts/wtcraft
src/wtcraft/templates  → ../../templates

Eliminates the maintained-in-two-places copies. setuptools follows
symlinks when collecting package-data so pyproject.toml is unchanged.
_cli.py's os.path.isfile/isdir calls resolve symlinks transparently.

https://claude.ai/code/session_01PMQRznX4uyUZLJ7PR1kPax
@zywkloo zywkloo merged commit 8f14cea into main May 28, 2026
1 check passed
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