feat: Change Expert Consultant entry type from alert to new property#518
Merged
afonsobspinto merged 7 commits intodevelopfrom Oct 10, 2025
Merged
feat: Change Expert Consultant entry type from alert to new property#518afonsobspinto merged 7 commits intodevelopfrom
afonsobspinto merged 7 commits intodevelopfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements a new Expert Consultant model to replace the existing alert-based system for storing expert consultant data. The change migrates from storing expert consultants as alerts to a proper relational model with full CRUD API support.
- Adds a new
ExpertConsultantmodel with database migrations and admin interface - Provides a Django management command to migrate existing alert data to the new model
- Updates the frontend to display and manage expert consultants similarly to provenances
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| openapi.yaml | Adds API endpoints for expert consultant CRUD operations |
| JsonSchema.ts | Adds schema support for expert consultant forms |
| ExpertConsultantService.tsx | New service for managing expert consultant API calls |
| uriValidation.ts | Extracts shared URI validation logic for reuse |
| ProvenanceForm.tsx | Refactored to use shared URI validation |
| ExpertConsultantForm.tsx | New form component for expert consultant management |
| DistillationTab.tsx | Integrates expert consultant form into the UI |
| api.ts | Generated API client updates for new endpoints |
| csv.py | Adds expert consultant export functionality |
| neurondm_script.py | Updates ingestion to handle expert consultants |
| statement_helper.py | Adds expert consultant processing logic |
| common_helpers.py | Adds expert consultant constant |
| changes_detector.py | Adds change detection for expert consultants |
| models.py | Adds ExpertConsultant model and refactors URI validation |
| 0092_expertconsultant.py | Database migration for new model |
| migrate_expert_consultants.py | Command to migrate alert data to new model |
| views.py | Adds expert consultant API views and fixes URL patterns |
| serializers.py | Adds expert consultant serializers |
| admin.py | Adds expert consultant inline to connectivity statements |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
applications/composer/backend/composer/services/cs_ingestion/neurondm_script.py
Show resolved
Hide resolved
applications/composer/backend/composer/management/commands/migrate_expert_consultants.py
Outdated
Show resolved
Hide resolved
…rate_expert_consultants.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Closes https://metacell.atlassian.net/browse/SCKAN-439
needs to be manually run when deployed:
Updates ingestion to ingest into the new property
Updates export to export the new property (exported csv)
Misc: