From b5cdbd88c527d72540fa82cd7d2041ade4c29d11 Mon Sep 17 00:00:00 2001 From: Jesper Friis Date: Mon, 12 Feb 2024 20:02:00 +0100 Subject: [PATCH 1/7] Updated ci_emmocheck.yml --- .github/workflows/ci_emmocheck.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci_emmocheck.yml b/.github/workflows/ci_emmocheck.yml index 515307d7..114e35d7 100644 --- a/.github/workflows/ci_emmocheck.yml +++ b/.github/workflows/ci_emmocheck.yml @@ -4,24 +4,24 @@ on: [push] jobs: build: - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest strategy: max-parallel: 1 matrix: - python-version: [3.7] + python-version: [3.11] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - - name: Install EMMO-python + - name: Install EMMOntoPy run: | pip install --upgrade pip - pip install EMMO + pip install EMMOntoPy - name: Check EMMO run: | From 1f38bff075d47d923be8b0ac62faac2cc60aa789 Mon Sep 17 00:00:00 2001 From: Jesper Friis Date: Mon, 12 Feb 2024 20:08:00 +0100 Subject: [PATCH 2/7] Updated update_pages.yml script --- .github/workflows/update_pages.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/update_pages.yml b/.github/workflows/update_pages.yml index 555dfded..6645f555 100644 --- a/.github/workflows/update_pages.yml +++ b/.github/workflows/update_pages.yml @@ -13,17 +13,21 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Setup git identity run: | git config --global user.email "emmo.github.action@github.com" git config --global user.name "EMMO GitHub Action" - - name: Setup Python 3.7 - uses: actions/setup-python@v1 + - name: Setup Python 3.11 + uses: actions/setup-python@v5 with: - python-version: 3.7 + python-version: 3.11 + + - name: Debug info + run: | + echo "GITHUB_REF_NAME=${GITHUB_REF_NAME}" - name: Install EMMO-python run: | @@ -44,7 +48,7 @@ jobs: pip install semver - name: Checkout GitHub Pages for EMMO-repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: repository: emmo-repo/emmo-repo.github.io path: ".github/pages" From 89eb7c715fcc7b3e25383393337345120b4e6e73 Mon Sep 17 00:00:00 2001 From: Jesper Friis Date: Mon, 12 Feb 2024 20:10:19 +0100 Subject: [PATCH 3/7] Force running the update_pages workflow --- .github/workflows/update_pages.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/update_pages.yml b/.github/workflows/update_pages.yml index 6645f555..0c56ee3f 100644 --- a/.github/workflows/update_pages.yml +++ b/.github/workflows/update_pages.yml @@ -6,6 +6,7 @@ on: - '[0-9]+.[0-9]+.[0-9]+' - '[0-9]+.[0-9]+.[0-9]+-*' - update_pages + - fix-github-workflow jobs: From 34002878e76e7763d881f3d5010c322a0751a493 Mon Sep 17 00:00:00 2001 From: Jesper Friis Date: Mon, 12 Feb 2024 22:45:43 +0100 Subject: [PATCH 4/7] Fixed generation of documentation and redirectionscheck --- .github/expected_redirections.yaml | 36 ++++++++++++++++------- .github/pages-index.html.in | 5 ++-- .github/scripts/makeindex.sh | 2 -- .github/scripts/makeversions.sh | 26 ++++++++-------- .github/workflows/ci_redirectioncheck.yml | 24 +++++++++++++++ doc/emmodoc/classes.md | 4 +-- 6 files changed, 66 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/ci_redirectioncheck.yml diff --git a/.github/expected_redirections.yaml b/.github/expected_redirections.yaml index 8706b7bd..15d1ebbe 100644 --- a/.github/expected_redirections.yaml +++ b/.github/expected_redirections.yaml @@ -10,30 +10,44 @@ redirections: # EMMO + https://w3id.org/emmo#EMMO_297999d6_c9e4_4262_9536_bd524d1c6e21: https://emmo-repo.github.io/emmo.ttl#EMMO_297999d6_c9e4_4262_9536_bd524d1c6e21 # ttl file because tests are not from a browser + https://w3id.org/emmo: https://emmo-repo.github.io/emmo.ttl # ttl file because tests are not from a browser https://w3id.org/emmo/inferred: https://emmo-repo.github.io/emmo-inferred.ttl - https://w3id.org/emmo/dev: https://emmo-repo.github.io/development/emmo.ttl - https://w3id.org/emmo/dev-inferred: https://emmo-repo.github.io/development/emmo-inferred.ttl https://w3id.org/emmo/1.0.0-beta4: https://emmo-repo.github.io/versions/1.0.0-beta4/emmo.ttl https://w3id.org/emmo/1.0.0-beta4/inferred: https://emmo-repo.github.io/versions/1.0.0-beta4/emmo-inferred.ttl https://w3id.org/emmo/1.0.0-beta5: https://emmo-repo.github.io/versions/1.0.0-beta5/emmo.ttl - https://w3id.org/emmo/: https://raw.githubusercontent.com/emmo-repo/EMMO/master/emmo.ttl + #https://w3id.org/emmo/: https://raw.githubusercontent.com/emmo-repo/EMMO/master/emmo.ttl https://w3id.org/emmo/1.0.0-beta5/: https://raw.githubusercontent.com/emmo-repo/EMMO/1.0.0-beta5/emmo.ttl https://w3id.org/emmo/1.0.0-beta5/mereocausality: https://raw.githubusercontent.com/emmo-repo/EMMO/1.0.0-beta5/mereocausality/mereocausality.ttl https://w3id.org/emmo/1.0.0-beta5/perspectives: https://raw.githubusercontent.com/emmo-repo/EMMO/1.0.0-beta5/perspectives/perspectives.ttl https://w3id.org/emmo/1.0.0-beta5/multiperspective: https://raw.githubusercontent.com/emmo-repo/EMMO/1.0.0-beta5/multiperspective/multiperspective.ttl https://w3id.org/emmo/1.0.0-beta5/disciplines: https://raw.githubusercontent.com/emmo-repo/EMMO/1.0.0-beta5/disciplines/disciplines.ttl - https://w3id.org/emmo/1.0.0-beta5/disciplines/units: https://raw.githubusercontent.com/emmo-repo/EMMO/1.0.0-beta5/disciplines/disciplines/units.ttl - https://w3id.org/emmo/master: https://raw.githubusercontent.com/emmo-repo/EMMO/master/emmo.ttl - https://w3id.org/emmo/master/: https://raw.githubusercontent.com/emmo-repo/EMMO/master/emmo.ttl + https://w3id.org/emmo/1.0.0-beta5/disciplines/units: https://raw.githubusercontent.com/emmo-repo/EMMO/1.0.0-beta5/disciplines/units/units.ttl https://w3id.org/emmo/source: https://raw.githubusercontent.com/emmo-repo/EMMO/master/emmo.ttl https://w3id.org/emmo/source/: https://raw.githubusercontent.com/emmo-repo/EMMO/master/emmo.ttl - https://w3id.org/emmo/perspectives/data: https://raw.githubusercontent.com/emmo-repo/EMMO/master/perspectives/data.ttl - https://w3id.org/emmo/perspectives/data/: https://raw.githubusercontent.com/emmo-repo/EMMO/master/perspectives/data.ttl + https://w3id.org/emmo/latest: https://raw.githubusercontent.com/emmo-repo/EMMO/master/emmo.ttl + https://w3id.org/emmo/latest/: https://raw.githubusercontent.com/emmo-repo/EMMO/master/emmo.ttl + #https://w3id.org/emmo/perspectives/data: https://raw.githubusercontent.com/emmo-repo/EMMO/master/perspectives/data.ttl + #https://w3id.org/emmo/perspectives/data/: https://raw.githubusercontent.com/emmo-repo/EMMO/master/perspectives/data.ttl https://w3id.org/emmo/1.0.0-beta5/perspectives/data: https://raw.githubusercontent.com/emmo-repo/EMMO/1.0.0-beta5/perspectives/data.ttl - https://w3id.org/emmo/1.0.0-beta5/perspectives/data/: https://raw.githubusercontent.com/emmo-repo/EMMO/1.0.0-beta5/perspectives/data.ttl + #https://w3id.org/emmo/1.0.0-beta5/perspectives/data/: https://raw.githubusercontent.com/emmo-repo/EMMO/1.0.0-beta5/perspectives/data.ttl + + + # Electrochemistry + #https://w3id.org/emmo/domain/electrochemistry#electrochemistry_b6319c74_d2ce_48c0_a75a_63156776b302: https://emmo-repo.github.io/domain-electrochemistry/electrochemistry.ttl#electrochemistry_b6319c74_d2ce_48c0_a75a_63156776b302 + + #https://w3id.org/emmo/domain/electrochemistry: https://emmo-repo.github.io/domain-electrochemistry/electrochemistry.ttl + https://w3id.org/emmo/domain/electrochemistry/: https://raw.githubusercontent.com/emmo-repo/domain-electrochemistry/master/electrochemistry.ttl + # Battery - https://w3id.org/emmo/domain/battery#battery_50b911f7_c903_4700_9764_c308d8a95470: https://emmo-repo.github.io/domain-battery.ttl - https://w3id.org/emmo/domain/battery: https://emmo-repo.github.io/domain-battery.ttl + #https://w3id.org/emmo/domain/battery#battery_50b911f7_c903_4700_9764_c308d8a95470: https://emmo-repo.github.io/domain-battery/battery.ttl + + #https://w3id.org/emmo/domain/battery: https://emmo-repo.github.io/domain-battery.ttl + https://w3id.org/emmo/domain/battery/: https://raw.githubusercontent.com/emmo-repo/domain-battery/master/battery.ttl + https://w3id.org/emmo/domain/battery/source: https://raw.githubusercontent.com/emmo-repo/domain-battery/master/battery.ttl + https://w3id.org/emmo/domain/battery/source/: https://raw.githubusercontent.com/emmo-repo/domain-battery/master/battery.ttl + https://w3id.org/emmo/domain/battery/latest: https://raw.githubusercontent.com/emmo-repo/domain-battery/master/battery.ttl + https://w3id.org/emmo/domain/battery/latest/: https://raw.githubusercontent.com/emmo-repo/domain-battery/master/battery.ttl diff --git a/.github/pages-index.html.in b/.github/pages-index.html.in index 5c5a9236..0942e62f 100644 --- a/.github/pages-index.html.in +++ b/.github/pages-index.html.in @@ -55,9 +55,8 @@ ${versions} 1. - With "compacted ontology", we here mean that all - the top and middle level modules are joint together into a single - file with no imports. + "Compacted ontology" means that all the top and middle level modules + are joint together into a single file with no imports. diff --git a/.github/scripts/makeindex.sh b/.github/scripts/makeindex.sh index ec38ef69..d5ec2e0b 100755 --- a/.github/scripts/makeindex.sh +++ b/.github/scripts/makeindex.sh @@ -61,8 +61,6 @@ while read version name; do tdlink $d/emmo.ttl $version $l/emmo.ttl >> "$tmpfile" tdlink $d/emmo-inferred.owl $version $l/emmo-inferred.owl >> "$tmpfile" tdlink $d/emmo-inferred.ttl $version $l/emmo-inferred.ttl >> "$tmpfile" - tdlink $d/emmo-renamed.owl $version $l/emmo-renamed.owl >> "$tmpfile" - tdlink $d/emmo-renamed.ttl $version $l/emmo-renamed.ttl >> "$tmpfile" tdlink $d/emmo.html $version $l/emmo.html >> "$tmpfile" tdlink $d/emmo.pdf $version $l/emmo.pdf >> "$tmpfile" echo " " >> "$tmpfile" diff --git a/.github/scripts/makeversions.sh b/.github/scripts/makeversions.sh index b3a0d006..5bbfb1bb 100755 --- a/.github/scripts/makeversions.sh +++ b/.github/scripts/makeversions.sh @@ -14,7 +14,7 @@ set -e rootdir="$(git rev-parse --show-toplevel)" -remote=$(git remote -v | awk '{print $2; exit}') +remote=$(git remote -v | awk '/^origin/ {print $2; exit}') ghdir="$rootdir/.github" pagesdir="$ghdir/pages" scriptsdir="$ghdir/scripts" @@ -83,35 +83,35 @@ while read version name; do else echo "missing source in EMMO $version" >&2; exit 1 fi - ontoconvert "$src" "$d/emmo.owl" -s -a - ontoconvert "$src" "$d/emmo.ttl" -s -a + ontoconvert -saw "$src" "$d/emmo.owl" + ontoconvert -saw "$src" "$d/emmo.ttl" fi # Generate inferred ontology - if $remake || [ ! -f "$d/emmo-inferred.owl" ]; then + if $remake || [ ! -f "$d/emmo-inferred.ttl" ]; then echo "Generate inferred ontology" - ontoconvert "$d/emmo.owl" "$d/emmo-inferred.owl" \ - -i HermiT -b http://emmo.info/emmo-inferred + #ontoconvert -i HermiT -wsa "$d/emmo.ttl" "$d/emmo-inferred.ttl" + ontoconvert -w -i HermiT "$d/emmo.ttl" "$d/emmo-inferred.ttl" fi - if $remake || [ ! -f "$d/emmo-inferred.ttl" ]; then - ontoconvert "$d/emmo-inferred.owl" "$d/emmo-inferred.ttl" + if $remake || [ ! -f "$d/emmo-inferred.owl" ]; then + ontoconvert -w "$d/emmo-inferred.ttl" "$d/emmo-inferred.owl" fi # Generate renamed ontology if $remake || [ ! -f "$d/emmo-renamed.owl" ]; then echo "Generate renamed ontology" - ontoconvert "$d/emmo-inferred.owl" "$d/emmo-renamed.owl" \ - -s -a -R -b http://emmo.info/emmo-renamed || true + ontoconvert "$d/emmo-inferred.ttl" "$d/emmo-renamed.owl" \ + -w -R -b http://emmo.info/emmo-renamed || true fi if $remake || [ ! -f "$d/emmo-renamed.ttl" ]; then - ontoconvert "$d/emmo-inferred.owl" "$d/emmo-renamed.ttl" \ - -s -a -R -b http://emmo.info/emmo-renamed || true + ontoconvert "$d/emmo-inferred.ttl" "$d/emmo-renamed.ttl" \ + -w -R -b http://emmo.info/emmo-renamed || true fi # Generate documentation if $remake || [ ! -f "$d/emmo.html" ]; then echo "Generate documentation" - "$scriptsdir/makedoc.sh" "$d/emmo-inferred.owl" $version "$d" \ + "$scriptsdir/makedoc.sh" "$d/emmo-inferred.ttl" $version "$d" \ || true fi diff --git a/.github/workflows/ci_redirectioncheck.yml b/.github/workflows/ci_redirectioncheck.yml new file mode 100644 index 00000000..08196828 --- /dev/null +++ b/.github/workflows/ci_redirectioncheck.yml @@ -0,0 +1,24 @@ +name: Check conventions +on: [push] + +jobs: + + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Python 3.11 + uses: actions/setup-python@v5 + with: + python-version: 3.11 + + - name: Install EMMOntoPy + run: | + pip install --upgrade pip + pip install EMMOntoPy + + - name: Check redirections + run: | + redirectioncheck .github/expected_redirections.yaml diff --git a/doc/emmodoc/classes.md b/doc/emmodoc/classes.md index 853c5706..c9c9f843 100644 --- a/doc/emmodoc/classes.md +++ b/doc/emmodoc/classes.md @@ -74,7 +74,7 @@ branch of mereotopology. -%BRANCHDOC PhysicalDimension rankdir=RL +%% %BRANCHDOC PhysicalDimension rankdir=RL %BRANCHDOC PhysicalQuantity %BRANCHDOC StandardizedPhysicalQuantity %BRANCHDOC CategorizedPhysicalQuantity @@ -92,7 +92,7 @@ branch of mereotopology. %BRANCHDOC Process -%BRANCHDOC Physicalistic +%% %BRANCHDOC Physicalistic %BRANCHDOC ElementaryParticle %BRANCHDOC Matter %BRANCHDOC Fluid From 75529cfa23a43c8c63152ddcf70f4b4c07d3b546 Mon Sep 17 00:00:00 2001 From: Jesper Friis Date: Mon, 12 Feb 2024 22:52:58 +0100 Subject: [PATCH 5/7] Corrected title of ci_redirectioncheck --- .github/workflows/ci_redirectioncheck.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci_redirectioncheck.yml b/.github/workflows/ci_redirectioncheck.yml index 08196828..b3a35f72 100644 --- a/.github/workflows/ci_redirectioncheck.yml +++ b/.github/workflows/ci_redirectioncheck.yml @@ -1,4 +1,4 @@ -name: Check conventions +name: Check redirections on: [push] jobs: From 138b0753c0c8f2e0b2a7deab0f4d075b05d31267 Mon Sep 17 00:00:00 2001 From: Jesper Friis Date: Mon, 12 Feb 2024 23:51:41 +0100 Subject: [PATCH 6/7] Added stable as label for latest stable ontology. --- .github/ABOUT.md | 2 +- .github/pages-index.html.in | 19 ++++++++++++------- .github/scripts/makeversions.sh | 10 +++++----- .github/versions.txt | 2 +- 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/ABOUT.md b/.github/ABOUT.md index f74d3cbf..8a05690c 100644 --- a/.github/ABOUT.md +++ b/.github/ABOUT.md @@ -37,7 +37,7 @@ Directory content The format is simple - each line starts with a version number. Optionally it may be followed by label indicating the - status. Use either "unstable" or "latest" or leave it out as + status. Use either "development" or "stable" or leave it out as default. diff --git a/.github/pages-index.html.in b/.github/pages-index.html.in index 0942e62f..336b1c37 100644 --- a/.github/pages-index.html.in +++ b/.github/pages-index.html.in @@ -18,7 +18,7 @@
-

Elementary Multiperspective Material Ontology (EMMO)

+

The Elementary Multiperspective Material Ontology (EMMO)

The Elementary Multiperspective Material Ontology (EMMO) is the result of a multidisciplinary effort within the EMMC, aimed at the development of a standard representational ontology framework based on current materials modelling and characterization knowledge. Instead of starting from general upper level concepts, as done by other ontologies, the EMMO development started from the very bottom level, using the actual picture of the physical world coming from applied sciences, and in particular from physics and material sciences. @@ -37,8 +37,8 @@ The EMMO has grown from the bottom (i.e. scientific application field) to the to - Compacted1 ontology - Inferred ontology (compacted1) + Compacted ontology1 + Inferred ontology2 Documentation @@ -54,10 +54,15 @@ The EMMO has grown from the bottom (i.e. scientific application field) to the to ${versions} -1. - "Compacted ontology" means that all the top and middle level modules - are joint together into a single file with no imports. - + +
+ 1 + Compacted ontology means that all modules have been squashed together into a single file with no imports. + Also, rdfs:isDefinedBy annotations referring to the original module IRI have been added. +
+ 2 + Inferred ontology is reasoned and compacted. +
diff --git a/.github/scripts/makeversions.sh b/.github/scripts/makeversions.sh index 5bbfb1bb..15e2ffac 100755 --- a/.github/scripts/makeversions.sh +++ b/.github/scripts/makeversions.sh @@ -115,12 +115,12 @@ while read version name; do || true fi - # Create symlinks + # Create stable versions cd "$pagesdir" - if [ ! -z "$name" ]; then - rm -f $name - ln -sf versions/$version $name + if [ "$name" = "stable" ]; then + cp $d/*.ttl *.owl . fi + done < "$ghdir/versions.txt" @@ -130,5 +130,5 @@ if [ -d "$tmpdir" ]; then fi -# Make sure that we exit with non-zero +# Make sure that we exit with zero on success exit 0 diff --git a/.github/versions.txt b/.github/versions.txt index 76b49fa5..07cf01a3 100644 --- a/.github/versions.txt +++ b/.github/versions.txt @@ -1,5 +1,5 @@ 1.0.0-beta5 development -1.0.0-beta4 +1.0.0-beta4 stable 1.0.0-beta3 1.0.0-beta2 1.0.0-beta From cb74ef57b2d423ce40051cf6a79d0b7390cc2161 Mon Sep 17 00:00:00 2001 From: Jesper Friis Date: Tue, 13 Feb 2024 08:43:27 +0100 Subject: [PATCH 7/7] Bug fixes --- .github/scripts/makeversions.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/scripts/makeversions.sh b/.github/scripts/makeversions.sh index 15e2ffac..3c36a62c 100755 --- a/.github/scripts/makeversions.sh +++ b/.github/scripts/makeversions.sh @@ -98,15 +98,15 @@ while read version name; do fi # Generate renamed ontology - if $remake || [ ! -f "$d/emmo-renamed.owl" ]; then - echo "Generate renamed ontology" - ontoconvert "$d/emmo-inferred.ttl" "$d/emmo-renamed.owl" \ - -w -R -b http://emmo.info/emmo-renamed || true - fi - if $remake || [ ! -f "$d/emmo-renamed.ttl" ]; then - ontoconvert "$d/emmo-inferred.ttl" "$d/emmo-renamed.ttl" \ - -w -R -b http://emmo.info/emmo-renamed || true - fi + #if $remake || [ ! -f "$d/emmo-renamed.owl" ]; then + # echo "Generate renamed ontology" + # ontoconvert "$d/emmo-inferred.ttl" "$d/emmo-renamed.owl" \ + # -w -R -b http://emmo.info/emmo-renamed || true + #fi + #if $remake || [ ! -f "$d/emmo-renamed.ttl" ]; then + # ontoconvert "$d/emmo-inferred.ttl" "$d/emmo-renamed.ttl" \ + # -w -R -b http://emmo.info/emmo-renamed || true + #fi # Generate documentation if $remake || [ ! -f "$d/emmo.html" ]; then @@ -118,7 +118,7 @@ while read version name; do # Create stable versions cd "$pagesdir" if [ "$name" = "stable" ]; then - cp $d/*.ttl *.owl . + cp $d/*.ttl $d/*.owl . fi done < "$ghdir/versions.txt"