data61 / Mirza

6 stars 2 forks source link

Ensure identifiers in GS1Combinator library conform to GS1 specifications. #205

Open a-stacey opened 5 years ago

a-stacey commented 5 years ago

There are some new BusinessRegistry tests that are commented out that currently don't pass. We need to fix the errors that cause these tests to fail.

(This will only be relevant once #200 is merged...creating the issue now to track these):

Original Author: sta358

(Moved with github-migration-0.1.0.0 (package github-migration-0.1.0.0 revision df9f38b))

a-stacey commented 5 years ago

Would like to discuss some issues with 1 and 3 with you @mas17k when you get back (whether there are particularly good / easy types to use for 1 and also I believe that @sajidanower23 might have mentioned a good library for testing 3...not sure if there are haskell bindings for it or not).

Hopefully 2 is taken care of by #203.

Will have a look into 4.

Original Author: sta358

a-stacey commented 5 years ago

Here seems to be the relevant part of the standard for the GS1 Company Prefix: https://github.csiro.au/Blockchain/GS1Combinators/blob/e8f8d4f67c8db0d8f9eea18fa5968ad22cf226d8/doc/GS1_General_Specifications.pdf

1.4.4 GS1 Company Prefix A GS1 Company Prefix is a unique string of four to twelve digits used to issue GS1 identification keys. The first digits are a valid GS1 Prefix and the length must be at least one longer than the length of the GS1 Prefix. The GS1 Company Prefix is issued by a GS1 Member Organisation or by GS1 Global Office, is based on a GS1 Prefix allocated to the issuer, and is allocated either to a GS1 Member or to the issuer itself (e.g., for issuing individual identification keys). A GS1 Company Prefix starting with a zero (‘0’) is used to generate GTIN-12s (as well as the other GS1 identification keys). A GS1 Company Prefix starting with a digit other than zero (‘0’) is used to generate GTIN-13s (as well as the other GS1 identification keys). Note: As the GS1 Company Prefix varies in length, the issuance of a GS1 Company Prefix excludes all longer strings that start with the same digits from being issued as GS1 Company Prefixes.

Original Author: sta358

a-stacey commented 5 years ago

243 addresses part 4.

Original Author: sta358