checkdigit
Advanced tools
@@ -52,5 +52,3 @@ # /usr/bin/env python | ||
| data = cleanse(data) | ||
| return ( | ||
| calculate10(data[:9]) == data[-1] | ||
| ) # Determines if calculated Check Digit of the data is the last digit given | ||
| return calculate10(data[:-1]) == data[-1] | ||
@@ -94,3 +92,3 @@ | ||
| data = cleanse(data) | ||
| return calculate13(data[:12]) == data[-1] | ||
| return calculate13(data[:-1]) == data[-1] | ||
@@ -97,0 +95,0 @@ |
@@ -58,3 +58,3 @@ # /usr/bin/env python | ||
| Returns: | ||
| bool: A boolean representing if the check digit validates the data | ||
| bool: A boolean representing whether the check digit validates the data or not | ||
@@ -75,3 +75,3 @@ """ | ||
| Returns: | ||
| str: The missing value that should be where the question mark is | ||
| str: The missing value that should've been where the question mark was | ||
@@ -78,0 +78,0 @@ """ |
@@ -29,6 +29,6 @@ # /usr/bin/env python | ||
| def calculate(data: str) -> str: | ||
| """Calculates UPC Check Digit | ||
| """Calculates UPC Check Digits | ||
| Args: | ||
| data: A string of UPC digit | ||
| data: A string of UPC digits | ||
@@ -42,3 +42,3 @@ Returns: | ||
| def validate(data: str) -> bool: | ||
| """Determines if calculated check digit of the data is the last digit given | ||
| """Determines if the calculated check digit of the data is the last digit given | ||
@@ -49,4 +49,4 @@ Args: | ||
| Returns: | ||
| bool: A boolean representing if the check digit validates the data | ||
| bool: A boolean representing whether the check digit validates the data or not | ||
| """ | ||
| return calculate(data[:11]) == data[-1] | ||
| return calculate(data[:-1]) == data[-1] |
+2
-2
| Metadata-Version: 2.1 | ||
| Name: checkdigit | ||
| Version: 1.0.0a0 | ||
| Version: 0.1 | ||
| Summary: A check digit library for data validation | ||
@@ -45,3 +45,3 @@ Home-page: https://github.com/harens/checkdigit | ||
| Check out the [wiki](https://github.com/harens/checkdigit/wiki) for more details on how to use the library | ||
| Check out the [documentation](https://github.com/harens/checkdigit/wiki) for more details on how to use the library | ||
@@ -48,0 +48,0 @@ ## License |
+1
-1
| [tool.poetry] | ||
| name = "checkdigit" | ||
| version = "1.0.0-alpha.0" | ||
| version = "0.1" | ||
| description = "A check digit library for data validation" | ||
@@ -5,0 +5,0 @@ authors = ["harens <harensdeveloper@gmail.com>"] |
+1
-1
@@ -22,5 +22,5 @@ # checkdigit | ||
| Check out the [wiki](https://github.com/harens/checkdigit/wiki) for more details on how to use the library | ||
| Check out the [documentation](https://github.com/harens/checkdigit/wiki) for more details on how to use the library | ||
| ## License | ||
| This project is licensed under the [GNU General Public License v3.0](https://github.com/harens/checkdigit/blob/master/LICENSE) |
+2
-2
@@ -12,5 +12,5 @@ # -*- coding: utf-8 -*- | ||
| 'name': 'checkdigit', | ||
| 'version': '1.0.0a0', | ||
| 'version': '0.1', | ||
| 'description': 'A check digit library for data validation', | ||
| 'long_description': '# checkdigit\n\nA check digit library for data validation\n \n| Test Status | [](https://github.com/harens/checkdigit/actions) [](https://codecov.io/gh/harens/checkdigit) |\n|:--|:--|\n| __Version Info__ | [](https://pypi.org/project/checkdigit/) [](https://github.com/harens/checkdigit/releases) [](https://pypi.org/project/checkdigit/) |\n| __Code Analysis__ |[](https://codeclimate.com/github/harens/checkdigit) [](https://www.codefactor.io/repository/github/harens/checkdigit)|\n\n## 🔨 Installation\n```shell\npip install checkdigit\n```\nOr download the project [here](https://github.com/harens/checkdigit/archive/master.zip)\n\n## ✨ Features\n\n* Contains various functions relating to __Luhn, ISBN and UPC codes__\n* Extensive __in-code comments and docstrings__ to explain how the functions work\n* Written in __pure Python__ with __no dependencies__ required to run the program\n\nCheck out the [wiki](https://github.com/harens/checkdigit/wiki) for more details on how to use the library\n\n## License\nThis project is licensed under the [GNU General Public License v3.0](https://github.com/harens/checkdigit/blob/master/LICENSE)\n', | ||
| 'long_description': '# checkdigit\n\nA check digit library for data validation\n \n| Test Status | [](https://github.com/harens/checkdigit/actions) [](https://codecov.io/gh/harens/checkdigit) |\n|:--|:--|\n| __Version Info__ | [](https://pypi.org/project/checkdigit/) [](https://github.com/harens/checkdigit/releases) [](https://pypi.org/project/checkdigit/) |\n| __Code Analysis__ |[](https://codeclimate.com/github/harens/checkdigit) [](https://www.codefactor.io/repository/github/harens/checkdigit)|\n\n## 🔨 Installation\n```shell\npip install checkdigit\n```\nOr download the project [here](https://github.com/harens/checkdigit/archive/master.zip)\n\n## ✨ Features\n\n* Contains various functions relating to __Luhn, ISBN and UPC codes__\n* Extensive __in-code comments and docstrings__ to explain how the functions work\n* Written in __pure Python__ with __no dependencies__ required to run the program\n\nCheck out the [documentation](https://github.com/harens/checkdigit/wiki) for more details on how to use the library\n\n## License\nThis project is licensed under the [GNU General Public License v3.0](https://github.com/harens/checkdigit/blob/master/LICENSE)\n', | ||
| 'author': 'harens', | ||
@@ -17,0 +17,0 @@ 'author_email': 'harensdeveloper@gmail.com', |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
54102
-0.08%265
-0.75%