Skip to content

Comments

feat: Change Expert Consultant entry type from alert to new property#518

Merged
afonsobspinto merged 7 commits intodevelopfrom
feature/SCKAN-439
Oct 10, 2025
Merged

feat: Change Expert Consultant entry type from alert to new property#518
afonsobspinto merged 7 commits intodevelopfrom
feature/SCKAN-439

Conversation

@afonsobspinto
Copy link
Member

@afonsobspinto afonsobspinto commented Oct 10, 2025

Closes https://metacell.atlassian.net/browse/SCKAN-439

  • Adds a new expert consultant model, serializer and views.
  • Adds the new model as an inline of Connectivity Statements in django admin
  • Updates connectivity statement view to include the new property
  • Updates frontend to show the new property similarly to the Provenance
  • Adds a new django command to migrate the existent alerts to the new property (and remove the alert)

needs to be manually run when deployed:

python manage.py migrate_expert_consultants

  • Updates ingestion to ingest into the new property

  • Updates export to export the new property (exported csv)

image image image image image

Misc:

  • Fixes backend bootstrap warning by replacing regular string with raw strings for url_path params

@afonsobspinto afonsobspinto requested a review from Copilot October 10, 2025 18:23
Copy link
Contributor

Copilot AI left a 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 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 ExpertConsultant model 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.

afonsobspinto and others added 2 commits October 10, 2025 19:32
…rate_expert_consultants.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@afonsobspinto afonsobspinto marked this pull request as ready for review October 10, 2025 18:39
@afonsobspinto afonsobspinto merged commit f74fed3 into develop Oct 10, 2025
1 check passed
@ddelpiano ddelpiano deleted the feature/SCKAN-439 branch November 14, 2025 10:56
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