Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/ontology-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Ontology Quality Checks

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
clause9-checks:
runs-on: ubuntu-latest

steps:
- name: Checkout FSL
uses: actions/checkout@v4

- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install rdflib pyshacl

- name: Run Clause 9 checks on FSL
run: |
python saref-experiment/run_checks.py \
--ttl ontologies/fsl.ttl \
--extra-ttl ontologies/ \
--label FSL
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.DS_Store
local-experiments/

1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A test license file
1 change: 1 addition & 0 deletions documentation/abstract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A test abstract fiile
1 change: 1 addition & 0 deletions documentation/description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A test description file
12 changes: 12 additions & 0 deletions examples/python-example.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@prefix fsl: <http://www.softlang.org/ontologies/fsl#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix dctype: <http://purl.org/dc/dcmitype/> .

<http://www.softlang.org/ontologies/fsl/examples/python>
a dctype:Dataset ;
dcterms:title "Python Language Example"@en ;
dcterms:description "An example showing how Python is described in FSL"@en .
8 changes: 8 additions & 0 deletions requirements/requirements.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Id;Category;Requirement
R1;Coverage;The ontology shall cover major categories of software languages including programming languages modeling languages configuration languages and query languages
R2;Classification;The ontology shall enable classification of programming languages by paradigm such as functional object-oriented procedural and logical
R3;Alignment;The ontology shall link software language entities to their corresponding Wikipedia resources using foaf:isPrimaryTopicOf or foaf:page
R4;Grammar;The ontology shall capture the grammar formalism associated with each language
R5;Tools;The ontology shall capture tools and frameworks associated with software languages
R6;Activities;The ontology shall represent software language engineering activities
R7;Spaces;The ontology shall capture technology spaces relevant to software languages
5 changes: 5 additions & 0 deletions saref-experiment/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
venv/
saref-core-reference/
__pycache__/
*.pyc
results/
6 changes: 6 additions & 0 deletions saref-experiment/Dockerfile.saref-dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM python:3.13-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
git build-essential libleveldb-dev default-jre-headless \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir \
"saref-pypeline[check] @ git+https://labs.etsi.org/rep/saref/saref-pypeline.git"
55 changes: 55 additions & 0 deletions saref-experiment/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
SCRIPT_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
VENV := $(SCRIPT_DIR)venv
PYTHON := $(VENV)/bin/python
SAREF_CORE := $(SCRIPT_DIR)saref-core-reference
SAREF_DEV_IMAGE := saref-dev-local

venv: $(VENV)/bin/python

$(VENV)/bin/python:
python3 -m venv $(VENV)
$(VENV)/bin/pip install --quiet -r $(SCRIPT_DIR)requirements.txt

clone-saref-core:
@if [ ! -d "$(SAREF_CORE)" ]; then \
git clone --depth=1 https://labs.etsi.org/rep/saref/saref-core.git $(SAREF_CORE); \
else \
echo "saref-core already cloned."; \
fi

docker-build:
docker build -t $(SAREF_DEV_IMAGE) -f $(SCRIPT_DIR)Dockerfile.saref-dev $(SCRIPT_DIR)

check-saref-core: clone-saref-core
@docker image inspect $(SAREF_DEV_IMAGE) > /dev/null 2>&1 || $(MAKE) docker-build
@mkdir -p $(SCRIPT_DIR)results
docker run --rm \
-v $(SAREF_CORE):/saref-core \
$(SAREF_DEV_IMAGE) \
sh -c "git config --global --add safe.directory /saref-core && saref-dev check --skip-fetch /saref-core" \
2>&1 | tee $(SCRIPT_DIR)results/saref-core-pypeline.md

check-fsl-main: venv
@mkdir -p $(SCRIPT_DIR)results
@git worktree add /tmp/fsl-main main 2>/dev/null || true
$(PYTHON) $(SCRIPT_DIR)run_checks.py \
--ttl /tmp/fsl-main/ontologies/fsl.ttl \
--extra-ttl /tmp/fsl-main/ontologies/ \
--label "FSL-main" \
2>&1 | tee $(SCRIPT_DIR)results/fsl-main-check.md; \
git worktree remove /tmp/fsl-main 2>/dev/null; true

check-fsl-exp: venv
@mkdir -p $(SCRIPT_DIR)results
$(PYTHON) $(SCRIPT_DIR)run_checks.py \
--ttl $(SCRIPT_DIR)../ontologies/fsl.ttl \
--extra-ttl $(SCRIPT_DIR)../ontologies/ \
--label "FSL-exp" \
2>&1 | tee $(SCRIPT_DIR)results/fsl-exp-check.md

clean:
rm -rf $(SCRIPT_DIR)results/
rm -rf $(SAREF_CORE)
@git worktree remove /tmp/fsl-main 2>/dev/null; true

.PHONY: venv docker-build clone-saref-core check-saref-core check-fsl-main check-fsl-exp check-all clean
Loading