Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2730 +/- ##
==========================================
- Coverage 85.46% 85.25% -0.21%
==========================================
Files 447 447
Lines 38406 38431 +25
==========================================
- Hits 32823 32764 -59
- Misses 5583 5667 +84
🚀 New features to boost your workflow:
|
8d00955 to
247f845
Compare
| assert len(folder.insights) == 11 | ||
| assert {Recommendation, ConsistencyError} == set(folder.insights.by_type().keys()) | ||
| assert set(folder.insights.by_code().keys()) == { | ||
| "TOOLKIT-WORKFLOW-001", | ||
| "DUMMY_MODEL_RULE", | ||
| "NEAT-DMS-AI-READINESS-001", | ||
| "NEAT-DMS-AI-READINESS-002", | ||
| "NEAT-DMS-AI-READINESS-003", | ||
| "NEAT-DMS-AI-READINESS-004", | ||
| "NEAT-DMS-AI-READINESS-005", | ||
| "NEAT-DMS-AI-READINESS-006", | ||
| "NEAT-DMS-CONTAINER-001", | ||
| "NEAT-DMS-VIEW-001", | ||
| "MISSING-DEPENDENCY", | ||
| } |
There was a problem hiding this comment.
The current implementation of build v2 mutates insights objects. I am temporarily removing this check to reevaluate how insights are persistent in the new build command.
| assert len(folder.insights) == 1 | ||
| assert isinstance(folder.insights[0], ModelSyntaxError) |
| insights: InsightList = Field(default_factory=InsightList) | ||
|
|
||
| @cached_property | ||
| def dependencies(self) -> set[tuple[type[ResourceCRUD], Identifier]]: |
There was a problem hiding this comment.
Move dependencies down to the resource. This is to keep track of exactly which resource that has this dependency.
|
|
||
| # get crud for the given resource to be able to get dependencies | ||
| kind = resource.resource_type.kind | ||
| folder_name = resource.resource_type.resource_folder | ||
| crud = RESOURCE_CRUD_BY_FOLDER_NAME_BY_KIND[folder_name][kind] | ||
|
|
||
| dependencies[resource.source_path] = set(crud.get_dependencies(resource.resource)) | ||
|
|
There was a problem hiding this comment.
Here we lose information about which resource have a given dependency, thus I moved it down.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the module export logic in the build process. The changes simplify the _build_modules function by moving logic into a refactored _export_module function and introducing new data classes like BuiltResource and ModuleId.
However, the refactoring appears to be incomplete and has introduced a couple of critical issues. The new _export_module implementation has lost some of the original logic, leading to built resources, dependencies, and insights not being correctly populated in the BuiltModule object. Additionally, a change in the BuiltModule data class breaks properties that determine the build success status, which will cause builds to be incorrectly reported as failed. The test files have been updated to remove assertions that would have caught these issues, which is not a good practice.
I've added detailed comments with suggestions to fix these critical bugs.
Description
Please describe the change you have made.
Bump