From d8ea6ed00bebed150560276f8612623e9441aee3 Mon Sep 17 00:00:00 2001 From: David Linke Date: Wed, 21 Feb 2024 18:15:28 +0100 Subject: [PATCH 1/3] Update workflows to voc4cat-tool 0.8.2 --- .github/workflows/ci-pr.yml | 2 +- .github/workflows/merge.yml | 2 +- .github/workflows/publish.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-pr.yml b/.github/workflows/ci-pr.yml index f5c1278..722ffe4 100644 --- a/.github/workflows/ci-pr.yml +++ b/.github/workflows/ci-pr.yml @@ -59,7 +59,7 @@ jobs: python -m pip install --upgrade pip setuptools wheel # install tagged version - python -m pip install git+https://github.com/nfdi4cat/voc4cat-tool.git@v0.8.1 + python -m pip install git+https://github.com/nfdi4cat/voc4cat-tool.git@v0.8.2 # python -m pip install git+https://github.com/nfdi4cat/voc4cat-tool.git@main # install custom pylode 2.x (adds sorted collections, diff --git a/.github/workflows/merge.yml b/.github/workflows/merge.yml index e37ae19..f42017b 100644 --- a/.github/workflows/merge.yml +++ b/.github/workflows/merge.yml @@ -53,7 +53,7 @@ jobs: python -m pip install --upgrade pip setuptools wheel # install tagged version - python -m pip install git+https://github.com/nfdi4cat/voc4cat-tool.git@v0.8.1 + python -m pip install git+https://github.com/nfdi4cat/voc4cat-tool.git@v0.8.2 # python -m pip install git+https://github.com/nfdi4cat/voc4cat-tool.git@main # install custom pylode 2.x diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 46d1ef7..6d5469f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -53,7 +53,7 @@ jobs: python -m pip install --upgrade pip setuptools wheel # install tagged version - python -m pip install git+https://github.com/nfdi4cat/voc4cat-tool.git@v0.8.1 + python -m pip install git+https://github.com/nfdi4cat/voc4cat-tool.git@v0.8.2 # python -m pip install git+https://github.com/nfdi4cat/voc4cat-tool.git@main # install custom pylode 2.x From b8ecdc3da3ed26ca69e91a7ecb51a8bc97d15cd5 Mon Sep 17 00:00:00 2001 From: David Linke Date: Wed, 21 Feb 2024 21:25:41 +0100 Subject: [PATCH 2/3] Change base-url of biocatalysis-test --- idranges.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/idranges.toml b/idranges.toml index 31c51b3..31657c7 100644 --- a/idranges.toml +++ b/idranges.toml @@ -54,13 +54,13 @@ ror_id = "" [vocabs.biocatalysis_demo] id_length = 7 -permanent_iri_part = "https://example.org/voc4cat_biocatalysis/" +permanent_iri_part = "https://w3id.org/nfdi4cat/voc4cat_biocat" [vocabs.biocatalysis_demo.checks] allow_delete = false [vocabs.biocatalysis_demo.prefix_map] -v4c-bc = "https://example.org/voc4cat_biocatalysis/" +v4c-bc = "https://w3id.org/nfdi4cat/voc4cat_biocat" [[vocabs.biocatalysis_demo.id_range]] first_id = 1 From e12e55f39c9a5e7268cf8e1b8238c32a7921676a Mon Sep 17 00:00:00 2001 From: David Linke Date: Thu, 22 Feb 2024 17:57:31 +0100 Subject: [PATCH 3/3] Add scripts to locally test xlsx & IDrange.toml as in CI --- test_xlsx_locally.bat | 23 +++++++++++++++++++++++ test_xlsx_locally.sh | 22 ++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 test_xlsx_locally.bat create mode 100644 test_xlsx_locally.sh diff --git a/test_xlsx_locally.bat b/test_xlsx_locally.bat new file mode 100644 index 0000000..515db85 --- /dev/null +++ b/test_xlsx_locally.bat @@ -0,0 +1,23 @@ +@echo off +rem This script runs the key steps from the gh-action pipeline locally +rem which may help to spot problems before submitting an exlsx file +rem in a pull request. Using this script is completely optional. +rem Make sure you have voc4cat-tool installed (https://pypi.org/project/voc4cat/) + +rem check inbox file names +voc4cat check --config idranges.toml --logfile outbox/voc4cat.log --ci-pre inbox-excel-vocabs/ vocabularies + +rem check xlsx file(s). If the check fails, write annotated file to outbox. +voc4cat check --config idranges.toml --logfile outbox/voc4cat.log --outdir outbox inbox-excel-vocabs/ + +rem convert file(s) from xlsx in inbox to turtle in outbox +voc4cat convert --config idranges.toml --logfile outbox/voc4cat.log --outdir outbox inbox-excel-vocabs/ + +rem post-convert checks of all ttl file(s) in outbox +voc4cat check --config idranges.toml --logfile outbox/voc4cat.log outbox/ + +rem build HTML documentation +voc4cat docs --logfile outbox/voc4cat.log --force outbox/ + +rem Split vocabulary and merge into vocabulary dir (in PR branch) +voc4cat transform --split --inplace --logfile outbox/voc4cat.log --outdir outbox_new_voc outbox/ diff --git a/test_xlsx_locally.sh b/test_xlsx_locally.sh new file mode 100644 index 0000000..1ed69d9 --- /dev/null +++ b/test_xlsx_locally.sh @@ -0,0 +1,22 @@ +# This script runs the key steps from the gh-action pipeline locally +# which may help to spot problems before submitting an exlsx file +# in a pull request. Using this script is completely optional. +# Make sure you have voc4cat-tool installed (https://pypi.org/project/voc4cat/) + +# check inbox file names +voc4cat check --config idranges.toml --logfile outbox/voc4cat.log --ci-pre inbox-excel-vocabs/ vocabularies + +# check xlsx file(s). If the check fails, write annotated file to outbox. +voc4cat check --config idranges.toml --logfile outbox/voc4cat.log --outdir outbox inbox-excel-vocabs/ + +# convert file(s) from xlsx in inbox to turtle in outbox +voc4cat convert --config idranges.toml --logfile outbox/voc4cat.log --outdir outbox inbox-excel-vocabs/ + +# post-convert checks of all ttl file(s) in outbox +voc4cat check --config idranges.toml --logfile outbox/voc4cat.log outbox/ + +# build HTML documentation +voc4cat docs --logfile outbox/voc4cat.log --force outbox/ + +# Split vocabulary and merge into vocabulary dir (in PR branch) +voc4cat transform --split --inplace --logfile outbox/voc4cat.log --outdir outbox_new_voc outbox/