Skip to content

replaced represents with refersTo; added inverse properties; refactor… #22

replaced represents with refersTo; added inverse properties; refactor…

replaced represents with refersTo; added inverse properties; refactor… #22

Workflow file for this run

name: Ontology Documentation
on:
push:
paths:
- '*.owl'
- '*.ttl'
- '*.rdf'
workflow_dispatch:
jobs:
generate-docs:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the repository
- name: Checkout repository
uses: actions/checkout@v3
# Step 2: Set up Python
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.8'
# Step 3: get ontospy
- name: Checkout Forked Ontospy
uses: actions/checkout@v3
with:
repository: micheldumontier/Ontospy
path: './ontospy'
# Step 3: Install Ontospy
- name: Install Ontospy
# run: |
# python -m pip install --upgrade pip
# pip install ontospy
run: |
python -m pip install --upgrade pip
cd ./ontospy
pip install -r requirements.txt
pip install -e .
cd ..
# Step 4: Generate Ontospy Documentation
- name: Generate Ontology Documentation
run: |
for file in *.ttl *.owl *.rdf; do
if [[ -f "$file" ]]; then
mkdir -p docs/"${file%.*}"
python -m ontospy.cli gendocs --type 2 -o docs/ "$file"
echo "Ontospy documentation generated for: $file"
fi
done
- name: Install Pylode
run: |
pip install pylode
# Step 5: generate pylode documentation
- name: Generate Pylode Documentation
run: |
mkdir -p docs/pylode/
for file in *.ttl *.owl *.rdf; do
if [[ -f "$file" ]]; then
pylode -o docs/pylode/"${file%.*}" "$file"
echo "Pylode documentation generated for: $file"
fi
done
# Step 5: Deploy Documentation to GitHub Pages
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs