Skip to content

Implement modular helpers and Pydantic models for reviewer logic - #17

Merged
MalakHisham121 merged 2 commits into
SH-code12:AI/DLfrom
MalakHisham121:AI/DL
Jun 8, 2026
Merged

Implement modular helpers and Pydantic models for reviewer logic#17
MalakHisham121 merged 2 commits into
SH-code12:AI/DLfrom
MalakHisham121:AI/DL

Conversation

@MalakHisham121

Copy link
Copy Markdown
Collaborator

This pull request refactors the API and supporting code for the reviewer recommendation system to improve maintainability, modularity, and clarity. The main changes include extracting helper functions and data models into separate modules, updating API endpoints and request models for clarity, and making a minor model selection update for skill extraction.

Key changes:

Refactoring and Modularization:

  • Extracted all helper functions (e.g., engine builders, normalization, composite scoring, user profiling) from codience/src/app.py into a new codience/src/helpers.py module, significantly simplifying the main API file and improving code organization. [1] [2] [3] [4]
  • Moved all Pydantic request/response models out of codience/src/app.py into a new codience/src/models.py module, clarifying model definitions and reducing clutter in the API logic. [1] [2]

API Endpoint and Model Updates:

  • Changed the main reviewer recommendation endpoint from /api/recommend/v2 to /api/recommend-reviewers and updated the request model to RecommendReviewersRequest for more explicit naming and usage. [1] [2]

Reviewer Recommendation Logic:

  • Moved the composite recommendation logic (AI- and heuristic-based scoring) into helpers.py for easier testing and reuse, and clarified the scoring process. [1] [2]
  • Moved user profiling logic (GitHub and Jira data aggregation) into helpers.py, separating business logic from API routing. [1] [2]

Skill Extraction Model Update:

  • Changed the Ollama model used for skill extraction in batch_skill_extractor.py from "phi3:mini" to "qwen2.5:0.5b", likely for improved performance or accuracy.

These changes collectively make the codebase cleaner, more modular, and easier to extend or maintain.

@MalakHisham121
MalakHisham121 merged commit 5f69be6 into SH-code12:AI/DL Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant