feat(engine-models): Add pydantic models for custom grammar detection engine - #662
Conversation
|
Connected to Huly®: UNOPL-799 |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||
… engine This commit introduces a set of Pydantic models for the custom grammar detection engine. The key changes are: - Defines enums for `TargetLevel`, `LocatorStrategy`, and `Concept` to represent the various concepts used in the refactored engine. - Introduces the `ConstructQueryConfig` model to represent the language-specific configuration for constructing the concept queries. - Defines the `FeatureSpec` model to represent the strongly-typed feature specification from the schema. - Adds the `Detection` and `DetectionResult` models to represent the results of feature detection in source code. - Introduces specialized detection information models for `AnnotationLikeInfo`, `CallExpressionInfo`, and `InheritanceInfo`. These models provide a structured and type-safe way to work with the custom grammar detection engine, improving maintainability and robustness of the codebase.
This change introduces a new method `sync_frameworks_for_codebase` that handles the synchronization of framework nodes based on package dependencies. The key changes are: - The framework sync logic is moved outside of the main package metadata ingestion transaction to prevent "got Future attached to a different loop" errors in CI environments. - PostgreSQL queries and Neo4j operations are kept in separate contexts to avoid event loop conflicts. - The method first checks for known frameworks in Postgres, then creates the necessary framework nodes and relationships in Neo4j. - The version of the `code-confluence-flow-bridge` package is bumped to 0.41.0 to reflect this change.
86aedef to
070f25e
Compare
|
ok this has been a lesson. i had given access to agent to run commands of act (Tool we use to run github action locally) it added bind and removed all uncommitted changes of our experiment with pydantic ai agent all files gone revoking access for that command |
…c event loop of main class, moved to python 3.13 for better async per from 3.11
feat(engine-models): Add pydantic models for custom grammar detection engine
User description
This commit introduces a set of Pydantic models for the custom grammar
detection engine. The key changes are:
TargetLevel,LocatorStrategy, andConceptto represent the various concepts used in the refactored engine.ConstructQueryConfigmodel to represent the language-specific configuration for constructing the concept queries.FeatureSpecmodel to represent the strongly-typed feature specification from the schema.DetectionandDetectionResultmodels to represent the results of feature detection in source code.AnnotationLikeInfo,CallExpressionInfo, andInheritanceInfo.These models provide a structured and type-safe way to work with the custom grammar detection engine, improving maintainability and robustness of the codebase.
PR Type
Enhancement
Description
Add comprehensive Pydantic models for custom grammar detection engine
Introduce structural signature models for source code analysis
Add SQLModel framework metadata models with PostgreSQL support
Migrate build system from Poetry to uv/hatch
Diagram Walkthrough
File Walkthrough