Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Enumeration Generation Logic in SHACL Artefact #241

Merged
merged 47 commits into from
Feb 5, 2025

Conversation

Dragos0000
Copy link
Collaborator

Fixes the enumeration generation logic in the SHACL artefact by ensuring that the correct configuration parameter is used to control the generation of enumerations rather than enumeration items. Previously, the logic was incorrectly referencing the wrong variable, leading to unintended behaviour. With this fix, enumerations are now properly controlled according to the configuration settings.

gkostkowski and others added 30 commits September 12, 2024 11:20
…Xspec XSL file

Notes:
1. the gen_reports.sh script requires specific versions of
   Xspec and Saxon which are not automatically provided by the existing
configuration scripts.
1. The change incudes 3rd party XSL file with a fix, but it's not integrated
   anyhow, so it requires manual effort to use it.
…ovements in code and fixes in test data

Scope of the changes:
* Added unit tests for 2 functions and 5 templates
* made specification of `f:normaliseURI` function more precise and added a safeguard for unsupported values
* Introducced a new test file with a global variable overwritten for the included test purposes
* Removed trailing spaces in test data (as this was causing some code to fail)
* Fixed a typo
…and retain expected *.ttl files content

`rdfpipe` utility is now used to regenerate *.rdf files what results in the
duplicated imports being discarded. Changes were made in Makefile file and
affects generation of *.rdf artefacts (owl-core, owl-restrictions and shacl
Makefile recipes) as well as conversion of these to TTL format
(convert-rdf-to-turtle). The latter were needed to keep the same TTL output
when using the new *.rdf files.

Scope of the changes:
* New generic convert-between-serialization-formats Makefile recipe
* The existing owl-core, owl-restrictions and shacl Makefile recipes now include an RDF regeneration step
* The existing convert-rdf-to-turtle Makefile recipe now uses the same namespaces that are used for XSLT transformation (test/ePO-default-config/namespaces.xml) to provide rdfpipe with prefixes so the output makes use of compact URIs.
* As the reported issue occurs for EPO v4.2.0 which introduces some new prefixes, these prefixes have also been added to test/ePO-default-config/namespaces.xml so it would be possible to reproduce the fix.
…mprovements to a definition content and format

Generated values of `skos:definition` don't include a connector specification
(like `((org:Organization -> at-voc:main-activity (+epo:hasMainActivity))`)
anymore. As the removed suffix was in some cases what made definitions of a term
different, the need to filter out duplicates arised (what is included in this
change).
Moreover, some minor format improvements has been introduced.
…to depend on the new file

The new XML contains user namespaces (defined in namespaces.xml) and internal
namespaces (such as core-shape). Both model2owl internals and get_namespaces.sh
relies on that file and not on namespaces.xml. Moreover, model2owl internals now
depends on a new template which generates namespaces declarations based on
enriched file which is passed to the XSLT transformation engine as command line
argument. For now, the path of the new XML file is kept in the Makefile, but
this can be further improved in the future (if we come up with application
internal XSL config or other solution).

Scope of changes:
* new XSL file for generation of the enriched namespaces XML file
* unit test for the above XSL file
* project codebase:
  * new function generating namespaces declarations and references to
    `$namespacePrefixes` replaced with `$internalNamespacePrefixes`
* Makefile changes:
  * new recipe
  * existing 3 recipes generating *.rdf artefacts now include generation of the
    new XML file
  * required adjustments
* Adjustments in the get_namespaces.sh script
Enable code coverage reports, implement new unit tests, minor improvements in code and fixes in test data
… pass new namespaces file as a parameter for the rest of xslt transformation recipes in the project
Document use of the new `NAMESPACES_USER_XML_FILE_PATH` variable.
Any recipe without a docstring (comment documenting its use) that
uses the new variable now got a description.
Add or modify Makefile recipes to enable regeneration of *.rdf files and retain expected *.ttl files content
Improve camelCase into words functionality in model2owl
Accept alternative URIs of the supported UML versions
…SHACL shapes

This was requested in #219
The extension is configurable and can be disabled (it's enabled by default).

Scope:
* implementation
* new configuration parameter
* tests
Support translation of rdf:PlainLiteral to alternative properties in SHACL shapes
@Dragos0000 Dragos0000 merged commit 566b5ab into master Feb 5, 2025
2 checks passed
@Dragos0000 Dragos0000 deleted the feature/M2O2-14 branch February 5, 2025 15:42
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.

2 participants