-
Notifications
You must be signed in to change notification settings - Fork 0
Test and Update CLI Module #127
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: develop
Are you sure you want to change the base?
Conversation
# Motivation The **Codegen on OSS** package provides a pipeline that: - **Collects repository URLs** from different sources (e.g., CSV files or GitHub searches). - **Parses repositories** using the codegen tool. - **Profiles performance** and logs metrics for each parsing run. - **Logs errors** to help pinpoint parsing failures or performance bottlenecks. <!-- Why is this change necessary? --> # Content <!-- Please include a summary of the change --> see [codegen-on-oss/README.md](https://github.com/codegen-sh/codegen-sdk/blob/acfe3dc07b65670af33b977fa1e7bc8627fd714e/codegen-on-oss/README.md) # Testing <!-- How was the change tested? --> `uv run modal run modal_run.py` No unit tests yet 😿 # Please check the following before marking your PR as ready for review - [ ] I have added tests for my changes - [x] I have updated the documentation or added new documentation as needed
Original commit by Tawsif Kamal: Revert "Revert "Adding Schema for Tool Outputs"" (codegen-sh#894) Reverts codegen-sh#892 --------- Co-authored-by: Rushil Patel <rpatel@codegen.com> Co-authored-by: rushilpatel0 <171610820+rushilpatel0@users.noreply.github.com>
Original commit by Ellen Agarwal: fix: Workaround for relace not adding newlines (codegen-sh#907)
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Reviewer's GuideThis PR introduces a full-fledged test framework for the CLI module—including unit and integration tests—alongside substantial README updates and minor configuration tweaks. Sequence Diagram for CLI Codemod Creation and DeploymentsequenceDiagram
actor User
participant CodegenCLI
participant CodegenAPI
participant CloudPlatform
User->>CodegenCLI: codegen login --token <API_TOKEN>
activate CodegenCLI
CodegenCLI->>CodegenAPI: Authenticate User (token)
activate CodegenAPI
CodegenAPI-->>CodegenCLI: Auth Success
deactivate CodegenAPI
CodegenCLI-->>User: Logged in successfully
deactivate CodegenCLI
User->>CodegenCLI: codegen create "MyCodemod" "This is a new codemod."
activate CodegenCLI
Note right of CodegenCLI: CLI processes request, generates files locally
CodegenCLI-->>User: Codemod "MyCodemod" created successfully
deactivate CodegenCLI
User->>CodegenCLI: codegen deploy "MyCodemod"
activate CodegenCLI
CodegenCLI->>CodegenAPI: Request to deploy "MyCodemod"
activate CodegenAPI
CodegenAPI->>CloudPlatform: Deploy "MyCodemod" package
activate CloudPlatform
CloudPlatform-->>CodegenAPI: Deployment Acknowledged/In Progress
deactivate CloudPlatform
CodegenAPI-->>CodegenCLI: Deployment Status (e.g., In Progress)
deactivate CodegenAPI
CodegenCLI-->>User: "MyCodemod" deployment initiated.
deactivate CodegenCLI
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
I see a check failed - I'm on it! 🫡 |
✅ Fixed the failing check in this commit. The issue was a missing import for 💻 View my work • React 👍 or 👎 |
I see a check failed - I'm on it! 🫡 |
✅ Fixed the failing pre-commit and mypy checks in this commit. The issues were:
I've fixed these issues by running the pre-commit hooks on the affected files and committing the changes. The tests should now pass. 💻 View my work • React 👍 or 👎 |
Overview
This PR implements comprehensive testing and documentation updates for the CLI module of the Codegen SDK, as requested in issue ZAM-410.
Changes
Test Suite
Documentation
Organization
Test Coverage
The implemented tests cover:
Next Steps
Related Issues
💻 View my work • About Codegen
Note
I'm currently writing a description for your pull request. I should be done shortly (<1 minute). Please don't edit the description field until I'm finished, or we may overwrite each other. If I find nothing to write about, I'll delete this message.
Summary by Sourcery
Add a comprehensive testing framework for the Codegen CLI module, update command-line documentation, and modernize project configuration.
Enhancements:
Build:
Documentation:
Tests: