Skip to content

Comments

fix: add package marker comment to __init__.py template files#363

Merged
notgitika merged 1 commit intomainfrom
fix/init-py-package-marker
Feb 20, 2026
Merged

fix: add package marker comment to __init__.py template files#363
notgitika merged 1 commit intomainfrom
fix/init-py-package-marker

Conversation

@tejaskash
Copy link
Contributor

Summary

  • Replaced empty/near-empty (0–1 byte) content in all 12 __init__.py template files with # Package marker comment
  • These files were fragile through the Handlebars rendering pipeline and npm tarball distribution, causing missing __init__.py in generated projects ("works in Docker, breaks locally" for editable installs, pytest, mypy)
  • Updated corresponding snapshot tests

Files changed

12 __init__.py files across all framework templates (autogen, crewai, googleadk, langchain_langgraph, openaiagents, strands) in model/ and mcp_client/ directories, plus strands/capabilities/memory/__init__.py.

Test plan

  • npm run build succeeds
  • npm test passes (14 pre-existing failures unrelated to this change)
  • npm pack --dry-run | grep __init__ shows all 12 files at 17B
  • End-to-end: generated project contains model/__init__.py and mcp_client/__init__.py with # Package marker content

The 12 __init__.py files in src/assets/python/ were 0-1 bytes (empty or
single newline), which made them fragile through the Handlebars rendering
pipeline and npm tarball distribution. This caused "works in Docker,
breaks locally" issues for editable installs, pytest, and mypy.

Replace empty content with a `# Package marker` comment so the files
survive template rendering and packaging reliably.
@tejaskash tejaskash requested a review from a team February 20, 2026 16:10
@github-actions github-actions bot added the size/s PR size: S label Feb 20, 2026
@github-actions
Copy link
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 43.53% 2883 / 6623
🔵 Statements 43.12% 3038 / 7045
🔵 Functions 45.53% 607 / 1333
🔵 Branches 48.48% 1893 / 3904
Generated in workflow #470 for commit a1f0318 by the Vitest Coverage Report Action

@notgitika
Copy link
Contributor

/strands review
is this PR missing any files?

@github-actions
Copy link
Contributor

Review Complete ✅

I've reviewed the PR and can confirm that no files are missing.

Verification Summary

Files changed: 13 total

  • 12 __init__.py template files (as claimed)
  • 1 snapshot test file (correctly updated with all 12 changes)

Framework Breakdown

All frameworks are correctly covered:

Framework model/__init__.py mcp_client/__init__.py Additional
autogen -
crewai N/A* -
googleadk -
langchain_langgraph -
openaiagents -
strands capabilities/memory/__init__.py

*Note: crewai framework does not have an mcp_client directory in its structure, so this is not missing.

Content Verification

All __init__.py files now contain: # Package marker

The snapshot test file correctly reflects all 12 changes from empty content to # Package marker.

Additional Checks Performed

  • ✅ Searched entire src/assets/python directory for all __init__.py files
  • ✅ Verified no additional __init__.py files exist that should have been updated
  • ✅ Confirmed snapshot test has 12 "Package marker" additions
  • ✅ Verified file content matches expected pattern

Conclusion: The PR is complete and comprehensive. All necessary files are included.

Copy link
Contributor

@notgitika notgitika left a comment

Choose a reason for hiding this comment

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

lgtm

@notgitika notgitika merged commit 993e695 into main Feb 20, 2026
16 of 18 checks passed
@notgitika notgitika deleted the fix/init-py-package-marker branch February 20, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants