Closed Echsecutor closed 1 year ago
Check whether alternative package is available or issue PR to package or write it ourselves
Preference: PR
Dear @Echsecutor , I just had a look at the gtin package (https://pypi.org/project/gtin/) and couldn't find a deprecation warning. Can you? It was updated April 2022, so it may be not unlikely that the authors addressed the issue you were referring to back in 2021. WDYT? Kind regards, Ralph
probably we should just update to the latest version of the gtin package.
https://github.com/RalphTro/epcis-event-hash-generator/blob/master/requirements.txt
Dear @Echsecutor / @RalphTro, I have raised an issue on gtin repository as latest version is not generating gtin as expected.
Reference: https://github.com/enorganic/gtin/issues/9
Please feel free to add more examples or behavior with Linux/Windows platform.
Dear @dakbhavesh , Good idea. I created a file accommodating all intance and class level GS1 Keys, see https://github.com/RalphTro/epcis-event-hash-generator/pull/100
My test results:
https://id.gs1.org/402/23459999876541
/40123459999876541
https://id.gs1.org/402/23459999876541
/40123459999876541
https://id.gs1.org/8018/34598765400000
/401234598765400000
https://id.gs1.org/8017/34500000987658
/401234500000987658
SSCC, GSRN and GSRN-P follow the same syntax rules though (18 digits), GSIN has 17 digits.
Dear @dakbhavesh and @Echsecutor ,
Just a brief follow-up to today's call: I may have found the root cause (at least regarding SSCC, the code for the other EPC schemes, i.e. GSRN & Co . seem to be correct); it was indeed caused by the dl_normaliser
module. Have blocked some in the next couple of days and will keep you posted on this subject.
Replaced code
since the inclusion of the dl normalisation, the hashing generator depends on the gtin package which pulls in quite a few more dependencies, one of them being deprecated.
Upgrading the gtin package upstream would be the preferred solution. Otherwise we might have to look into removing the dependency by re-implementing the actually needed functionality.