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

Update tests for changes in date parsing in new rdflib versions #323

Merged
merged 2 commits into from
Nov 25, 2024

Conversation

amercader
Copy link
Member

Rdflib 7.1.0 introduced changes in [date parsing][1] that made some base profile tests fail. Basically the previous rdflib versions incomplete dates like

<time:inXSDDateTimeStamp
     rdf:datatype="http://www.w3.org/2001/XMLSchema#date">
        1904
</time:inXSDDateTimeStamp>

were expanded to 1904-01-01. Of course this is not a valid date and should be expressed using gYear:

<time:inXSDDateTimeStamp
     rdf:datatype="http://www.w3.org/2001/XMLSchema#gYear">
        1904
</time:inXSDDateTimeStamp>

and we should be expecting 1904.
This should play nice with the time properties we are generating in CKAN as they already handle automatically gYear, gYearMonth, date and dateTime.
Sites importing external DCAT representations that use the wrong encoding might need to check their parsers.

[1] RDFLib/rdflib#2929

Rdflib 7.1 introduced changes in [date parsing][1] that made some base
profile tests fail. Basically the previous rdflib versions incomplete
dates like

    <time:inXSDDateTimeStamp
         rdf:datatype="http://www.w3.org/2001/XMLSchema#date">
            1904
    </time:inXSDDateTimeStamp>

were expanded to `1904-01-01`. Of course this is not a valid date and
should be expressed using `gYear`:

    <time:inXSDDateTimeStamp
         rdf:datatype="http://www.w3.org/2001/XMLSchema#gYear">
            1904
    </time:inXSDDateTimeStamp>

and we should be expecting `1904`.
This should play nice with the time properties we are generating in CKAN as
they already handle automatically `gYear`, `gYearMonth`, `date` and
`dateTime`.
Sites importing external DCAT representations that use the wrong
encoding might need to check their parsers.

[1] RDFLib/rdflib#2929
@amercader amercader merged commit 81a85cc into master Nov 25, 2024
8 checks passed
@amercader amercader deleted the upgrade-rdflib-dates branch November 25, 2024 14:55
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.

1 participant