diff --git a/eva_sub_cli/etc/eva_schema.json b/eva_sub_cli/etc/eva_schema.json index 4e28906..f1e9ebf 100644 --- a/eva_sub_cli/etc/eva_schema.json +++ b/eva_sub_cli/etc/eva_schema.json @@ -89,12 +89,14 @@ "title": { "type": "string", "description": "Title of the project", - "maxLength": 500 + "minLength": 20, + "maxLength": 250 }, "description": { "type": "string", "description": "Description of the project", - "maxLength": 5000 + "minLength": 20, + "maxLength": 4000 }, "centre": { "type": "string", diff --git a/tests/resources/EVA_Submission_test.json b/tests/resources/EVA_Submission_test.json index 1e4696b..9100dce 100644 --- a/tests/resources/EVA_Submission_test.json +++ b/tests/resources/EVA_Submission_test.json @@ -18,7 +18,7 @@ } ], "project": { - "title": "Example Project", + "title": "Example Project Title", "description": "An example project for demonstration purposes", "centre": "University of Example", "taxId": 9606, diff --git a/tests/resources/EVA_Submission_test.xlsx b/tests/resources/EVA_Submission_test.xlsx index 6beb107..11cf881 100644 Binary files a/tests/resources/EVA_Submission_test.xlsx and b/tests/resources/EVA_Submission_test.xlsx differ diff --git a/tests/resources/EVA_Submission_test_V2.xlsx b/tests/resources/EVA_Submission_test_V2.xlsx index c84d4ee..f365105 100644 Binary files a/tests/resources/EVA_Submission_test_V2.xlsx and b/tests/resources/EVA_Submission_test_V2.xlsx differ diff --git a/tests/resources/EVA_Submission_test_fails.xlsx b/tests/resources/EVA_Submission_test_fails.xlsx index cfcf03b..21a81a0 100644 Binary files a/tests/resources/EVA_Submission_test_fails.xlsx and b/tests/resources/EVA_Submission_test_fails.xlsx differ diff --git a/tests/resources/EVA_Submission_test_with_asm_report.json b/tests/resources/EVA_Submission_test_with_asm_report.json index 5c3ede3..d1e962a 100644 --- a/tests/resources/EVA_Submission_test_with_asm_report.json +++ b/tests/resources/EVA_Submission_test_with_asm_report.json @@ -20,7 +20,7 @@ } ], "project": { - "title": "Example Project", + "title": "Example Project Title", "projectAlias": "EP", "description": "An example project for demonstration purposes", "centre": "University of Example", diff --git a/tests/resources/EVA_Submission_test_with_links.xlsx b/tests/resources/EVA_Submission_test_with_links.xlsx index b0eeb52..f1b2eb4 100644 Binary files a/tests/resources/EVA_Submission_test_with_links.xlsx and b/tests/resources/EVA_Submission_test_with_links.xlsx differ diff --git a/tests/resources/EVA_Submission_test_with_non_vcf_files.json b/tests/resources/EVA_Submission_test_with_non_vcf_files.json index 7a1240d..efa201e 100644 --- a/tests/resources/EVA_Submission_test_with_non_vcf_files.json +++ b/tests/resources/EVA_Submission_test_with_non_vcf_files.json @@ -18,7 +18,7 @@ } ], "project": { - "title": "Example Project", + "title": "Example Project Title", "description": "An example project for demonstration purposes", "centre": "University of Example", "taxId": 9606, diff --git a/tests/resources/EVA_Submission_test_with_non_vcf_files.xlsx b/tests/resources/EVA_Submission_test_with_non_vcf_files.xlsx index 772d241..dbc7408 100644 Binary files a/tests/resources/EVA_Submission_test_with_non_vcf_files.xlsx and b/tests/resources/EVA_Submission_test_with_non_vcf_files.xlsx differ diff --git a/tests/resources/metadata_with_filename.json b/tests/resources/metadata_with_filename.json index 4cce7d8..01990a4 100644 --- a/tests/resources/metadata_with_filename.json +++ b/tests/resources/metadata_with_filename.json @@ -1,7 +1,7 @@ { "submitterDetails": [], "project": { - "title": "Example Project", + "title": "Example Project Title", "description": "An example project for demonstration purposes", "centre": "University of Example", "taxId": 9606, diff --git a/tests/resources/validation_reports/expected_metadata_json_report.txt b/tests/resources/validation_reports/expected_metadata_json_report.txt index 896d99d..0a5de1f 100644 --- a/tests/resources/validation_reports/expected_metadata_json_report.txt +++ b/tests/resources/validation_reports/expected_metadata_json_report.txt @@ -72,7 +72,7 @@ For requirements, please refer to the EVA website (https://www.ebi.ac.uk/eva/?Su VCF VALIDATION RESULTS Checks whether each file is compliant with the VCF specification (http://samtools.github.io/hts-specs/VCFv4.4.pdf). Also checks whether the variants' reference alleles match against the reference assembly. -ASSEMBLY CHECK RESULTS + ASSEMBLY CHECK ❌ input_fail.vcf: 26/36 (72.22%) First 10 errors per category are below. Full report: /path/to/assembly_failed/report Parsing error: The assembly checking could not be completed: Contig 'chr23' not found in assembly report @@ -86,7 +86,7 @@ ASSEMBLY CHECK RESULTS Mismatch error: Chromosome 1, position 35819, reference allele 'T' does not match the reference sequence, expected 'a' Mismatch error: Chromosome 1, position 35822, reference allele 'T' does not match the reference sequence, expected 'c' ✔ input_passed.vcf: 247/247 (100.0%) -VCF VALIDATION RESULTS + VCF CHECK ❌ input_fail.vcf: 1 critical errors, 1 non-critical errors First 10 errors per category are below. Full report: /path/to/vcf_failed/report Critical error: Line 4: Error in meta-data section. diff --git a/tests/resources/validation_reports/expected_metadata_xlsx_report.txt b/tests/resources/validation_reports/expected_metadata_xlsx_report.txt index bb04f4d..e21dbab 100644 --- a/tests/resources/validation_reports/expected_metadata_xlsx_report.txt +++ b/tests/resources/validation_reports/expected_metadata_xlsx_report.txt @@ -66,7 +66,7 @@ For requirements, please refer to the EVA website (https://www.ebi.ac.uk/eva/?Su VCF VALIDATION RESULTS Checks whether each file is compliant with the VCF specification (http://samtools.github.io/hts-specs/VCFv4.4.pdf). Also checks whether the variants' reference alleles match against the reference assembly. -ASSEMBLY CHECK RESULTS + ASSEMBLY CHECK ❌ input_fail.vcf: 26/36 (72.22%) First 10 errors per category are below. Full report: /path/to/assembly_failed/report Parsing error: The assembly checking could not be completed: Contig 'chr23' not found in assembly report @@ -80,7 +80,7 @@ ASSEMBLY CHECK RESULTS Mismatch error: Chromosome 1, position 35819, reference allele 'T' does not match the reference sequence, expected 'a' Mismatch error: Chromosome 1, position 35822, reference allele 'T' does not match the reference sequence, expected 'c' ✔ input_passed.vcf: 247/247 (100.0%) -VCF VALIDATION RESULTS + VCF CHECK ❌ input_fail.vcf: 1 critical errors, 1 non-critical errors First 10 errors per category are below. Full report: /path/to/vcf_failed/report Critical error: Line 4: Error in meta-data section. diff --git a/tests/resources/validation_reports/expected_report_metadata_json_crashed.txt b/tests/resources/validation_reports/expected_report_metadata_json_crashed.txt index 638b338..8adfa86 100644 --- a/tests/resources/validation_reports/expected_report_metadata_json_crashed.txt +++ b/tests/resources/validation_reports/expected_report_metadata_json_crashed.txt @@ -32,9 +32,9 @@ For requirements, please refer to the EVA website (https://www.ebi.ac.uk/eva/?Su VCF VALIDATION RESULTS Checks whether each file is compliant with the VCF specification (http://samtools.github.io/hts-specs/VCFv4.4.pdf). Also checks whether the variants' reference alleles match against the reference assembly. -ASSEMBLY CHECK RESULTS + ASSEMBLY CHECK ❗ Assembly check did not complete successfully. Check the logs for more information. -VCF VALIDATION RESULTS + VCF CHECK ❗ VCF check did not complete successfully. Check the logs for more information. - SAMPLE NAME CONCORDANCE CHECK diff --git a/tests/resources/validation_reports/expected_report_metadata_json_process_not_run.txt b/tests/resources/validation_reports/expected_report_metadata_json_process_not_run.txt index d468bde..008a09f 100644 --- a/tests/resources/validation_reports/expected_report_metadata_json_process_not_run.txt +++ b/tests/resources/validation_reports/expected_report_metadata_json_process_not_run.txt @@ -32,9 +32,9 @@ For requirements, please refer to the EVA website (https://www.ebi.ac.uk/eva/?Su VCF VALIDATION RESULTS Checks whether each file is compliant with the VCF specification (http://samtools.github.io/hts-specs/VCFv4.4.pdf). Also checks whether the variants' reference alleles match against the reference assembly. -ASSEMBLY CHECK RESULTS + ASSEMBLY CHECK ⏸ Process not run yet -VCF VALIDATION RESULTS + VCF CHECK ⏸ Process not run yet - SAMPLE NAME CONCORDANCE CHECK diff --git a/tests/resources/validation_reports/expected_shallow_metadata_xlsx_report.txt b/tests/resources/validation_reports/expected_shallow_metadata_xlsx_report.txt index 62aa7c4..90c835a 100644 --- a/tests/resources/validation_reports/expected_shallow_metadata_xlsx_report.txt +++ b/tests/resources/validation_reports/expected_shallow_metadata_xlsx_report.txt @@ -75,7 +75,7 @@ For requirements, please refer to the EVA website (https://www.ebi.ac.uk/eva/?Su VCF VALIDATION RESULTS Checks whether each file is compliant with the VCF specification (http://samtools.github.io/hts-specs/VCFv4.4.pdf). Also checks whether the variants' reference alleles match against the reference assembly. -ASSEMBLY CHECK RESULTS + ASSEMBLY CHECK ❌ input_fail.vcf: 26/36 (72.22%) First 10 errors per category are below. Full report: /path/to/assembly_failed/report Parsing error: The assembly checking could not be completed: Contig 'chr23' not found in assembly report @@ -89,7 +89,7 @@ ASSEMBLY CHECK RESULTS Mismatch error: Chromosome 1, position 35819, reference allele 'T' does not match the reference sequence, expected 'a' Mismatch error: Chromosome 1, position 35822, reference allele 'T' does not match the reference sequence, expected 'c' ✔ input_passed.vcf: 247/247 (100.0%) -VCF VALIDATION RESULTS + VCF CHECK ❌ input_fail.vcf: 1 critical errors, 1 non-critical errors First 10 errors per category are below. Full report: /path/to/vcf_failed/report Critical error: Line 4: Error in meta-data section. diff --git a/tests/resources/validation_reports/validation_output/other_validations/metadata_validation.txt b/tests/resources/validation_reports/validation_output/other_validations/metadata_validation.txt index 88916c4..7d18c51 100644 --- a/tests/resources/validation_reports/validation_output/other_validations/metadata_validation.txt +++ b/tests/resources/validation_reports/validation_output/other_validations/metadata_validation.txt @@ -13,7 +13,7 @@ /project/title should have required property 'title' /project/description - must NOT have more than 5000 characters + must NOT have more than 4000 characters /project/taxId must have required property 'taxId' /project/holdDate diff --git a/tests/test_orchestrator.py b/tests/test_orchestrator.py index a22d4a0..027b2dc 100644 --- a/tests/test_orchestrator.py +++ b/tests/test_orchestrator.py @@ -25,7 +25,7 @@ class TestOrchestrator(unittest.TestCase): - project_title = 'Example Project' + project_title = 'Example Project Title' resource_dir = os.path.join(os.path.dirname(__file__), 'resources') test_sub_dir = os.path.join(resource_dir, 'test_sub_dir') config_file = os.path.join(test_sub_dir, SUB_CLI_CONFIG_FILE) @@ -97,7 +97,7 @@ def test_remove_non_vcf_files_from_metadata_xlsx(self): def test_get_project_title_and_create_vcf_files_mapping(self): project_title, mapping_file = get_project_title_and_create_vcf_files_mapping( self.test_sub_dir, self.metadata_json_with_non_vcf_files, None, None) - assert project_title == 'Example Project' + assert project_title == 'Example Project Title' with open(mapping_file, 'r') as f: reader = csv.reader(f) next(reader) diff --git a/tests/test_validator.py b/tests/test_validator.py index f818bfc..8b3875b 100644 --- a/tests/test_validator.py +++ b/tests/test_validator.py @@ -58,7 +58,7 @@ 'json_errors': [ {'property': '/files', 'description': "should have required property 'files'"}, {'property': '/project/title', 'description': "should have required property 'title'"}, - {'property': '/project/description', 'description': 'must NOT have more than 5000 characters'}, + {'property': '/project/description', 'description': 'must NOT have more than 4000 characters'}, {'property': '/project/taxId', 'description': "must have required property 'taxId'"}, {'property': '/project/holdDate', 'description': 'must match format "date"'}, {'property': '/analysis/0/description', @@ -469,7 +469,7 @@ def test__collect_validation_workflow_results_with_metadata_xlsx(self): {'sheet': 'Project', 'row': 3, 'column': 'Project Title', 'description': 'Column "Project Title" is not populated'}, {'sheet': 'Project', 'row': 3, 'column': 'Description', - 'description': 'must NOT have more than 5000 characters'}, + 'description': 'must NOT have more than 4000 characters'}, {'sheet': 'Project', 'row': 3, 'column': 'Taxonomy ID', 'description': 'Column "Taxonomy ID" is not populated'}, {'sheet': 'Project', 'row': 3, 'column': 'Hold Date', @@ -509,7 +509,7 @@ def test_parse_biovalidator_validation_results(self): assert self.validator.results['metadata_check']['json_errors'] == [ {'property': '/files', 'description': "should have required property 'files'"}, {'property': '/project/title', 'description': "should have required property 'title'"}, - {'property': '/project/description', 'description': 'must NOT have more than 5000 characters'}, + {'property': '/project/description', 'description': 'must NOT have more than 4000 characters'}, {'property': '/project/taxId', 'description': "must have required property 'taxId'"}, {'property': '/project/holdDate', 'description': 'must match format "date"'}, {'property': '/analysis/0/description', 'description': "should have required property 'description'"}, diff --git a/tests/test_xlsx2json.py b/tests/test_xlsx2json.py index 9e51c62..49f4d63 100644 --- a/tests/test_xlsx2json.py +++ b/tests/test_xlsx2json.py @@ -225,7 +225,7 @@ def get_expected_json(self): } ], "project": { - "title": "Example Project", + "title": "Example Project Title", "description": "An example project for demonstration purposes", "centre": "University of Example", "taxId": 9606,