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. |
| cdf_project = config.environment.project | ||
| validation_type = config.environment.validation_type | ||
|
|
||
| # Todo optimize by only searching for yaml files in the selected modules paths if selection is provided. |
There was a problem hiding this comment.
We do not want to do this. Instead, we should find all yaml files so we can give proper error output. It is a trade-off between performance and useability, and then we should side with useability.
| ... | ||
|
|
||
|
|
||
| class ConsistencyWarning(Insight): |
☂️ Python Coverage
Overall Coverage
New Files
Modified Files
|
| def resource_by_type_by_kind(self) -> dict[ResourceType, list[Path]]: | ||
| """Organizes built files by their resource type and kind.""" | ||
| resource_by_type: dict[ResourceType, list[Path]] = defaultdict(list) | ||
| for resource in self.resources: |
There was a problem hiding this comment.
I avoid having logic on the DTO objects that are not used or only used in one location.
There was a problem hiding this comment.
Moved to the NeatRule
| dependency_insights = self._dependency_validation(built_modules, client) | ||
|
|
||
| global_insights = self._global_validation(built_modules, client) | ||
| plan = self._create_validation_plan(built_modules, client) | ||
| if parameters.verbose: | ||
| self._display_validation_plan(plan) | ||
| validation_results = self._run_validation(plan, console) |
There was a problem hiding this comment.
This is the main change, instead of having one function for each validation (dependency, neat (only called in global validation). Standardize them into a ToolkitGlobalRulSet. Then, use the create plan, display, and run validation.
| BASE_CODE = "AUTH" | ||
|
|
||
|
|
||
| class CheckDataSetMissing(ToolkitLocalRule): |
There was a problem hiding this comment.
Moved from the specialist rule only applied to Workflow. This applies to all resources that have a data set.
There was a problem hiding this comment.
No need to keep this :)
There was a problem hiding this comment.
Combining the previous neat plugin with the logic to execute it that was in the build v2 function.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the validation logic in the build process by introducing a new validation plan system and replacing the previous RulesOrchestrator with LocalRulesOrchestrator and NeatRules. It also updates data classes to support these changes, including the addition of ValidationResult and FailedValidation models. A critical bug was identified in the validation loop where the status check incorrectly compared a RuleSetStatus object to a string instead of checking its code attribute.
|
|
||
| results: list[ViewResponse] = [] | ||
| # The API does not support mixing ViewId and ViewNoVersionId in the same request. | ||
| if view_ids: |
There was a problem hiding this comment.
This is an random issue I found
Description
Reorganization of the validation to match the data structures we now use.
In progress
Completed
Bump