Skip to content

Commit

Permalink
Add scripts to locally test xlsx & IDrange.toml as in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dalito committed Feb 22, 2024
1 parent b8ecdc3 commit e12e55f
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test_xlsx_locally.bat
Original file line number Diff line number Diff line change
@@ -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/
22 changes: 22 additions & 0 deletions test_xlsx_locally.sh
Original file line number Diff line number Diff line change
@@ -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/

0 comments on commit e12e55f

Please sign in to comment.