-
Notifications
You must be signed in to change notification settings - Fork 461
feat: Update model endpoints + skeleton for model labels #4744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the model endpoints to include project ID as a required parameter and introduces a skeleton for a model labels endpoint. The changes refactor the model service to work within project contexts rather than globally.
- Updates all model endpoints to require project ID and validates project existence
- Adds a new skeleton endpoint for retrieving model labels
- Refactors model service methods to accept project ID parameter
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
backend/app/api/endpoints/models.py | Updates endpoints to include project ID in URLs and adds model labels skeleton endpoint |
backend/app/services/model_service.py | Refactors service methods to accept project ID and validate project existence |
backend/app/repositories/base.py | Adds exists() method for checking entity existence |
backend/app/db/schema.py | Adds model_revisions relationship to ProjectDB |
backend/app/repositories/label_repo.py | Changes constructor parameter order for consistency |
backend/app/services/label_service.py | Updates LabelRepository instantiation to match new constructor |
backend/tests/unit/endpoints/test_models.py | Updates tests to include project ID in API calls |
backend/tests/integration/services/test_model_service.py | Updates integration tests for new service method signatures |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Docker Image Sizes
|
📊 Test coverage report
|
4ee9a66
to
2a81249
Compare
583e61f
to
9166d22
Compare
Summary
This PR updates the existing model endpoints to include the project ID. Additionally, it introduces a skeleton for the model labels snapshot endpoint.
Note:
This PR should be merged after #4672 and the base branch should be updated to develop before merging.
How to test
./run.sh
Checklist
License
Feel free to contact the maintainers if that's a concern.