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

Adds a feature of dimension anotations #202

Merged
merged 9 commits into from
Oct 1, 2024
Merged

Adds a feature of dimension anotations #202

merged 9 commits into from
Oct 1, 2024

Conversation

tpluscode
Copy link
Contributor

This will add annotations, as required to achieve the functionality of targets or limits.

cc @kronmar

Copy link

changeset-bot bot commented Sep 24, 2024

🦋 Changeset detected

Latest commit: a3575ad

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
cube-link Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

meta/core.md Outdated Show resolved Hide resolved
@tpluscode tpluscode marked this pull request as ready for review September 27, 2024 08:05
meta:annotationContext
[
sh:path <year> ;
sh:minInclusive <https://ld.admin.ch/time/year/2020> ;
Copy link
Contributor

Choose a reason for hiding this comment

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

why two lower bounds?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's a test cases which should fail

Copy link
Contributor

Choose a reason for hiding this comment

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

ah, I see, to check they are not accepted :-)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to make this even more accurate but I seem to have hit a limitation of shat SHACL can do when there are multiple properties with same value. I failed to make a validation to catch for example

 sh:minInclusive <https://ld.admin.ch/time/year/2020>
 sh:minExclusive <https://ld.admin.ch/time/year/2020>

Comment on lines +135 to +136
In case of temporal dimensions, the constraint values are expected to be literals with datatypes `xsd:date`,
`xsd:dateTime` or `xsd:gYear`, or the IRIs of [temporal entities](https://lindas.admin.ch/governance/core-entities/).
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I could not find a simple enough way to include this in the validation shape

meta:annotationContext
[
sh:path <year> ;
sh:minInclusive <https://ld.admin.ch/time/year/2020> ;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to make this even more accurate but I seem to have hit a limitation of shat SHACL can do when there are multiple properties with same value. I failed to make a validation to catch for example

 sh:minInclusive <https://ld.admin.ch/time/year/2020>
 sh:minExclusive <https://ld.admin.ch/time/year/2020>

Comment on lines +289 to +295
[
sh:property
[
sh:path [ sh:inversePath meta:annotationContext ] ;
sh:minCount 1
]
]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did not define a class for the annotation context so this is needed to distinguish them from actual key dimension because sh:path/^sh:path will find both. Would not have been needed if we used a different property to refer to the dimension in annotation context.

Base automatically changed from error-margin-validation to main September 30, 2024 10:17
@tpluscode tpluscode merged commit a6ae0bc into main Oct 1, 2024
25 checks passed
@tpluscode tpluscode deleted the targets-limits branch October 1, 2024 07:49
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