Added 1 missing validation rule (layout)#73
Open
UnsharpenedSpear wants to merge 4 commits intosbgn:masterfrom
Open
Added 1 missing validation rule (layout)#73UnsharpenedSpear wants to merge 4 commits intosbgn:masterfrom
UnsharpenedSpear wants to merge 4 commits intosbgn:masterfrom
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR implements a missing layout validation rule from the SBGN Activity Flow Level 1 Version 1.2 specification in the
sbgn_af.schSchematron rules.New rule added
af10115: Prohibit overlapping Activity Flow nodes
Detailed Changes
Rule: No Overlapping Activity Nodes (af10115)
Spec Reference: SBGN Activity Flow Level 1 Version 1.2 — Layout constraints
Implementation
The rule checks that Activity Flow node glyphs do not spatially overlap.
The following glyph classes are validated:
For each glyph, the rule:
sbgn:bbox)The
following::axis is used to avoid symmetric duplicate checks and improve evaluation efficiency.Example Violation
This results in:
Verification
Validation was performed using the Schematron compilation and validation commands described in the libSBGN repository README.
To streamline testing, these commands were wrapped in a small helper script (
validate.py) that automates:Test Cases
Overlapping biological activity glyphs
Non-overlapping glyphs
All existing AF validation tests passed successfully.
Notes
sbgn:bboxgeometry, consistent with SBGN-ML layout encoding.Impact
This PR improves Activity Flow layout validation by enforcing a specification constraint that was previously not checked, helping detect diagram layout errors early in the validation pipeline.