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

Fix missing SHACL relations #659

Merged
merged 4 commits into from
Jul 26, 2024
Merged

Fix missing SHACL relations #659

merged 4 commits into from
Jul 26, 2024

Conversation

cristianvasquez
Copy link
Contributor

@cristianvasquez cristianvasquez commented Jul 18, 2024

Hi, this pull request adds missing SHACL relations and filters out external vocabulary definitions.

Please review, there might be mistakes.

An Owl fix will be in place next week in a different branch.

@andreea-pasare
Copy link
Collaborator

This PR filters out external vocabulary definitions which it was agreed that it will be implemented in the next major release, ePO 5.0.0. For ePO 4.1.0 we should only add missing SHACL shapes and remove references to missing codelists ("at-voc-new" prefixes).

@cristianvasquez
Copy link
Contributor Author

cristianvasquez commented Jul 22, 2024

Agreed. I'll update

@cristianvasquez
Copy link
Contributor Author

cristianvasquez commented Jul 23, 2024

I misunderstood your comment. You were referring to OWL and not SHACL.

Exporting SHACL shapes of external vocabulary is not desirable, and the SHACL shapes are already being used.

@cristianvasquez
Copy link
Contributor Author

Regarding some elements in the model, such as, Directive 25, Form 20. How are these elements to be interpreted?

@AchillesDougalis
Copy link
Contributor

@cristianvasquez Are you referring to the multiple inheritance of epo:Not- Modification-D25? One is for standard forms, and the other for eForms.

@cristianvasquez
Copy link
Contributor Author

cristianvasquez commented Jul 23, 2024

Hi @AchillesDougalis, I'm referring to the elements depicted as objects in the Conceptual model, the ones that do not have a prefix. Are these describing a data-instance?

From the model, I don't know what they are, so I'm unsure if they should be in the SHACL or not

@andreea-pasare
Copy link
Collaborator

Hi @AchillesDougalis, I'm referring to the elements depicted as objects in the Conceptual model, the ones that do not have a prefix. Are these describing a data-instance?

From the model, I don't know what they are, so I'm unsure if they should be in the SHACL or not

Yes, those are values of the codelists and they are not transformed by model2owl. We included them just for us to have a better perspective.

@cristianvasquez
Copy link
Contributor Author

Thanks @andreea-pasare, I'll remove them from the export.

@andreea-pasare
Copy link
Collaborator

The prefixes used for the shapes in ttl files are different ("a4g_shape") for all modules and it might be misleading. For example, eAccess used to have "acc-shape" and so on.

@cristianvasquez
Copy link
Contributor Author

cristianvasquez commented Jul 24, 2024

Thanks for the comments @andreea-pasare. I've added prefixes and removed at-voc-new

Please indicate if you foresee other changes or if it's ok to merge

cristianvasquez added a commit to OP-TED/epo-tools that referenced this pull request Jul 24, 2024

- Change the way EPO is exported
 - Add skos-in scheme
  -  Temporary SHACL for 4.0.0

OP-TED/ePO#659
@andreea-pasare
Copy link
Collaborator

@cristianvasquez I spotted some new mentions of a4g and a4g-shape:
image
image

Maybe you can do a check for a4g in all committed files. Thanks!

@andreea-pasare
Copy link
Collaborator

I did a comparison in the eContract_shapes.ttl file between a shape that it was removed and added back as modified:
image
image

The best I can do is to review whether the newly added SHACL shapes (see below) in eAccess.ttl file look good:
image

My review is the following:

  • content wise, these 3 shapes look ok, in the sense that the target classes are the expected ones, as well as the cardinalities, the sh:path and the sh:name
  • the naming conventions for the SHACL shapes are different (check first image: comparison in contract file shape)
  • prefixes are different, although I assume the same namespace is behind
  • shacl:targetClass is used instead of sh:class
  • a4g prefix appears again
  • missing sh:sparql property
  • shacl:nodeKind property is additional
  • shacl:name does not start with a capital letter and it has a language tag on it.

I want to mention that not all the bullet points above are necessarily errors, but these are the differences and they may compromise the alignment to the ePO architecture conventions.

As a conclusion, there are way too many changes that are foreseen for a future ePO major release (5.0.0) and I can not give my approval on this PR. It is up to you to decide if this PR can be further merged or not based on my review above. Thank you!

@andreea-pasare
Copy link
Collaborator

Also, the namespaces for cpv and nuts should be manually changed. You can take those from a previous release candidate: 4.1.0-rc.2:
<sh:class rdf:resource="https://data.europa.eu/nuts/scheme/2021"/>
<sh:class rdf:resource="https://data.europa.eu/cpv/cpv"/>
Changes should be reflected in all rdf/ttl shape files where these codelists are referenced.

@cristianvasquez
Copy link
Contributor Author

@andreea-pasare Thank you!, I'll address those changes.

cristianvasquez added a commit to OP-TED/epo-tools that referenced this pull request Jul 26, 2024
refactor: shacl:name has capital letter
refactor: remove a4g PlainLiteral
refactor: remove a4g PlainLiteral
@cristianvasquez
Copy link
Contributor Author

content wise, these 3 shapes look ok, in the sense that the target classes are the expected ones, as well as the cardinalities, the sh:path and the sh:name

This was a bug thanks for spotting it!

the naming conventions for the SHACL shapes are different (check first image: comparison in contract file shape)

prefixes are different, although I assume the same namespace is behind
shacl:targetClass is used instead of sh:class

I've changed the naming convention, sh: is the prefered namespace. thanks!

a4g prefix appears again

I've moved this declaration to be part of each property with plain:literal

shacl:name does not start with a capital letter and it has a language tag on it.

I've changed this one

missing sh:sparql property
shacl:nodeKind property is additional

nodeKind is beneficial. Probably sh:sparql as well, but not mandatory, I've noticed the current version contains strange declarations, which we can review later on.

Example:

sh:sparql [ sh:select "SELECT ?this ?that WHERE { ?this <https://data.europa.eu/a4g/ontology#concernsContractAmendment> ?that . ?that <https://data.europa.eu/a4g/ontology#concernsContractAmendment> ?this .}" ] .

@cristianvasquez cristianvasquez merged commit 02047d0 into develop Jul 26, 2024
@cristianvasquez cristianvasquez deleted the Fix/4.1.0-rc.3-SHACL branch July 26, 2024 12:28
cristianvasquez added a commit to OP-TED/epo-tools that referenced this pull request Jul 26, 2024
* Update shapes, add v4.1.0-rc3
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