-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add new mutant validation rule (#4075)
## Description Closes Clinical-Genomics/improve-order-flow#102 Fixes the sample name validation rule for Mutant orders to exclude control samples from the name check ### Added - Validation function `validate_non_control_sample_names_available` that verifies that sample names used in an order are not in the store excluding control samples - Utils function `get_sample_name_not_available_errors` used in new validation function - Mutant order fixture - aliases to group samples with organism and samples orders with control samples - tests for new validation functions ### Changed - Refactored validation function `validate_sample_names_available` to use the new utils function ### Fixed - Changed some balsamic structure in the order validation service - Reverted some deletions in json order fixtures from previous prs
- Loading branch information
Showing
19 changed files
with
238 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
12 changes: 11 additions & 1 deletion
12
cg/services/order_validation_service/models/order_aliases.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,17 @@ | ||
from cg.services.order_validation_service.workflows.fluffy.models.order import FluffyOrder | ||
from cg.services.order_validation_service.workflows.metagenome.models.sample import MetagenomeSample | ||
from cg.services.order_validation_service.workflows.microbial_fastq.models.order import ( | ||
MicrobialFastqOrder, | ||
) | ||
from cg.services.order_validation_service.workflows.microsalt.models.order import MicrosaltOrder | ||
from cg.services.order_validation_service.workflows.mutant.models.order import MutantOrder | ||
from cg.services.order_validation_service.workflows.rml.models.order import RmlOrder | ||
from cg.services.order_validation_service.workflows.taxprofiler.models.sample import ( | ||
TaxprofilerSample, | ||
) | ||
|
||
OrderWithIndexedSamples = FluffyOrder | RmlOrder | ||
OrderWithNonHumanSamples = MutantOrder | MicrosaltOrder | ||
OrderWithSamplesFromOrganism = MutantOrder | MicrosaltOrder | ||
OrderWithControlSamples = ( | ||
MetagenomeSample | MicrobialFastqOrder | MicrosaltOrder | MutantOrder | TaxprofilerSample | ||
) |
This file contains 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
This file contains 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
This file contains 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
2 changes: 1 addition & 1 deletion
2
...flows/balsamic/rules/case_sample/rules.py → ...ation_service/workflows/balsamic/rules.py
This file contains 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
File renamed without changes.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Empty file.
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.