Skip to content

Commit

Permalink
Accomodate for the new ns file, use make in the github action
Browse files Browse the repository at this point in the history
  • Loading branch information
gkostkowski committed Sep 23, 2024
1 parent ce129be commit 1de5742
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Build and Run Tests
run: mvn clean install
run: make install unit-tests
- name: current dir
run: pwd
- name: current dir
Expand Down
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,17 @@ get-widoco:
######################################################################################
# Download, install saxon, xspec, rdflib and other dependencies
######################################################################################
install: get-saxon get-rdflib get-widoco
install: get-saxon create-virtual-env get-rdflib get-widoco

############################ Main tasks ##############################################
# Run unit_tests
unit-tests:
@make test-prerequisites
@mvn install -Dsaxon.options.enrichedNamespacesPath=${ENRICHED_NAMESPACES_XML_PATH}

test-prerequisites:
@make gen-enriched-ns-file

create-virtual-env:
@python -m venv model2owl-venv

Expand All @@ -84,6 +88,7 @@ create-virtual-env:
# make generate-glossary XMI_INPUT_FILE_PATH=/home/mypc/work/model2owl/eNotice_CM.xml OUTPUT_GLOSSARY_PATH=/home/mypc/work/model2owl/glossary
generate-glossary:
@mkdir -p "${OUTPUT_GLOSSARY_PATH}"
@make gen-enriched-ns-file
@echo Input file path: ${XMI_INPUT_FILE_PATH}
@echo Input file name: ${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}
@cp -rf ./src/static "${OUTPUT_GLOSSARY_PATH}"
Expand All @@ -95,6 +100,7 @@ generate-glossary:

generate-convention-report:
@mkdir -p "${OUTPUT_CONVENTION_REPORT_PATH}"
@make gen-enriched-ns-file
@echo Input file path: ${XMI_INPUT_FILE_PATH}
@echo Input file name: ${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}
@cp -rf ./src/static "${OUTPUT_CONVENTION_REPORT_PATH}"
Expand All @@ -106,6 +112,7 @@ generate-convention-report:

generate-convention-SVRL-report:
@mkdir -p "${OUTPUT_CONVENTION_REPORT_PATH}"
@make gen-enriched-ns-file
@echo Input file path: ${XMI_INPUT_FILE_PATH}
@echo Input file name: ${XMI_INPUT_FILENAME_WITHOUT_EXTENSION}
@cp -rf ./src/static "${OUTPUT_CONVENTION_REPORT_PATH}"
Expand Down Expand Up @@ -180,6 +187,7 @@ merge-xmi:
# make convert-to-turtle ONTOLOGY_FOLDER_PATH=./my-folder
# ONTOLOGY_FOLDER_PATH is the the path to the folder containing .rdf files for converting to turtle or .ttl files to convert to rdf
convert-rdf-to-turtle:
@make gen-enriched-ns-file
@for FILE_PATH in ${RDF_FILELIST}; do \
echo Converting $${FILE_PATH} into Turtle; \
source model2owl-venv/bin/activate; \
Expand Down

0 comments on commit 1de5742

Please sign in to comment.