Closed RalphTro closed 1 year ago
reviewed together with @RalphTro
Hi @RalphTro, I have rebased this PRs branch onto the master to resolve merge conflicts. You now may be able to relook at your changes and failing test cases. Please let me know if they are caused by any recent changes merged to the master.
Bhavesh kindly having a look at unit tests (why they are failing right now).
Dear @RalphTro / @Echsecutor,
I checked the version of the GTIN module i.e. 0.1.13
. I replaced it with the latest available version i.e. 1.3.1649173518
however it did not fix the issue. It is still generating the wrong canonicalized URL for sscc identifier.
Is it possible to reach out to David Belais the author of GTIN module for an investigation of the issue?
Module Link: https://pypi.org/project/gtin/0.1.13/
Dear @RalphTro , I see there are multiple independent changes in this PR so to make progress I am going to split this PR into parts so that we can keep the problematic part in isolation and debug it in better way.
Here is the PR for fixing JSON-LD context URLs. It is straight forward and all tests are passing so please review and merge if it looks good to you.
Thanks, Bhavesh
Dear @RalphTro ,
I studied the examples tests/examples/epcisDocWithSensorComponent.jsonld & tests/examples/epcisDocWithSensorComponent.xml to be able to raise a separate PR.
I have the following observations which I thought to confirm with you:
"type": "Angle"
-> to be expanded to https://gs1.org/voc/Angle
"component": "Latitude"
-> to be expanded to https://ref.gs1.org/cbv/Lattitude
I believe, the following entries will be needed in JSON-LD context
{
"cbv": "https://ref.gs1.org/cbv/"
},
{
"gs1": "https://gs1.org/voc/"
}
XML -> component="cbv:Comp-longitude"
JSON-LD -> "component": "Latitude"
Is it safe to assume that we should make the case insensitive expansion to the above values (XML & JSONLD) as follows?
https://ref.gs1.org/cbv/lattitude
as is: component=https://gs1.org/voc/Latitude to be: component=https://ref.gs1.org/cbv/latitude
Clarification of the above will help me prepare a separate PR for this example.
Thanks, Bhavesh
Dear @RalphTro, I have raised PR#92 as a reference for my previous comment.
Looking forward to your views, Bhavesh
Dear @dakbhavesh , Many thanks for looking into this!
As to 1: You are correct. In such a case, both entries need to become part of the JSON-LD context.
As to 2 and 3: I had a conversation about this with Mark some time ago, as there is a discrepancy between what is currently specified in the CBV and the EPCIC/CBV linked data model (-> was added to our to-do list).
In this sense, what is correct is how it is specified in the EPCIS/CBV linked data model, i.e. e.g. "https://ref.gs1.org/cbv/Comp-latitude"
Therefore, as to "Is it safe to assume that we should make the case insensitive expansion to the above values (XML & JSONLD) as follows? https://ref.gs1.org/cbv/lattitude" - it should be https://ref.gs1.org/cbv/Comp-latitude
in both options.
Similarly, values such as gs1:Angle or Angle should be canonicalised to https://www.gs1.org/voc/Angle
(similar to e.g. https://www.gs1.org/voc/Temperature
)
Dear @RalphTro, Can we close this PR (no need to merge .. just close it ;) ) as the changes are already incorporated in PRs #91 & #92? Let me know if I have overlooked any changes to be incorporated in the main.
Sounds good, @dakbhavesh !
And once again - thanks a lot for your support!