RalphTro / epcis-event-hash-generator

ALGORITHM and SOFTWARE PROTOTYPE to uniquely identify/validate the integrity of any EPCIS event through a common, syntax-agnostic approach based on hashing. Takes an EPCIS Document (formatted in either XML or JSON-LD) and returns the corresponding hash value(s).
MIT License
8 stars 4 forks source link

DeprecationWarning from gtin package #52

Closed Echsecutor closed 1 year ago

Echsecutor commented 3 years ago

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.

RalphTro commented 1 year ago

Check whether alternative package is available or issue PR to package or write it ourselves

RalphTro commented 1 year ago

Preference: PR

RalphTro commented 1 year ago

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

Echsecutor commented 1 year ago

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

dakbhavesh commented 1 year ago

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.

RalphTro commented 1 year ago

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:

SSCC, GSRN and GSRN-P follow the same syntax rules though (18 digits), GSIN has 17 digits.

RalphTro commented 1 year ago

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.

image
RalphTro commented 1 year ago

Replaced code