Skip to content
Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 0 additions & 24 deletions .github/workflows/codespell.yml

This file was deleted.

80 changes: 80 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Docs and release

on:
push:
branches: [ main, master ]
paths: [ docs/current/doco.ttl ]
workflow_dispatch:

permissions:
contents: write

jobs:
docs:
uses: SPAROntologies/sparontologies.github.io/.github/workflows/lode.yml@master
with:
ontology: docs/current/doco.ttl

metadata:
needs: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}

- uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install rdflib and uv
run: pip install rdflib uv

- name: Copy docs/current to docs/<dcterms:modified>
run: |
date=$(python - docs/current/doco.ttl <<'EOF'
import sys
from rdflib import Graph, OWL, RDF, DCTERMS
g = Graph().parse(sys.argv[1])
print(g.value(g.value(None, RDF.type, OWL.Ontology), DCTERMS.modified) or "")
EOF
)
[[ $date =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]] || { echo "Bad or missing dcterms:modified: '$date'"; exit 1; }
rm -rf "docs/$date"
cp -r docs/current "docs/$date"
sed -i "s/^date-released: .*/date-released: '$date'/" CITATION.cff
echo "Snapshot -> docs/$date"

- name: Set version from owl:versionInfo
run: |
version=$(python - docs/current/doco.ttl <<'EOF'
import sys
from rdflib import Graph, OWL, RDF
g = Graph().parse(sys.argv[1])
print(g.value(g.value(None, RDF.type, OWL.Ontology), OWL.versionInfo) or "")
EOF
)
[[ $version =~ ^[0-9A-Za-z.+-]+$ ]] || { echo "Bad or missing owl:versionInfo: '$version'"; exit 1; }
sed -i "s/^version: .*/version: $version/" CITATION.cff
sed -i "0,/^version = .*/s//version = \"$version\"/" pyproject.toml
uv lock
echo "VERSION=$version" >> "$GITHUB_ENV"
echo "Version -> $version"

- name: Commit changes
run: |
git config user.name "github-actions[bot]"
git config user.email "41898333+github-actions[bot]@users.noreply.github.com"
git add -A docs CITATION.cff pyproject.toml uv.lock
git diff --cached --quiet || git commit -m "DOCS: add versioned documentation snapshot and update version"
git push

- name: Create release
env:
GH_TOKEN: ${{ github.token }}
run: |
if gh release view "v$VERSION" >/dev/null 2>&1; then
echo "Release v$VERSION already exists, skipping"
else
gh release create "v$VERSION" --title "v$VERSION" --generate-notes --target "$(git rev-parse HEAD)"
fi
19 changes: 3 additions & 16 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,10 @@ name: Ontology Validation

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

jobs:
validate:
runs-on: ubuntu-latest

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

- name: Install uv and Python
uses: astral-sh/setup-uv@v3
with:
version: "latest"

- name: Run syntax and FAIR validation
run: uv run main.py
continue-on-error: true
uses: SPAROntologies/sparontologies.github.io/.github/workflows/validation.yml@master
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Changelog

* **v1.4.1**:
Added new documentation files to the repository (e.g., the `CITATION.cff` file) and refactored some components.
* **v1.4.0**:
Added new documentation, including annotation properties (e.g., `bibo:doi`, `schema:codeRepository`, etc.), term properties (e.g., `vann:example`, `vs:term_status`, etc.), exemplary competency questions with their respective SPARQL queries, and a Grafoo diagram.
54 changes: 54 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
cff-version: 1.2.0
title: The Document Components Ontology (DoCO)
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Silvio
family-names: Peroni
orcid: 'https://orcid.org/0000-0003-0530-4305'
- given-names: David
family-names: Shotton
orcid: 'https://orcid.org/0000-0001-5506-523X'
identifiers:
- type: doi
value: 10.25504/FAIRsharing.162003
repository-code: 'https://github.com/SPAROntologies/doco'
url: 'http://www.sparontologies.net/ontologies/doco'
abstract: The Document Components Ontology (DoCO) is an OWL 2 DL ontology that provides a general-purpose structured vocabulary of document elements.
keywords:
- document components
- bibliometrics
- scholarly publishing
- scientometrics
- semantic publishing
license: CC-BY-4.0
version: 1.4.1
date-released: '2026-10-05'
preferred-citation:
type: article
authors:
- family-names: "Constantin"
given-names: "Alexandru"
orcid: "https://orcid.org/0009-0002-3633-5032"
- family-names: "Peroni"
given-names: "Silvio"
orcid: "https://orcid.org/0000-0003-0530-4305"
- family-names: "Pettifer"
given-names: "Steve"
orcid: "https://orcid.org/0000-0002-1809-5621"
- family-names: "Shotton"
given-names: "David"
orcid: "https://orcid.org/0000-0001-5506-523X"
- family-names: "Vitali"
given-names: "Fabio"
orcid: "https://orcid.org/0000-0002-7562-5203"
doi: "10.3233/SW-150177"
journal: "Semantic Web"
issue: 7
volume: 1
start: 167
end: 181
title: "The Document Components Ontology (DoCO)"
year: 2016
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Document Components Ontology (DoCO)

The Document Components Ontology (DoCO) in an ontology that provides a structured vocabulary written of document components, both structural (e.g., block, inline, paragraph, section, chapter) and rhetorical (e.g., introduction, discussion, acknowledgements, reference list, figure, appendix).
[![License](https://img.shields.io/github/license/SPAROntologies/doco)](LICENSE.md)
[![Release](https://img.shields.io/github/v/release/SPAROntologies/doco)](https://github.com/SPAROntologies/doco/releases/latest)
[![Tests](https://img.shields.io/github/actions/workflow/status/SPAROntologies/doco/validation.yml?label=tests)](https://github.com/SPAROntologies/doco/actions/workflows/validation.yml)
[![Documentation](https://img.shields.io/badge/docs-sparontologies.net-blue)](http://www.sparontologies.net/ontologies/doco)
[![IRI](https://img.shields.io/badge/IRI-purl.org%2Fspar%2Fdoco-blue)](http://purl.org/spar/doco)

The **_Document Components Ontology (DoCO)_** in an ontology that provides a structured vocabulary written of document components, both structural (e.g., block, inline, paragraph, section, chapter) and rhetorical (e.g., introduction, discussion, acknowledgements, reference list, figure, appendix).

**URL:** http://purl.org/spar/doco

Expand Down
Loading
Loading