-
Notifications
You must be signed in to change notification settings - Fork 1
Release/6.0.0 #526
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
base: main
Are you sure you want to change the base?
Release/6.0.0 #526
Conversation
Release/5.2.1 to develop
SCKAN-444 feat: Add new axiom to neurondm mapping
…rate_expert_consultants.py Co-authored-by: Copilot <[email protected]>
feat: Change Expert Consultant entry type from alert to new property
feat: Allow new relationships to be configured to utilize Anatomical Entity table
Release/5.2.3
feat: Ingest dynamic relationships created
fix: Forces https scheme on export url
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 implements version 6.0.0, a major release that introduces a redesigned dynamic relationship system for connectivity statements. The update splits the monolithic ConnectivityStatementTriple model into three specialized models (ConnectivityStatementTriple, ConnectivityStatementText, and ConnectivityStatementAnatomicalEntity) and adds support for custom ingestion code execution during the neurondm processing workflow.
Key Changes:
- Refactored dynamic relationships into type-specific models with dedicated serializers and API endpoints
- Implemented a three-step ingestion workflow with custom code execution support
- Added expert consultant functionality to track ORCID references separately from provenances
- Enhanced URI validation for provenances and expert consultants
Reviewed Changes
Copilot reviewed 68 out of 69 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| deployment/codefresh-dev.yaml | Updated CI/CD pipeline with new build stages, image cache support, and composer-neurondm task container |
| applications/composer/tasks/notify/notify.py | Extended notification system to support both export and ingestion workflows |
| applications/composer/tasks/neurondm/process_neurondm_standalone.py | New standalone script for neurondm processing without Django dependencies |
| applications/composer/tasks/neurondm/Dockerfile | New Dockerfile for lightweight neurondm task container |
| applications/composer/scripts/setup_cleanup_cron.sh | New script for setting up automated cleanup of old ingestion files |
| applications/composer/openapi/openapi.yaml | Updated API schema with new endpoints for text/anatomical relationships and expert consultants |
| applications/composer/nginx.conf | Fixed duplicate X-Forwarded-Proto header configuration |
| applications/composer/frontend/src/types/relationshipTypes.ts | New TypeScript types for relationship enums |
| applications/composer/frontend/src/services/StatementService.ts | Added service methods for text and anatomical entity relationships |
| applications/composer/frontend/src/services/JsonSchema.ts | Added expert consultants schema retrieval |
| applications/composer/frontend/src/services/ExpertConsultantService.tsx | New service for expert consultant CRUD operations |
| applications/composer/frontend/src/helpers/uriValidation.ts | Extracted URI validation logic into reusable utility functions |
| applications/composer/frontend/src/components/Widgets/CustomTextField.tsx | Added Enter key prevention for single-line text fields |
| applications/composer/frontend/src/components/Widgets/CustomEntitiesDropdown.tsx | Enhanced with configurable label positioning and styling |
| applications/composer/frontend/src/components/Forms/StatementForm.tsx | Major refactor to support new relationship types with dedicated widget configs |
| applications/composer/frontend/src/components/Forms/ProvenanceForm.tsx | Refactored to use shared URI validation utilities |
| applications/composer/frontend/src/components/Forms/ExpertConsultantForm.tsx | New form component for managing expert consultants |
| applications/composer/frontend/src/components/DistillationTab/DistillationTab.tsx | Added expert consultants form to distillation tab |
| applications/composer/frontend/package.json | Version bump to 6.0.0 |
| applications/composer/backend/version.py | Version bump to 6.0.0 |
| applications/composer/backend/tests/test_relationships.py | New test suite for relationship model validation |
| applications/composer/backend/tests/test_ingest_statements.py | Updated tests for new ingestion workflow and custom relationships |
| applications/composer/backend/test_serialization_standalone.py | New standalone test for NeuroDM serialization/deserialization |
| applications/composer/backend/requirements.txt | Updated django-filter version and removed django-silk |
| applications/composer/backend/composer/views.py | Added ingestion workflow trigger endpoint |
| applications/composer/backend/composer/urls.py | Added ingest-statements URL route |
| applications/composer/backend/composer/templates/admin/* | New admin templates for ingestion workflow and log downloads |
| applications/composer/backend/composer/services/workflows/* | New ingestion workflow modules with three-step processing |
| applications/composer/backend/composer/services/export/* | Updated export logic to handle new relationship models |
| applications/composer/backend/composer/services/errors_service.py | Updated import to use pure_enums |
| applications/composer/backend/composer/services/dynamic_schema_service.py | Updated to handle new relationship type names |
| applications/composer/backend/composer/services/cs_ingestion/* | Major refactor supporting custom code execution and split models |
| applications/composer/backend/composer/pure_enums.py | New Django-independent enum definitions |
| applications/composer/backend/composer/models.py | Split relationship models and added expert consultant model |
| applications/composer/backend/composer/migrations/* | New migrations for relationship refactoring and expert consultants |
| applications/composer/backend/composer/management/commands/* | New management commands for ingestion steps and cleanup |
| applications/composer/backend/composer/enums.py | Refactored to use pure_enums as source of truth |
| applications/composer/backend/composer/constants.py | New constants module for ingestion file paths |
| applications/composer/backend/composer/api/* | Updated API views and serializers for new relationship models |
| applications/composer/backend/composer/admin.py | Enhanced admin with relationship inline forms and custom code editor |
| applications/composer/backend/backend/urls.py | Removed django-silk URL configuration |
| applications/composer/backend/backend/settings.py | Removed django-silk and updated timezone |
Comments suppressed due to low confidence (1)
applications/composer/backend/composer/services/workflows/export.py:12
- The
schemeparameter is defined but never used in the function. This parameter should either be removed or utilized in constructing thefile_urlvariable.
def run_export_workflow(user: User, scheme: str = "https") -> None:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ASSIGN_POPULATION_SET = "assign_population_set" | ||
|
|
||
|
|
||
| class CircuitType(str, Enum): |
Copilot
AI
Oct 27, 2025
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.
[nitpick] The docstring states 'Django-independent' but this is a general Python enum. Consider clarifying that this enum can be used both with and without Django, or that it serves as the base for Django's TextChoices wrapper.
| predicate_name = models.CharField(max_length=255) | ||
| predicate_uri = models.URLField() | ||
| type = models.CharField(max_length=10, choices=RelationshipType.choices) | ||
| type = models.CharField(max_length=20, choices=RelationshipType.choices) |
Copilot
AI
Oct 27, 2025
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.
[nitpick] The max_length of 20 may be insufficient if future relationship type values exceed this length. Consider increasing to 50 or making it a configurable constant to avoid future migrations.
| type = models.CharField(max_length=20, choices=RelationshipType.choices) | |
| type = models.CharField(max_length=50, choices=RelationshipType.choices) |
| representation['anatomical_entities'] = AnatomicalEntitySerializer( | ||
| instance.anatomical_entities.all(), |
Copilot
AI
Oct 27, 2025
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.
The anatomical_entities.all() query is executed during serialization without prefetch_related. While the ViewSet includes prefetch_related('anatomical_entities'), ensure this is consistently applied across all code paths that serialize this model to avoid N+1 queries.
| representation['anatomical_entities'] = AnatomicalEntitySerializer( | |
| instance.anatomical_entities.all(), | |
| # Use prefetched data if available to avoid N+1 queries | |
| anatomical_entities = getattr(instance, '_prefetched_objects_cache', {}).get('anatomical_entities') | |
| if anatomical_entities is None: | |
| anatomical_entities = instance.anatomical_entities.all() | |
| representation['anatomical_entities'] = AnatomicalEntitySerializer( | |
| anatomical_entities, |
fix: any ConnectivityStatementTriple where triple is NULL
SCKAN-449 feat: Add region layer support for custom code relationships
No description provided.