Skip to content

Commit

Permalink
Merge pull request steveraysteveray#4 from steveraysteveray/test-branch
Browse files Browse the repository at this point in the history
Test branch
  • Loading branch information
steveraysteveray authored Sep 20, 2023
2 parents 82f0825 + e305eb8 commit 08f8e3c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 27 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,22 @@ jobs:
- name: Get changed files
id: getfile
run: |
files=$(git diff-tree --no-commit-id --name-only -r $(git log -n 1 --pretty=format:"%H") | grep ".ttl$" || echo "")
files=$(git diff-tree --no-commit-id --name-only -r $(git log -n 1 --pretty=format:"%H") | grep ".ttl$" | tr '\n' ' ' || echo "")
if [ -z "$files" ]; then
echo "No .ttl files changed."
exit 0
fi
echo "::set-output name=files::$files"
echo "FILES=$files" >> $GITHUB_ENV
- name: Echo changed files
run: |
echo "Changed files: $FILES"
- name: Run Python script on changed files
run: |
IFS=' ' read -ra ADDR <<< "${{ steps.getfile.outputs.files }}"
IFS=' ' read -ra ADDR <<< "$FILES" # Split on spaces
for file in "${ADDR[@]}"; do
echo "Processing file: $file"
python add-base.py "$file"
done
Expand Down
4 changes: 2 additions & 2 deletions file1.shapes.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<https://example/file1>
a owl:Ontology ;
owl:imports <http://datashapes.org/dash> ;
owl:versionInfo "Created with TopBraid Composer" ;
owl:versionInfo "Created with TopBraid Composer" ;
.
file1:DestinationClass_1
a file1:Location ;
Expand All @@ -27,7 +27,7 @@ file1:Equipment
rdfs:subClassOf rdfs:Resource ;
.
file1:Location
a rdfs:Class ;
a rdfs:Class ;
a sh:NodeShape ;
rdfs:label "Location" ;
rdfs:subClassOf rdfs:Resource ;
Expand Down
44 changes: 22 additions & 22 deletions file2.shapes.ttl → subfolder/file2.shapes.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# imports: https://example/file1
# prefix: file2

@base <https://example/file2> .
@prefix dash: <http://datashapes.org/dash#> .
@prefix file1: <https://example/file1#> .
@prefix file2: <https://example/file2#> .
Expand All @@ -13,29 +14,17 @@
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

file1:isPointOfShape
sh:deactivated true ;
.
file2:isPointOfShape
a sh:PropertyShape ;
sh:targetClass file1:StartingClass ;
sh:path file1:isPointOf ;
sh:or (
[
sh:class file1:Equipment ;
]
[
sh:class file1:Location ;
]
[
sh:class file2:SomethingElse ;
]
) ;
sh:deactivated true ;
.
<https://example/file2>
a owl:Ontology ;
owl:imports <http://datashapes.org/dash> ;
owl:imports <https://example/file1> ;
owl:versionInfo "Created with TopBraid Composer" ;
owl:versionInfo "Created with TopBraid Composer" ;
.
file2:ShouldFail
a file1:RandomOtherClass ;
rdfs:label "Should fail" ;
.
file2:SomethingElse
a rdfs:Class ;
Expand All @@ -52,8 +41,19 @@ file2:StartingClass_1
rdfs:label "Starting class 1" ;
file1:isPointOf file2:SomethingElse_1 ;
.
file2:ShouldFail
a file1:RandomOtherClass ;
rdfs:label "Should fail" ;
file2:isPointOfShape
a sh:PropertyShape ;
sh:path file1:isPointOf ;
sh:or (
[
sh:class file1:Equipment ;
]
[
sh:class file1:Location ;
]
[
sh:class file2:SomethingElse ;
]
) ;
sh:targetClass file1:StartingClass ;
.

0 comments on commit 08f8e3c

Please sign in to comment.