jodal / biip

📦 Biip interprets the data in barcodes.
https://biip.readthedocs.io
Apache License 2.0
44 stars 3 forks source link

Add rcn_verify_variable_measure configuration flag #171

Closed jodal closed 1 year ago

jodal commented 1 year ago

Some German suppliers are known to use the variable measure check digit in the middle of the RCN as an additional product identifier digit. To support products with RCNs constructed in this way, it is necessary to be able to disable variable measure check digit verification.

This PR adds a parameter rcn_verify_variable_measure to all parse functions/methods that can deal with RCNs:

The default value of rcn_verify_variable_measure is True, to preserve existing behavior. This addition is thus backwards compatible for existing users of Biip.

codecov[bot] commented 1 year ago

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage :thumbsup:

Coverage data is based on head (b3e4e4b) compared to base (24a4c29). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #171 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 18 18 Lines 884 886 +2 Branches 137 138 +1 ========================================= + Hits 884 886 +2 ``` | [Impacted Files](https://codecov.io/gh/jodal/biip/pull/171?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stein+Magnus+Jodal) | Coverage Δ | | |---|---|---| | [src/biip/\_parser.py](https://codecov.io/gh/jodal/biip/pull/171/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stein+Magnus+Jodal#diff-c3JjL2JpaXAvX3BhcnNlci5weQ==) | `100.00% <100.00%> (ø)` | | | [src/biip/gs1/\_element\_strings.py](https://codecov.io/gh/jodal/biip/pull/171/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stein+Magnus+Jodal#diff-c3JjL2JpaXAvZ3MxL19lbGVtZW50X3N0cmluZ3MucHk=) | `100.00% <100.00%> (ø)` | | | [src/biip/gs1/\_messages.py](https://codecov.io/gh/jodal/biip/pull/171/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stein+Magnus+Jodal#diff-c3JjL2JpaXAvZ3MxL19tZXNzYWdlcy5weQ==) | `100.00% <100.00%> (ø)` | | | [src/biip/gtin/\_gtin.py](https://codecov.io/gh/jodal/biip/pull/171/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stein+Magnus+Jodal#diff-c3JjL2JpaXAvZ3Rpbi9fZ3Rpbi5weQ==) | `100.00% <100.00%> (ø)` | | | [src/biip/gtin/\_rcn.py](https://codecov.io/gh/jodal/biip/pull/171/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stein+Magnus+Jodal#diff-c3JjL2JpaXAvZ3Rpbi9fcmNuLnB5) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stein+Magnus+Jodal). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stein+Magnus+Jodal)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.