From a68c7f882bfd6e1de11af7323cc096cc6e1821c2 Mon Sep 17 00:00:00 2001 From: Mathias Walzer Date: Tue, 19 Mar 2024 03:36:45 +0000 Subject: [PATCH 1/6] Update tests.yml --- .github/workflows/tests.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 30b2cd48..51c09045 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,12 +1,15 @@ # This workflow will validate the mzQC example files against the JSON schema. name: tests - +env: + # folder path only; file name and extension wild cards get added in-use + PATH_TO_EXAMPLES: ./specification_documents/examples + on: push: - branches: [ main ] + branches: [ main, ci_test_validate ] pull_request: - branches: [ main ] + branches: [ main, ci_test_validate ] schedule: - cron: "0 0 1 1/1 *" # Run monthly. @@ -26,7 +29,7 @@ jobs: pip install jsonschema - name: Validate mzQC files run: | - for i in ./specification_documents/draft_v1/examples/*.mz[qQ][cC]; do + for i in $PATH_TO_EXAMPLES/*.mz[qQ][cC]; do echo "Syntactic validating of $i" jsonschema -i $i ./schema/mzqc_schema.json if [ $? -ne 0 ]; then From 1b6d7d799f68bdefdf3c31cb1770b6430d824327 Mon Sep 17 00:00:00 2001 From: Mathias Walzer Date: Tue, 19 Mar 2024 04:52:35 +0000 Subject: [PATCH 2/6] Update tests.yml deprecation warning switch to check-jsonschema --- .github/workflows/tests.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 51c09045..8a84ce86 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,12 +26,13 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install jsonschema - - name: Validate mzQC files + pip install jsonschema check-jsonschema + - name: Syntactic Validatation of example mzQC files run: | for i in $PATH_TO_EXAMPLES/*.mz[qQ][cC]; do - echo "Syntactic validating of $i" - jsonschema -i $i ./schema/mzqc_schema.json + echo "Syntactic Validation of $i" + #jsonschema -i $i ./schema/mzqc_schema.json + check-jsonschema --schemafile schema.json $i if [ $? -ne 0 ]; then echo "Failed to validate $i" exit 1 From 3c2d22cec2d7fd28765daf060b08c1ab6f4d7207 Mon Sep 17 00:00:00 2001 From: Mathias Walzer Date: Tue, 19 Mar 2024 04:55:15 +0000 Subject: [PATCH 3/6] Update tests.yml correcting schema source --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8a84ce86..a70bd690 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,7 +32,7 @@ jobs: for i in $PATH_TO_EXAMPLES/*.mz[qQ][cC]; do echo "Syntactic Validation of $i" #jsonschema -i $i ./schema/mzqc_schema.json - check-jsonschema --schemafile schema.json $i + check-jsonschema --schemafile ./schema/mzqc_schema.json $i if [ $? -ne 0 ]; then echo "Failed to validate $i" exit 1 From 0ef322dc540700c29ea07ce28135e2f472bf9234 Mon Sep 17 00:00:00 2001 From: Mathias Walzer Date: Tue, 19 Mar 2024 05:35:37 +0000 Subject: [PATCH 4/6] Update tests.yml adding 1st try of offline validator use for semantic validation --- .github/workflows/tests.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a70bd690..9ee286f2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,12 +22,12 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.x' + python-version: '3.8' - name: Install dependencies run: | python -m pip install --upgrade pip - pip install jsonschema check-jsonschema - - name: Syntactic Validatation of example mzQC files + pip install jsonschema check-jsonschema pymzqc click + - name: Syntactic Validatation of Example mzQC Files run: | for i in $PATH_TO_EXAMPLES/*.mz[qQ][cC]; do echo "Syntactic Validation of $i" @@ -38,3 +38,13 @@ jobs: exit 1 fi done + - name: Semantic Validatation of Example mzQC Files + run: | + for i in $PATH_TO_EXAMPLES/*.mz[qQ][cC]; do + echo "Semantic Validation of $i" + mzqc_offline_validator.py $i + if [ $? -ne 0 ]; then + echo "Failed to validate $i" + exit 1 + fi + done From 119eeef42986926a5d6105f7966824a683d14461 Mon Sep 17 00:00:00 2001 From: Mathias Walzer Date: Tue, 19 Mar 2024 06:05:15 +0000 Subject: [PATCH 5/6] Update tests.yml testing mzQC-offline-validator CLI tool installation --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9ee286f2..7a8e4e36 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -42,7 +42,7 @@ jobs: run: | for i in $PATH_TO_EXAMPLES/*.mz[qQ][cC]; do echo "Semantic Validation of $i" - mzqc_offline_validator.py $i + mzQC-offline-validator $i if [ $? -ne 0 ]; then echo "Failed to validate $i" exit 1 From e2b41c04fb9c8f6819df5a30bc610ba2b7cd5ce1 Mon Sep 17 00:00:00 2001 From: Mathias Walzer Date: Mon, 22 Jul 2024 20:31:23 +0100 Subject: [PATCH 6/6] fix mzqc-validator installation still needs correct validation result evaluation --- .github/workflows/tests.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7a8e4e36..b83edef9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,11 +22,12 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: '3.8' + python-version: '3.10' - name: Install dependencies run: | python -m pip install --upgrade pip - pip install jsonschema check-jsonschema pymzqc click + pip install jsonschema check-jsonschema click + pip install -U git+https://github.com/MS-Quality-hub/pymzqc.git@v1.0.0rc3 - name: Syntactic Validatation of Example mzQC Files run: | for i in $PATH_TO_EXAMPLES/*.mz[qQ][cC]; do @@ -42,7 +43,7 @@ jobs: run: | for i in $PATH_TO_EXAMPLES/*.mz[qQ][cC]; do echo "Semantic Validation of $i" - mzQC-offline-validator $i + mzqc-validator $i if [ $? -ne 0 ]; then echo "Failed to validate $i" exit 1