-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add automatic README.md and quilt_summarize.json generation to packages #200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…packages - Implement generate_package_readme() function to create comprehensive README - Implement generate_quilt_summarize() function for package summaries - Integrate generation into QuiltService.create_package_revision() - Add configurable parameters: include_readme, readme_content, include_quilt_summary - README contents are added as actual files in the package (not metadata) - Every package includes quilt_summarize.json with README and metadata - All 268 unit tests pass (10 new tests added) - Code coverage: 91% for readme_generator.py, 82% for quilt_service.py Per user requirements: - README.md and quilt_summarize.json are package entries, not S3 metadata - Enabled by default with option to disable or provide custom content
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
| # Add README.md to package | ||
| pkg.set("README.md", readme_content) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P0] Set README content as inline data instead of file path
The new logic calls pkg.set("README.md", readme_content) where readme_content is Markdown text produced on the fly. In quilt3 a str argument to Package.set is treated as a filesystem path to upload, so passing inline README text causes the method to try to read a local file whose name is the markdown contents and raises FileNotFoundError before the package push completes. Because this path runs by default for every package, create_package_revision will fail for normal usage. Pass bytes via the data parameter (e.g. pkg.set("README.md", data=readme_content.encode("utf-8"))). The same applies to the subsequent pkg.set("quilt_summarize.json", summary_content) call.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on October 25
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| ) | ||
|
|
||
| # Add quilt_summarize.json to package | ||
| pkg.set("quilt_summarize.json", summary_content) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Inconsistent README Handling in Package Summary
The create_package_revision method can generate an inconsistent quilt_summarize.json. When include_readme=False, the summary might include readme_content even if README.md isn't added to the package. Alternatively, if no readme_content is provided, the summary's README field becomes empty, which may not align with expectations for quilt_summarize.json.
Overview
Implements automatic generation of README.md and quilt_summarize.json files for all Quilt packages, addressing user requirements that:
Changes
New Module: readme_generator.py
generate_package_readme()- Creates comprehensive markdown README with:generate_quilt_summarize()- Creates JSON summary with:Updated: QuiltService.create_package_revision()
Added three new optional parameters:
include_readme: bool = True- Automatically generate and include README.mdreadme_content: Optional[str] = None- Provide custom README contentinclude_quilt_summary: bool = True- Automatically generate quilt_summarize.jsonTesting
test_package_readme_generation.pyImplementation Details
Default Behavior:
pkg.set()), NOT S3 metadataConfigurable:
include_readme=Falsereadme_content="# My README..."include_quilt_summary=FalseBackward Compatible:
Impact on Package Creation Tools
All package creation tools that use
QuiltService.create_package_revision()now automatically benefit from this feature:package_create()package_create_enhanced()create_package_enhanced()package_create_from_s3()create_package()(unified tool)Example Usage
Default (automatic generation):
Custom README:
Disable generation:
Verification Checklist
References
Note
Automatically generates and adds README.md and quilt_summarize.json when creating packages, with options to customize or disable; includes comprehensive unit tests.
QuiltService.create_package_revision()to:include_readme,readme_content,include_quilt_summary.README.mdviagenerate_package_readme().quilt_summarize.jsonviagenerate_quilt_summarize().src/quilt_mcp/services/readme_generator.pygenerate_package_readme(...)for README markdown.generate_quilt_summarize(...)for package summary JSON.tests/unit/test_package_readme_generation.pycovering default inclusion, metadata/contents, usage examples, and configurable enable/disable/custom README.Written by Cursor Bugbot for commit 492cd58. This will update automatically on new commits. Configure here.