From 22eff541338f5d1513ac46a19473772ef8ace54d Mon Sep 17 00:00:00 2001 From: Hannah Bast Date: Sat, 19 Oct 2024 17:04:44 +0200 Subject: [PATCH] Add workflow that checks the Qleverfiles (#78) For each of the Qleverfiles in `src/qlever/Qleverfiles`, check whether the main commands (`get-data`, `index`, `start`) work, without executing the command (just do `qlever ... --show`). In particular, this catches if one these Qleverfile cannot be parsed properly. --- .github/workflows/qleverfiles-check.yml | 50 ++++++++++++++++++++ src/qlever/Qleverfiles/Qleverfile.dblp-plus | 4 +- src/qlever/Qleverfiles/Qleverfile.default | 2 +- src/qlever/Qleverfiles/Qleverfile.fbeasy | 8 ++-- src/qlever/Qleverfiles/Qleverfile.freebase | 4 +- src/qlever/Qleverfiles/Qleverfile.osm-planet | 2 +- src/qlever/Qleverfiles/Qleverfile.vvz | 6 +-- src/qlever/Qleverfiles/Qleverfile.yago-4 | 8 ++-- 8 files changed, 67 insertions(+), 17 deletions(-) create mode 100644 .github/workflows/qleverfiles-check.yml diff --git a/.github/workflows/qleverfiles-check.yml b/.github/workflows/qleverfiles-check.yml new file mode 100644 index 00000000..528beb14 --- /dev/null +++ b/.github/workflows/qleverfiles-check.yml @@ -0,0 +1,50 @@ +name: Qleverfiles check + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + merge_group: + +jobs: + qleverfiles-check: + runs-on: ${{matrix.os}} + strategy: + fail-fast: true + matrix: + os: [ubuntu-24.04] + + steps: + - name: Checkout the repository for the qlever script + uses: actions/checkout@v3 + with: + path: qlever-control + + - name: Install the script locally + working-directory: ${{github.workspace}}/qlever-control + run: | + # python3 -m pip install --upgrade pip setuptools wheel + # python3 --version + # pip3 --version + # pip3 show setuptools wheel + pip install -e . + + - name: Check that all the files in `src/qlever/Qleverfiles` parse. + working-directory: ${{github.workspace}}/qlever-control + run: | + for QLEVERFILE in src/qlever/Qleverfiles/Qleverfile.*; do + echo + echo -e "\x1b[1;34mChecking ${QLEVERFILE}\x1b[0m" + echo + NAME=${QLEVERFILE##*.} + rm -f Qleverfile + qlever setup-config $NAME + qlever get-data --show + qlever index --show + qlever start --show + qlever ui --show + echo + echo -e "\x1b[34mAll checks passed for ${QLEVERFILE}\x1b[0m" + echo + done diff --git a/src/qlever/Qleverfiles/Qleverfile.dblp-plus b/src/qlever/Qleverfiles/Qleverfile.dblp-plus index f3ee18da..309cc737 100644 --- a/src/qlever/Qleverfiles/Qleverfile.dblp-plus +++ b/src/qlever/Qleverfiles/Qleverfile.dblp-plus @@ -9,12 +9,12 @@ [data] NAME = dblp-plus GET_DATA_CMD = wget -nc -O dblp.ttl.gz https://dblp.org/rdf/dblp.ttl.gz -INDEX_DESCRIPTION = Publication data from https://dblp.org, with affiliations from https://www.wikidata.org and citations from https://opencitations.net +DESCRIPTION = Publication data from https://dblp.org, with affiliations from https://www.wikidata.org and citations from https://opencitations.net TEXT_DESCRIPTION = All literals, search with FILTER KEYWORDS(?text, "...") [index] INPUT_FILES = dblp.ttl.gz affiliations.nt affiliations.additions.nt citations.nt -CAT_INPUT_FILES = zcat -f ${RDF_FILES} +CAT_INPUT_FILES = zcat -f ${INPUT_FILES} SETTINGS_JSON = { "ascii-prefixes-only": false, "num-triples-per-batch": 1000000, "prefixes-external": [ "