Skip to content

Commit 11c680f

Browse files
authored
Merge pull request #12 from sdsc-ordes/refactor/template
refactor: template-compliant file hierarchy
2 parents cb0732c + 46f3048 commit 11c680f

38 files changed

Lines changed: 9188 additions & 2234 deletions

.github/workflows/build.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
name: Build ontology assets
22

33
on:
4-
workflow_dispatch:
5-
# workflow_call:
6-
# inputs:
7-
# is_release:
8-
# required: true
9-
# type: boolean
4+
workflow_call:
5+
inputs:
6+
is_release:
7+
required: false
8+
type: boolean
9+
default: false
1010

1111
jobs:
1212

@@ -29,8 +29,8 @@ jobs:
2929
3030
- name: build
3131
run: |
32-
bash tools/bash/build/create-combined-turtle.sh
33-
python tools/python/build/create-schemas.py src/imaging-ontology/ build/
32+
bash ./tools/bash/build/create-combined-turtle.sh src/imaging-ontology/
33+
python ./tools/python/build/create-schemas.py --input build/ontology_combined.ttl --output build/locales/en/schema.json
3434
3535
- name: upload assets in artifacts
3636
uses: actions/upload-artifact@v4

.github/workflows/checks.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: SHACL validation
2+
3+
on:
4+
workflow_call:
5+
pull_request:
6+
paths:
7+
- 'src/imaging-ontology/**'
8+
9+
jobs:
10+
validate:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.12'
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install -r tools/python/requirements.txt
26+
27+
- name: Build ontology bundle
28+
run: |
29+
bash ./tools/bash/build/create-combined-turtle.sh src/imaging-ontology/
30+
python ./tools/python/build/create-schemas.py --input build/ontology_combined.ttl --output build/locales/en/schema.json
31+
32+
- name: SHACL validation
33+
run: |
34+
python tools/python/checks/shacl.py build/ontology_combined.ttl src/quality-checks/shacl-shacl.ttl
35+

.github/workflows/createCombinedTurtle.yml

Lines changed: 0 additions & 61 deletions
This file was deleted.

.github/workflows/createSchemas.yml

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/workflows/docs.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# name: Build ontology docs
2+
3+
# on:
4+
# workflow_call:
5+
6+
# jobs:
7+
8+
# build:
9+
# runs-on: ubuntu-latest
10+
11+
# steps:
12+
13+
# - uses: actions/checkout@v4
14+
15+
# - name: Set up Python
16+
# uses: actions/setup-python@v5
17+
# with:
18+
# python-version: '3.12'
19+
20+
# - name: Install dependencies
21+
# run: |
22+
# python -m pip install --upgrade pip
23+
# pip install
24+
25+
# TODO: BUILD DOCUMENTATION USING RESPECTER

.github/workflows/main-and-pr.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Main and PR pipeline
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
workflow_call:
9+
10+
pull_request:
11+
branches:
12+
- main
13+
14+
jobs:
15+
checks:
16+
uses: ./.github/workflows/checks.yml
17+
18+
build:
19+
uses: ./.github/workflows/build.yml
20+
with:
21+
is_release: false
22+

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Include ontology assets in the release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
10+
build:
11+
uses: ./.github/workflows/build.yml
12+
with:
13+
is_release: true
14+
15+
checks:
16+
uses: ./.github/workflows/checks.yml
17+
with:
18+
is_release: true
19+
needs: build
20+
21+
make_release:
22+
runs-on: ubuntu-latest
23+
needs:
24+
- checks
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- name: get schema assets
30+
uses: actions/download-artifact@v4.1.8
31+
with:
32+
name: schema-bundle
33+
path: build/
34+
35+
- name: create release
36+
uses: softprops/action-gh-release@v2
37+
with:
38+
files: build/*

.github/workflows/shacl-shacl.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
.env
2+
./build/*
3+
bin/act

CHANGELOG

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
v0.1: Initial release, ex: prefixes updated, sh:nodekind sh:IRI replaced with a regex.
2+
v0.2: Changed shapes, ontology definitions, fairlevel validator.
3+
v0.3: Changed fair calculation.
4+
v0.4: Fixed loose nodes for PySHACL.
5+
v0.5: Updated definitions, cardinality of several shapes.
6+
v0.6: Added ontology metadata.
7+
v0.7: Internalize & objectify hasExecutableNotebook, update prefixes from ex: to imag:
8+
v0.8: Update FAIR levels, contributors+producers become authors. First+Last name becomes schema:name.
9+
v0.9: Support for runnable examples, dicom dataset properties, spelling mistakes.

0 commit comments

Comments
 (0)