-
Notifications
You must be signed in to change notification settings - Fork 0
ZAM-371: Implement codegen_sdk_codebase.py in analyzers directory #101
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?
ZAM-371: Implement codegen_sdk_codebase.py in analyzers directory #101
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)
Original commit by Edo Pujol: fix: return branch name with pr changes # Motivation <!-- Why is this change necessary? --> # Content <!-- Please include a summary of the change --> # Testing <!-- How was the change tested? --> # Please check the following before marking your PR as ready for review - [ ] I have added tests for my changes - [ ] I have updated the documentation or added new documentation as needed
Original commit by Tawsif Kamal: fix: additional tools won't duplicate (codegen-sh#928) additional_tools stay just will be overriden by duplicate tools passed in from additional_tools
Original commit by renovate[bot]: chore(deps): update astral-sh/setup-uv action to v5.4 (codegen-sh#938) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [astral-sh/setup-uv](https://redirect.github.com/astral-sh/setup-uv) | action | minor | `v5.3` -> `v5.4` | --- ### Release Notes <details> <summary>astral-sh/setup-uv (astral-sh/setup-uv)</summary> ### [`v5.4`](https://redirect.github.com/astral-sh/setup-uv/compare/v5.3...v5.4) [Compare Source](https://redirect.github.com/astral-sh/setup-uv/compare/v5.3...v5.4) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - "* 0-3 * * 1" (UTC). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/codegen-sh/codegen). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIwNy4xIiwidGFyZ2V0QnJhbmNoIjoiZGV2ZWxvcCIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Original commit by Edward Li: feat: Add `setup_commands` to `repo_config` (codegen-sh#1050)
Original commit by Christine Wang: fix: add `get_issue_safe` to repo client (codegen-sh#816)
Original commit by Carol Jung: fix: CG-17050: skip codebase init if repo operator is none (codegen-sh#999) # Motivation <!-- Why is this change necessary? --> # Content <!-- Please include a summary of the change --> # Testing <!-- How was the change tested? --> # Please check the following before marking your PR as ready for review - [ ] I have added tests for my changes - [ ] I have updated the documentation or added new documentation as needed
Original commit by Christine Wang: fix: add logs for git init failure (codegen-sh#1000)
Original commit by Carol Jung: feat: better logger stream allocation (codegen-sh#1006) # Motivation <!-- Why is this change necessary? --> # Content <!-- Please include a summary of the change --> # Testing <!-- How was the change tested? --> # Please check the following before marking your PR as ready for review - [ ] I have added tests for my changes - [ ] I have updated the documentation or added new documentation as needed
Original commit by Rushil Patel: feat: api client (codegen-sh#1027) # Motivation <!-- Why is this change necessary? --> # Content <!-- Please include a summary of the change --> # Testing <!-- How was the change tested? --> # Please check the following before marking your PR as ready for review - [ ] I have added tests for my changes - [ ] I have updated the documentation or added new documentation as needed --------- Co-authored-by: rushilpatel0 <171610820+rushilpatel0@users.noreply.github.com>
Original commit by Rushil Patel: fix: undefined field type (codegen-sh#1031) # Motivation <!-- Why is this change necessary? --> # Content <!-- Please include a summary of the change --> # Testing <!-- How was the change tested? --> # Please check the following before marking your PR as ready for review - [ ] I have added tests for my changes - [ ] I have updated the documentation or added new documentation as needed --------- Co-authored-by: rushilpatel0 <171610820+rushilpatel0@users.noreply.github.com>
Reviewer's GuideImplements a new analyzer module for locating and loading the Codegen SDK codebase by adding path-resolution functions and Codebase factory logic, updates the analyzers package to expose these utilities, and adds unit tests to validate base path discovery, subdirectory enumeration, and codebase instantiation. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
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 (
|
|
Hey! 👋 I see one of the checks failed. I am on it! 🫡 |
|
I've fixed the code style issues in the PR. The main problems were:
I've pushed a commit that addresses these issues, and the checks are now running. Let's wait to see if they pass. The changes I made:
I'll update you once the checks complete. |
|
The checks are still running on our fix. I've made the following changes to address the failing pre-commit checks:
These changes should address the failing pre-commit checks. The CI pipeline is currently running to verify our fixes. I'll update you once all checks have completed. 💻 View my work • React 👍 or 👎 |
|
Hey! 👋 I see one of the checks failed. I am on it! 🫡 |
|
I've fixed the failing checks in PR #101 by updating the type annotations in the
I've pushed these changes to the PR branch. The CI checks are currently running to verify the fixes. The changes were minimal but necessary to comply with the project's coding standards and type checking requirements. Let me know if you need any further adjustments to the PR! 💻 View my work • React 👍 or 👎 |
Description
This PR implements the missing
codegen_sdk_codebase.pymodule in thecodegen-on-oss/codegen_on_oss/analyzers/directory. The module provides functionality for accessing the Codegen SDK codebase for analysis.Changes Made
Created a new
codegen_sdk_codebase.pyfile in the analyzers directory with the following functions:get_codegen_sdk_base_path(): Determines the base path of the Codegen SDKget_codegen_sdk_subdirectories(): Returns a list of subdirectories containing the SDK codeget_codegen_sdk_codebase(): Creates a Codebase instance specifically for the SDKUpdated the
__init__.pyfile to expose the new module's functionsAdded comprehensive tests for the new module
Testing
Added unit tests to verify the functionality of the new module. The tests cover:
Resolves
Resolves ZAM-371
💻 View my work • About Codegen
Summary by Sourcery
Implement tooling to locate and analyze the Codegen SDK codebase and integrate it into the analyzers framework
New Features:
Enhancements:
Tests: