Portfolio Project Evaluation & Similarity Suggestion#3
Open
shiroginne wants to merge 21 commits intomainfrom
Open
Portfolio Project Evaluation & Similarity Suggestion#3shiroginne wants to merge 21 commits intomainfrom
shiroginne wants to merge 21 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new API endpoint /evaluate-projects-similarities that evaluates and suggests suitable sub-projects for portfolio projects using LLM-powered analysis. The implementation includes comprehensive project traversal, custom field extraction, and robust LLM response parsing to provide scored recommendations with explanations.
- Adds new suggestion pipeline with LLM integration for project portfolio analysis
- Implements project hierarchy traversal with pagination support for OpenProject API
- Updates import paths from
src.models.schemastosrc.api.schemasacross multiple files
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/api/schemas.py | New schema definitions for suggestion requests/responses and consolidated API schemas |
| src/pipelines/suggestion.py | Core suggestion pipeline with project traversal, LLM scoring, and response parsing logic |
| src/api/routes.py | New endpoint implementation for project similarity evaluation |
| src/services/openproject_client.py | Added project list fetching with pagination and import path updates |
| config/settings.py | Added OpenProject configuration settings and updated default model |
| src/templates/report_templates.py | Updated import path for WorkPackage schema |
| src/pipelines/generation.py | Updated import path for schema classes |
src/pipelines/suggestion.py
Outdated
|
|
||
| @dataclass | ||
| class Candidate: | ||
| project_id: Any |
There was a problem hiding this comment.
Using 'Any' type for project_id is too permissive. Consider using Union[str, int] to be more specific about expected types.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a new API endpoint
/evaluate-projects-similaritiesthat evaluates and suggests the most suitable sub-projects for a given portfolio project.Main Functionality
New Endpoint:
/evaluate-projects-similaritiesOpenProjectURL and API_KEYUsage
Send a POST request to
/evaluate-projects-similaritieswith a valid portfolio project ID to receive a list of the best-matching sub-projects and their suitability scores:{ "project": { "id": 4, "type": "portfolio" }, "openproject": { "base_url": "<your_url>", "user_token": "<your_api_key>" } }