Skip to content

fix(build): include scaffold .vscode in wheel, bump to 0.7.2#98

Merged
qjrm1430 merged 1 commit into
mainfrom
fix/hatch-include-scaffold-vscode
May 27, 2026
Merged

fix(build): include scaffold .vscode in wheel, bump to 0.7.2#98
qjrm1430 merged 1 commit into
mainfrom
fix/hatch-include-scaffold-vscode

Conversation

@qjrm1430
Copy link
Copy Markdown
Member

🚀 PR Type

  • 🎯 Ready for Review — verified by rebuilding the wheel and inspecting contents.

📝 Summary

act new로 생성된 프로젝트에 .vscode/extensions.json/settings.json이 나오지 않던 문제 수정 + 0.7.1 → 0.7.2 패치 bump.

📄 Description

원인

PyPI에 published된 0.7.1을 uv tool install로 설치한 act-operator의 site-packages 안 scaffold 디렉토리를 보면:

act_operator/scaffold/{{ cookiecutter.act_slug }}/
├── .claude/
├── .env.example
├── .github/
├── .gitignore
├── .pre-commit-config.yaml
├── .python-version
├── README.md
├── ...
└── tests/

.vscode/가 빠져 있음.act new/act cast로 만든 프로젝트도 .vscode/가 없음.

진단

루트 .gitignore.vscode/를 무시:

# IDE settings
.vscode/         이게 문제
.idea/

hatchling은 wheel build 시 VCS-ignore된 파일을 자동 제외 (기본 동작). 우리가 #95에서 git add -f로 추적시켰어도, build 단계에서 ignore 규칙을 다시 적용해 wheel에서 빼버림.

수정

루트 .gitignore에서 .vscode/ 한 줄 제거.

 # IDE settings
-.vscode/
 .idea/

이 레포 안에 존재하는 유일한 .vscode/ 디렉토리는 cookiecutter scaffold의 그것 — 정확히 wheel에 담아야 할 대상. 개발자 개인 IDE 환경 설정은 .git/info/exclude로 로컬 ignore.

검증

$ uv build
Successfully built dist/act_operator-0.7.2-py3-none-any.whl

$ unzip -l dist/act_operator-0.7.2-py3-none-any.whl | grep vscode
  337  act_operator/scaffold/{{ cookiecutter.act_slug }}/.vscode/extensions.json
  985  act_operator/scaffold/{{ cookiecutter.act_slug }}/.vscode/settings.json

이제 wheel에 두 파일이 포함됨.

버전 bump

PyPI 0.7.1은 이미 immutable으로 publish되어 있어 재배포 불가 → 0.7.2로 올림. release workflow trigger 시 PyPI에 0.7.2가 정상 scaffold와 함께 publish됨.

✅ Quality Checks

  • 코드 변경 없음 (.gitignore 1줄 제거 + 버전 문자열 1줄)
  • ruff/pytest 영향 없음
  • wheel 내용물 검증 완료

🤖 Generated with Claude Code

The root `.gitignore` ignored `.vscode/`, which hatchling honors when
building the wheel. As a result act-operator 0.7.1 published to PyPI
shipped without `act_operator/scaffold/{{ cookiecutter.act_slug }}/.vscode/`,
so `act new` produced projects without extensions.json / settings.json
— defeating the point of #95 / #97.

Fix: remove the `.vscode/` line from the root .gitignore. The only
.vscode directory in this repo is the one inside the cookiecutter
scaffold, which is exactly the one we want shipped. Personal IDE
config files (if any) belong in `.git/info/exclude`, not in the
repo-level ignore.

Verified by rebuilding and inspecting the wheel:

  $ uv build
  $ unzip -l dist/act_operator-0.7.2-py3-none-any.whl | grep vscode
    337  act_operator/scaffold/{{ cookiecutter.act_slug }}/.vscode/extensions.json
    985  act_operator/scaffold/{{ cookiecutter.act_slug }}/.vscode/settings.json

Version bumped 0.7.1 -> 0.7.2 so PyPI can serve a corrected build
(0.7.1 is already published and immutable on PyPI).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes .vscode/ from the root .gitignore and bumps the package version to 0.7.2. The reviewer points out that removing .vscode/ from .gitignore will expose local VS Code settings to Git tracking. They suggest keeping .vscode/ in .gitignore and instead using the artifacts configuration in pyproject.toml to include specific scaffold .vscode files in the build.

Comment thread .gitignore

# IDE settings
.vscode/
.idea/
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

루트 .gitignore에서 .vscode/를 제거하면, 이 프로젝트를 개발하는 개발자들의 로컬 VS Code 설정(.vscode/ 디렉토리)이 Git 추적 대상에 노출되어 git status가 지저분해지거나 실수로 커밋될 위험이 있습니다.

Hatchling 빌드 시 VCS에 의해 무시되는 파일(예: .vscode/)을 휠(wheel)에 포함시키려면, .gitignore를 수정하는 대신 pyproject.toml 파일의 [tool.hatch.build.targets.wheel] 섹션에 artifacts 설정을 사용하는 것이 더 안전하고 권장되는 방법입니다.

예를 들어, pyproject.toml에 다음과 같이 설정할 수 있습니다:

[tool.hatch.build.targets.wheel]
include = ["act_operator"]
force-include = { "act_operator" = "act_operator" }
artifacts = [
    "act_operator/scaffold/**/.vscode/*"
]

이렇게 하면 루트 .gitignore.vscode/를 유지하면서도, scaffold 내의 .vscode 파일들만 빌드 결과물에 정상적으로 포함시킬 수 있습니다.

.vscode/
.idea/

@qjrm1430 qjrm1430 merged commit d7c0e94 into main May 27, 2026
3 checks passed
@qjrm1430 qjrm1430 deleted the fix/hatch-include-scaffold-vscode branch May 27, 2026 04:51
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.

1 participant