Repository: music-encoding/music-encoding
Pull request #1620: utils: add schematron to precheck current source for "purification"
Author: login: bwbohl
Labels: name: Component: Core Schema
description: changes to source/modules/* (assigned automatically)
name: Component: Workflows
description: changes to GitHub Actions workflows  (assigned automatically)
name: Component: Build
description: changes to build.xml (assigned automatically)
name: Component: Validation
description: changes to source/validation/* (assigned automatically)
Created: 2025-02-06T15:18:44Z | Merged: 2025-04-24T12:28:55Z

prepare conversion to pureODD


Diff:
diff --git a/.github/problem_matchers/schematron-problem-matcher.json b/.github/problem_matchers/schematron-problem-matcher.json
new file mode 100644
index 000000000..e42f53114
--- /dev/null
+++ b/.github/problem_matchers/schematron-problem-matcher.json
@@ -0,0 +1,17 @@
+{
+    "problemMatcher": [
+        {
+            "name": "schematron",
+            "owner": "music-encoding",
+            "severity": "warning",
+            "pattern": [
+                {
+                    "regexp": "\\[schematron\\] \\[(warn|error)\\] in (.*?) @ (.*?\\.(xml|odd)) (.*?)$",
+                    "kind": "file",
+                    "file": 3,
+                    "message": 5
+                }
+            ]
+        }
+    ]
+}
diff --git a/.github/workflows/pr-validation.yml b/.github/workflows/pr-validation.yml
index f8de49fca..cb4d4d815 100644
--- a/.github/workflows/pr-validation.yml
+++ b/.github/workflows/pr-validation.yml
@@ -7,8 +7,12 @@ on:
 permissions:
   contents: read
 
+env:
+  BUILD_FILE: music-encoding/build.xml
+  DOCKER_IMAGE: ghcr.io/music-encoding/docker-mei:latest
+
 jobs:
-  validate:
+  validate-source:
     runs-on: ubuntu-latest
     
     permissions:
@@ -24,4 +28,25 @@ jobs:
         fetch-depth: 0
 
     - name: Run validation with Docker image on PR
-      run: docker run --rm -v $(pwd):/opt/docker-mei/music-encoding ghcr.io/music-encoding/docker-mei:latest ant validate-source -noinput -buildfile music-encoding/build.xml
+      run: docker run --rm -v $(pwd):/opt/docker-mei/music-encoding ${{ env.DOCKER_IMAGE }} ant validate-source -noinput -buildfile ${{ env.BUILD_FILE }}
+
+  validate-purification:
+    runs-on: ubuntu-latest
+    
+    permissions:
+      contents: read
+      pull-requests: read
+    
+    steps:
+    - name: Checkout head ref of repository (PR)
+      uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+      with:
+        repository: ${{github.event.pull_request.head.repo.full_name}}
+        ref: ${{github.event.pull_request.head.ref}}
+        fetch-depth: 0
+
+    - name: Register schematron problem matcher
+      run: echo "::add-matcher::.github/problem_matchers/schematron-problem-matcher.json"
+
+    - name: Run purification check with Docker image on PR
+      run: docker run --rm -v $(pwd):/opt/docker-mei/music-encoding ${{ env.DOCKER_IMAGE }} ant validate-purification -noinput -buildfile ${{ env.BUILD_FILE }}
diff --git a/build.xml b/build.xml
index 9e4841214..e03acca05 100644
--- a/build.xml
+++ b/build.xml
@@ -303,6 +303,18 @@
         <property name="validate-source.done" value="true"/>
         <echo>canonicalized source validated: ${validate-source.done}</echo>
     </target>
+    
+    <target name="validate-purification" depends="canonicalize-source" description="Validates the canonicalized source with mei-purify.sch. This target will be triggered before all `build-...` targets.">
+        <echo unless:set="validate-purification.done">validating purification of source...</echo>
+        <taskdef name="schematron" classname="com.helger.schematron.ant.Schematron" classpathref="mei.classpath" loaderref="mei.classpath.loader" />
+        <schematron unless:set="validate-purification.done" schematronFile="${dir.validation}/mei-purify.sch" expectSuccess="true" schematronProcessingEngine="schematron" languageCode="en" failOnError="true" failOnValidationError="true">
+            <fileset dir="${dir.build}">    
+                <include name="${canonicalized.file.next}" ></include>
+            </fileset>
+        </schematron>
+        <property name="validate-purification.done" value="true"/>
+        <echo>purification of canonicalized source validated: ${validate-purification.done}</echo>
+    </target>
 
     <target name="build-compiled-odd" description="Builds the compiled ODD of a specific customization submitted as absolute path with -Dcustomization.path input param." depends="validate-source">
         <basename property="selectedSchema" file="${customization.path}" suffix=".xml"/>
diff --git a/source/mei-source.xml b/source/mei-source.xml
index c692ae170..06440748a 100644
--- a/source/mei-source.xml
+++ b/source/mei-source.xml
@@ -20,6 +20,7 @@
 <?xml-model href="validation/mei_odds.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
 <?xml-model href="validation/mei_odds.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
 <?xml-model href="validation/mei-source.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
+<?xml-model href="validation/mei-purify.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?>
 <TEI xmlns="http://www.tei-c.org/ns/1.0"
      xmlns:rng="http://relaxng.org/ns/structure/1.0"
      xmlns:sch="http://purl.oclc.org/dsdl/schematron"
diff --git a/source/validation/mei-purify.sch b/source/validation/mei-purify.sch
new file mode 100644
index 000000000..0a566c6ae
--- /dev/null
+++ b/source/validation/mei-purify.sch
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Author: Benjamin W. Bohl
+
+This schematron is intended to be run through Apache Ant as merge test.
+Goal is to give hints for easier conversion to pureODD.
+
+-->
+<sch:schema queryBinding="xslt2" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
+    <sch:ns prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>
+    <sch:ns prefix="rng" uri="http://relaxng.org/ns/structure/1.0"/>
+
+    <sch:pattern id="check_rngChoice">
+        <sch:rule context="rng:choice">
+            <sch:assert role="warning" test="count(*) > 1">An &lt;rng:choice&gt; element hast to contain more than one option to choose from.</sch:assert>
+        </sch:rule>
+    </sch:pattern>
+
+    <sch:pattern id="check_teiConstraintSpec_ident">
+        <sch:rule context="tei:constraintSpec">
+          <sch:let name="precedingIdents" value="preceding::tei:constraintSpec/@ident"></sch:let>
+            <sch:assert role="warning" test="if ($precedingIdents != ()) then @ident != $precedingIdents else true()">The @ident (<sch:value-of select="@ident"/>) on constraintSpec has to be unique across all of mei-source.xml. (<sch:value-of select="$precedingIdents"/>)</sch:assert>
+        </sch:rule>
+    </sch:pattern>
+
+    <sch:pattern id="check_teiDatatype">
+        <sch:rule context="tei:datatype">
+            <sch:report role="warning" test="rng:choice">An &lt;tei:datatype&gt; must not contain an rng:choice as child. If you need alternative values from other datatypes or want to extend a datatype, please define a new datatype and reference it.</sch:report>
+        </sch:rule>
+    </sch:pattern>
+
+</sch:schema>


Reviews:
user: login: rettinghaus
state: CHANGES_REQUESTED
author_association: MEMBER
submitted_at: 2025-02-07T14:58:58Z
user: login: bwbohl
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-02-07T15:12:02Z
user: login: bwbohl
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-11T08:24:10Z
user: login: rettinghaus
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-11T09:17:35Z
user: login: bwbohl
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-12T02:36:43Z
user: login: musicEnfanthen
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-12T09:45:37Z
user: login: rettinghaus
state: DISMISSED
author_association: MEMBER
submitted_at: 2025-03-28T14:50:01Z
user: login: musicEnfanthen
state: DISMISSED
author_association: MEMBER
submitted_at: 2025-03-28T14:50:27Z
user: login: rettinghaus
body: lgtm
state: DISMISSED
author_association: MEMBER
submitted_at: 2025-03-28T15:27:55Z
user: login: musicEnfanthen
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-28T17:35:18Z
user: login: musicEnfanthen
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-28T18:11:52Z
user: login: musicEnfanthen
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-31T15:39:58Z
user: login: musicEnfanthen
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-31T16:24:43Z
user: login: bwbohl
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-01T07:43:16Z
user: login: musicEnfanthen
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-01T08:13:39Z
user: login: bwbohl
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-01T08:33:34Z
user: login: musicEnfanthen
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-09T13:40:59Z
user: login: musicEnfanthen
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-24T08:14:41Z
user: login: musicEnfanthen
state: APPROVED
author_association: MEMBER
submitted_at: 2025-04-24T08:18:40Z
user: login: copilot-pull-request-reviewer[bot]
body: ## Pull Request Overview

This PR prepares for the conversion to pureODD by adding a schematron precheck to the validation workflow.  
- Adds environment variables BUILD_FILE and DOCKER_IMAGE for reuse across jobs.  
- Updates the validate-source job to use these environment variables in the Docker run command.  
- Introduces a new validate-purification job that checks the source using a schematron problem matcher.

<details>
<summary>Files not reviewed (4)</summary>

* **.github/problem_matchers/schematron-problem-matcher.json**: Language not supported
* **build.xml**: Language not supported
* **source/mei-source.xml**: Language not supported
* **source/validation/mei-purify.sch**: Language not supported
</details>



state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-24T11:01:18Z

Review comments:
diff_hunk: @@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sch:schema queryBinding="xslt2" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
+    <sch:ns prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>
+    <sch:ns prefix="rng" uri="http://relaxng.org/ns/structure/1.0"/>
+
+    <sch:pattern id="check_rngChoice">
+        <sch:rule context="rng:choice">
+            <sch:assert role="error" test="count(*) > 1">An &lt;rng:choice&gt; element hast to contain more than one option to choose from.</sch:assert>
path: source/validation/mei-purify.sch
user: login: rettinghaus
body: ```suggestion
            <sch:assert role="error" test="count(*) > 1">An &lt;rng:choice&gt; element has to contain more than one option to choose from.</sch:assert>
```
created_at: 2025-02-07T14:55:34Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sch:schema queryBinding="xslt2" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
+    <sch:ns prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>
+    <sch:ns prefix="rng" uri="http://relaxng.org/ns/structure/1.0"/>
+
+    <sch:pattern id="check_rngChoice">
+        <sch:rule context="rng:choice">
+            <sch:assert role="error" test="count(*) > 1">An &lt;rng:choice&gt; element hast to contain more than one option to choose from.</sch:assert>
+        </sch:rule>
+    </sch:pattern>
+
+    <sch:pattern id="check_teiConstraintSpec_ident">
+        <sch:rule context="tei:constraintSpec">
+            <sch:assert role="error" test="@ident != preceding::tei:constraintSpec/@ident">The @ident on constraintSpec has to be unique across all of mei-source.xml.</sch:assert>
path: source/validation/mei-purify.sch
user: login: rettinghaus
body: `mei-source.xml` actually doesn't contain constraints, better to use something like "across all MEI source files".
created_at: 2025-02-07T14:58:26Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sch:schema queryBinding="xslt2" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
+    <sch:ns prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>
+    <sch:ns prefix="rng" uri="http://relaxng.org/ns/structure/1.0"/>
+
+    <sch:pattern id="check_rngChoice">
+        <sch:rule context="rng:choice">
+            <sch:assert role="error" test="count(*) > 1">An &lt;rng:choice&gt; element hast to contain more than one option to choose from.</sch:assert>
+        </sch:rule>
+    </sch:pattern>
+
+    <sch:pattern id="check_teiConstraintSpec_ident">
+        <sch:rule context="tei:constraintSpec">
+            <sch:assert role="error" test="@ident != preceding::tei:constraintSpec/@ident">The @ident on constraintSpec has to be unique across all of mei-source.xml.</sch:assert>
path: source/validation/mei-purify.sch
user: login: bwbohl
body: Hmm… right will work in a context where xi:includes get resolved automatically, e.g. with XInclude processing activated in oXygen XML or when canonicalising first and then validating the canonicalised file like in the newly pushed ant target ;-)
created_at: 2025-02-07T15:12:02Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sch:schema queryBinding="xslt2" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
+    <sch:ns prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>
+    <sch:ns prefix="rng" uri="http://relaxng.org/ns/structure/1.0"/>
+
+    <sch:pattern id="check_rngChoice">
+        <sch:rule context="rng:choice">
+            <sch:assert role="error" test="count(*) > 1">An &lt;rng:choice&gt; element hast to contain more than one option to choose from.</sch:assert>
+        </sch:rule>
+    </sch:pattern>
+
+    <sch:pattern id="check_teiConstraintSpec_ident">
+        <sch:rule context="tei:constraintSpec">
+            <sch:assert role="error" test="@ident != preceding::tei:constraintSpec/@ident">The @ident on constraintSpec has to be unique across all of mei-source.xml.</sch:assert>
path: source/validation/mei-purify.sch
user: login: bwbohl
body: I’d be ok with having this as ant-target exclusively; what do you guys think @rettinghaus & @musicEnfanthen?
created_at: 2025-03-11T08:24:10Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sch:schema queryBinding="xslt2" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
+    <sch:ns prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>
+    <sch:ns prefix="rng" uri="http://relaxng.org/ns/structure/1.0"/>
+
+    <sch:pattern id="check_rngChoice">
+        <sch:rule context="rng:choice">
+            <sch:assert role="error" test="count(*) > 1">An &lt;rng:choice&gt; element hast to contain more than one option to choose from.</sch:assert>
+        </sch:rule>
+    </sch:pattern>
+
+    <sch:pattern id="check_teiConstraintSpec_ident">
+        <sch:rule context="tei:constraintSpec">
+            <sch:assert role="error" test="@ident != preceding::tei:constraintSpec/@ident">The @ident on constraintSpec has to be unique across all of mei-source.xml.</sch:assert>
path: source/validation/mei-purify.sch
user: login: rettinghaus
body: Sounds okay with me.
As it will be of use only for a limited time, maybe add a comment for future us?
created_at: 2025-03-11T09:17:34Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sch:schema queryBinding="xslt2" xmlns:sch="http://purl.oclc.org/dsdl/schematron">
+    <sch:ns prefix="tei" uri="http://www.tei-c.org/ns/1.0"/>
+    <sch:ns prefix="rng" uri="http://relaxng.org/ns/structure/1.0"/>
+
+    <sch:pattern id="check_rngChoice">
+        <sch:rule context="rng:choice">
+            <sch:assert role="error" test="count(*) > 1">An &lt;rng:choice&gt; element hast to contain more than one option to choose from.</sch:assert>
+        </sch:rule>
+    </sch:pattern>
+
+    <sch:pattern id="check_teiConstraintSpec_ident">
+        <sch:rule context="tei:constraintSpec">
+            <sch:assert role="error" test="@ident != preceding::tei:constraintSpec/@ident">The @ident on constraintSpec has to be unique across all of mei-source.xml.</sch:assert>
path: source/validation/mei-purify.sch
user: login: bwbohl
body: added a xml comment
created_at: 2025-03-12T02:36:43Z
author_association: MEMBER
diff_hunk: @@ -303,6 +303,18 @@
         <property name="validate-source.done" value="true"/>
         <echo>canonicalized source validated: ${validate-source.done}</echo>
     </target>
+    
+    <target name="validate-purification" depends="canonicalize-source" description="Validates the canonicalized source with mei-purify.sch. This target will be triggered before all `build-...` targets.">
+        <echo unless:set="validate-source.done">validating source...</echo>
path: build.xml
user: login: musicEnfanthen
body: ```suggestion
        <echo unless:set="validate-purification.done">validating purification of source...</echo>
```
created_at: 2025-03-12T09:43:22Z
author_association: MEMBER
diff_hunk: @@ -303,6 +303,18 @@
         <property name="validate-source.done" value="true"/>
         <echo>canonicalized source validated: ${validate-source.done}</echo>
     </target>
+    
+    <target name="validate-purification" depends="canonicalize-source" description="Validates the canonicalized source with mei-purify.sch. This target will be triggered before all `build-...` targets.">
+        <echo unless:set="validate-source.done">validating source...</echo>
+        <taskdef name="schematron" classname="com.helger.schematron.ant.Schematron" classpathref="mei.classpath" loaderref="mei.classpath.loader" />
+        <schematron unless:set="validate-source.done" schematronFile="${dir.validation}/mei-purify.sch" expectSuccess="true" schematronProcessingEngine="schematron" languageCode="en" failOnError="true" failOnValidationError="true">
path: build.xml
user: login: musicEnfanthen
body: ```suggestion
        <schematron unless:set="validate-purification.done" schematronFile="${dir.validation}/mei-purify.sch" expectSuccess="true" schematronProcessingEngine="schematron" languageCode="en" failOnError="true" failOnValidationError="true">
```
created_at: 2025-03-12T09:43:43Z
author_association: MEMBER
diff_hunk: @@ -303,6 +303,18 @@
         <property name="validate-source.done" value="true"/>
         <echo>canonicalized source validated: ${validate-source.done}</echo>
     </target>
+    
+    <target name="validate-purification" depends="canonicalize-source" description="Validates the canonicalized source with mei-purify.sch. This target will be triggered before all `build-...` targets.">
+        <echo unless:set="validate-source.done">validating source...</echo>
+        <taskdef name="schematron" classname="com.helger.schematron.ant.Schematron" classpathref="mei.classpath" loaderref="mei.classpath.loader" />
+        <schematron unless:set="validate-source.done" schematronFile="${dir.validation}/mei-purify.sch" expectSuccess="true" schematronProcessingEngine="schematron" languageCode="en" failOnError="true" failOnValidationError="true">
+            <fileset dir="${dir.build}">    
+                <include name="${canonicalized.file.next}" ></include>
+            </fileset>
+        </schematron>
+        <property name="validate-source.done" value="true"/>
path: build.xml
user: login: musicEnfanthen
body: ```suggestion
        <property name="validate-purification.done" value="true"/>
```
created_at: 2025-03-12T09:44:17Z
author_association: MEMBER
diff_hunk: @@ -303,6 +303,18 @@
         <property name="validate-source.done" value="true"/>
         <echo>canonicalized source validated: ${validate-source.done}</echo>
     </target>
+    
+    <target name="validate-purification" depends="canonicalize-source" description="Validates the canonicalized source with mei-purify.sch. This target will be triggered before all `build-...` targets.">
+        <echo unless:set="validate-source.done">validating source...</echo>
+        <taskdef name="schematron" classname="com.helger.schematron.ant.Schematron" classpathref="mei.classpath" loaderref="mei.classpath.loader" />
+        <schematron unless:set="validate-source.done" schematronFile="${dir.validation}/mei-purify.sch" expectSuccess="true" schematronProcessingEngine="schematron" languageCode="en" failOnError="true" failOnValidationError="true">
+            <fileset dir="${dir.build}">    
+                <include name="${canonicalized.file.next}" ></include>
+            </fileset>
+        </schematron>
+        <property name="validate-source.done" value="true"/>
+        <echo>canonicalized source validated: ${validate-source.done}</echo>
path: build.xml
user: login: musicEnfanthen
body: ```suggestion
        <echo>purification of canonicalized source validated: ${validate-purification.done}</echo>
```
created_at: 2025-03-12T09:45:01Z
author_association: MEMBER
diff_hunk: @@ -0,0 +1,20 @@
+{
+    "problemMatcher": [
+        {
+            "name": "schematron",
+            "owner": "schematron",
path: .github/problem_matchers/schematron.json
user: login: musicEnfanthen
body: ```suggestion
            "owner": "music-encoding",
```
created_at: 2025-03-28T17:34:05Z
author_association: MEMBER
path: .github/problem_matchers/schematron.json
user: login: musicEnfanthen
body: would rename this file: schematron-problem-matcher.json
created_at: 2025-03-28T17:34:28Z
author_association: MEMBER
diff_hunk: @@ -22,6 +26,27 @@ jobs:
         repository: ${{github.event.pull_request.head.repo.full_name}}
         ref: ${{github.event.pull_request.head.ref}}
         fetch-depth: 0
-
+    
path: .github/workflows/pr-validation.yml
user: login: musicEnfanthen
body: ```suggestion

```
created_at: 2025-03-28T18:11:52Z
author_association: MEMBER
path: source/modules/MEI.header.xml
user: login: musicEnfanthen
body: @riedde @gucl-mu Please double check
created_at: 2025-03-31T15:39:58Z
author_association: MEMBER
path: .github/problem_matchers/schematron.json
user: login: musicEnfanthen
body: @bwbohl 
created_at: 2025-03-31T16:24:43Z
author_association: MEMBER
path: source/modules/MEI.header.xml
user: login: bwbohl
body: yes please, @riedde and @gucl-mu check if the resulting rng matches your original design ;-)
created_at: 2025-04-01T07:43:16Z
author_association: MEMBER
path: source/modules/MEI.genetic.xml
user: login: musicEnfanthen
body: @bwbohl Can we move the fixes for the warnings into a separate PR? Maybe it's a bit overcautious, but seems to be better in terms of separation of concerns?
created_at: 2025-04-01T08:13:39Z
author_association: MEMBER
path: source/modules/MEI.genetic.xml
user: login: bwbohl
body: Wanted to try the results but, was thinking about that, too!
Of course, we can move them ;-)
created_at: 2025-04-01T08:33:34Z
author_association: MEMBER
path: source/modules/MEI.genetic.xml
user: login: musicEnfanthen
body: @bwbohl Perfect, I think the PR is ready to be merged as soon as the fixes are outsourced.
created_at: 2025-04-09T13:40:59Z
author_association: MEMBER
path: source/modules/MEI.genetic.xml
user: login: musicEnfanthen
body: Thank you!
created_at: 2025-04-24T08:14:41Z
author_association: MEMBER

PR comments:
user: login: bwbohl
created_at: 2025-03-28T14:52:06Z
body: @musicEnfanthen fixed the syntax and the check runs successfully. The purify-check only issues warnings, no errors @musicEnfanthen how do we get those reported in the check result?
author_association: MEMBER
user: login: musicEnfanthen
created_at: 2025-03-28T14:53:42Z
body: @bwbohl Would not open a new issue for every check run. We can simply look into the action logs whenever we need it, right?
author_association: MEMBER
user: login: bwbohl
created_at: 2025-03-28T14:55:49Z
body: thx @rettinghaus for the hint here: https://github.com/musescore/MuseScore/pull/27050/files
author_association: MEMBER
user: login: bwbohl
created_at: 2025-03-28T14:56:43Z
body: > @bwbohl Would not open a new issue for every check run. We can simply look into the action logs whenever we need it, right?

I didn‘t mean issues but a status in the check that is something else than green/passed but a warning
author_association: MEMBER
user: login: bwbohl
created_at: 2025-03-28T16:07:17Z
body: tried different things:
1. add a problem matcher but that did not report anything… why? I don’t know --> help appreciated
2. made the schematron check with com.helger.schematron.ant.Schematron failOnValidationWarn

@rettinghaus & @musicEnfanthen which way to go? I tend to (2.) because we want that stuff fixed and digging into the problem matcher for this intermediate task seems (at least to me) like an unnecessary overhead.

What’s your take?
author_association: MEMBER
user: login: bwbohl
created_at: 2025-03-28T16:08:13Z
body: Probably the purification check should also go into a separate action to make it clear that the general validation did not fail
author_association: MEMBER
user: login: musicEnfanthen
created_at: 2025-03-28T16:50:50Z
body: I would not failOnValidationWarn since then this might block the merging of an otherwise fine PR.
author_association: MEMBER
user: login: musicEnfanthen
created_at: 2025-03-28T17:29:39Z
body: @bwbohl Moved the purification job into a separate job, so it is reported in the PR separately from the source validation. 
author_association: MEMBER
user: login: musicEnfanthen
created_at: 2025-03-31T16:24:58Z
body: @rettinghaus How do you test the matcher?
author_association: MEMBER
user: login: rettinghaus
created_at: 2025-03-31T17:33:17Z
body: @musicEnfanthen I don't 😉  
It's a regex. Take a line from the output of the CI and build a regex. You can then check it here: https://regex101.com/
author_association: MEMBER
user: login: bwbohl
created_at: 2025-03-31T19:58:57Z
body: > @bwbohl Moved the purification job into a separate job, so it is reported in the PR separately from the source validation.

fantastic!
author_association: MEMBER
user: login: bwbohl
created_at: 2025-04-24T08:16:07Z
body: I rewrote the history of this PR’s branch to drop the schema fixes and moved them to #1665 
author_association: MEMBER
user: login: musicEnfanthen
created_at: 2025-04-24T08:19:19Z
body: Perfect, thanks!
author_association: MEMBER