Skip to content

Conversation

@Dragos0000
Copy link
Collaborator

No description provided.

@chatgpt-codex-connector
Copy link

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@Dragos0000 Dragos0000 changed the base branch from master to develop December 1, 2025 12:55
exit 1; \
fi
@if [ -z "${MERGE_OUTPUT_FILE}" ]; then \
cd rdf-differ-ws && PATH="${ABSOLUTE_MODEL2OWL_FOLDER}/jena/apache-jena/bin:$$PATH" bash ./bash/merge-owl-shacl.sh "../${MERGE_ONTOLOGY_FILE}" "../${MERGE_SHAPES_FILE}"; \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cleaner solution would be to define a Make variable for the executable at the top of the script and use it here (in the same way we do it for saxon (${SAXON}).
I mean something like MERGE_OWL_SHACL?=${MODEL2OWL_FOLDER}/....
Also, you can invoke the script directly as it has the bash executable defined: https://github.com/meaningfy-ws/rdf-differ-ws/blob/master/bash/merge-owl-shacl.sh#L1

exit 1; \
fi
@if [ -z "${MERGE_OUTPUT_FILE}" ]; then \
cd rdf-differ-ws && PATH="${ABSOLUTE_MODEL2OWL_FOLDER}/jena/apache-jena/bin:$$PATH" bash ./bash/merge-owl-shacl.sh "../${MERGE_ONTOLOGY_FILE}" "../${MERGE_SHAPES_FILE}"; \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to support the second case of missing MERGE_OUTPUT_FILE (although it won't be triggered unless the user explicitly set the empty value for the variable because we have the default value), then it's a good idea to list the generated file at the end.

@echo "OUTDIR: ${RDF_DIFF_OUTDIR}"
@echo "AP: ${RDF_DIFF_AP}"
@echo "TEMPLATE: ${RDF_DIFF_TEMPLATE}"
@cd rdf-differ-ws && bash ./bash/rdf-differ.sh --old ../${RDF_DIFF_FILE1} --new ../${RDF_DIFF_FILE2} --output ../${RDF_DIFF_OUTDIR} --profile ${RDF_DIFF_AP} --template ${RDF_DIFF_TEMPLATE}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re ../${RDF_DIFF_OUTDIR} and other occurrences: Please don't do this as it's obscure and error-prone. Use variables as-is.

@echo "OUTDIR: ${RDF_DIFF_OUTDIR}"
@echo "AP: ${RDF_DIFF_AP}"
@echo "TEMPLATE: ${RDF_DIFF_TEMPLATE}"
@cd rdf-differ-ws && bash ./bash/rdf-differ.sh --old ../${RDF_DIFF_FILE1} --new ../${RDF_DIFF_FILE2} --output ../${RDF_DIFF_OUTDIR} --profile ${RDF_DIFF_AP} --template ${RDF_DIFF_TEMPLATE}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re the executable: The same comment as in case of the merging script above.

@cd rdf-differ-ws && bash ./bash/rdf-differ.sh --old ../${RDF_DIFF_FILE1} --new ../${RDF_DIFF_FILE2} --output ../${RDF_DIFF_OUTDIR} --profile ${RDF_DIFF_AP} --template ${RDF_DIFF_TEMPLATE}
@echo "🔎 First few lines of the diff report:"
@if [ -f "${RDF_DIFF_OUTDIR}/diff.${RDF_DIFF_TEMPLATE}" ]; then \
head ${RDF_DIFF_OUTDIR}/diff.${RDF_DIFF_TEMPLATE}; \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this? It looks like a debug print to me. You could conditionally print it, controlling it with a new DEBUG or VERBOSE Make variable.

# RDF_DIFF_FILE2: Path to the second RDF file (default: test/diffing-files/ePO_core-4.2.0.ttl)
# RDF_DIFF_OUTDIR: Output directory for diff results (default: ${OUTPUT_FOLDER_PATH}, which is "output")
# RDF_DIFF_AP: Application profile (default: owl-core-en-only)
# RDF_DIFF_TEMPLATE: Output template format (default: html)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's spare the user searching and list the available options here: json, asciidoc, html

# RDF_DIFF_OUTDIR: Output directory for diff results (default: ${OUTPUT_FOLDER_PATH}, which is "output")
# RDF_DIFF_AP: Application profile (default: owl-core-en-only)
# RDF_DIFF_TEMPLATE: Output template format (default: html)
run-rdf-diff: start-rdf-differ-services
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the value in simplifying the actions required from the user, but starting and stopping the services is not suitable in our scenario (model2owl-boilerplate workflow) where we want to execute this command twice (for asciidoc and json). Several options are possible as a solution here, you can consider adding another overarching recipe aggregating the actions, but that one would be for the specific use case (which may not be a bad thing). Alternatively, user would need to execute the sequence of commands manually.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the full workflow is an expensive operation so it would be good to have a recipe to execute diffing once (diff) and then generation of reports (report) twice instead of calling the existing run-rdf-diff recipe twice. See more here: https://github.com/meaningfy-ws/rdf-differ-ws?tab=readme-ov-file#examples

@gkostkowski gkostkowski changed the title Differ functionality Differ functionality (TEDM2O-12) Dec 2, 2025
@Dragos0000 Dragos0000 merged commit a8f4c92 into develop Dec 8, 2025
2 checks passed
@Dragos0000 Dragos0000 deleted the feature/M2O3-54 branch December 8, 2025 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants