From c6c738559b48b7c5f82c71bd3f161f960077d4c8 Mon Sep 17 00:00:00 2001 From: Deepak Raj <54245038+codePerfectPlus@users.noreply.github.com> Date: Fri, 18 Nov 2022 09:09:41 +0530 Subject: [PATCH] :bookmar: releasing 0.0.1 pre release: --- README.md | 24 +++++++----------------- {src => sanatio}/__init__.py | 0 {src => sanatio}/assets/country.json | 0 {src => sanatio}/assets/regex.json | 0 {src => sanatio}/main.py | 2 +- {src => sanatio}/utils.py | 2 +- scripts/test_release.sh | 2 +- setup.py | 5 ++++- tests/credit_card_test.py | 2 +- tests/date_test.py | 2 +- tests/document/driving_license_test.py | 2 +- tests/document/license_plate_test.py | 2 +- tests/document/mobilephone_test.py | 2 +- tests/document/passport_test.py | 2 +- tests/document/postal_code_test.py | 2 +- tests/document/ssn_test.py | 2 +- tests/email_test.py | 2 +- tests/hash_test.py | 2 +- tests/imei_test.py | 2 +- tests/ip_test.py | 2 +- tests/json_test.py | 2 +- tests/lat_long_test.py | 2 +- tests/mac_address_test.py | 2 +- tests/number_test.py | 2 +- tests/password_test.py | 2 +- tests/string_case_test.py | 2 +- tests/string_conversion_test.py | 2 +- tests/username_test.py | 2 +- 28 files changed, 34 insertions(+), 41 deletions(-) rename {src => sanatio}/__init__.py (100%) rename {src => sanatio}/assets/country.json (100%) rename {src => sanatio}/assets/regex.json (100%) rename {src => sanatio}/main.py (99%) rename {src => sanatio}/utils.py (91%) diff --git a/README.md b/README.md index 0b0998b..e42ff66 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,21 @@ -

Validator.py(temp)

+

Sanatio

+Sanatio is a latin word which mean Validation. -Document/String/Number/Date Validator for Python. Highly inspired by [validator.js](https://github.com/validatorjs/validator.js). +Document/String/Number/Date/Email/Username/Password Validator for Python. Inspired by [validator.js](https://github.com/validatorjs/validator.js). ## Installation ```bash -pip install +pip install sanatio ``` ## Documentation Check out the [documentation](https://validator-py.readthedocs.io/en/latest/index.html) for more information. -## Supported Countries - -| Country | Code | Supported | -| --- | --- | --- | -| Afghanistan | AF | ✅ | -| India | IN | ✅ | -| United States | US | ✅ | -| Saudi Arabia | SA | ✅ | -| South Africa | ZA | ✅ | -| United Kingdom | GB | ✅ | -| Singapore | SG | ✅ | -| Pakistan | PK | ✅ | - After the stable release, we will add more countries. +Support us by giving a ⭐️ to this repository and follow us for more updates. +## Roadmap -Support us by giving a ⭐️ to this repository and follow us for more updates. +Check out the [roadmap](https://github.com/py-contributors/sanatio/ROADMAP.MD) for more information. diff --git a/src/__init__.py b/sanatio/__init__.py similarity index 100% rename from src/__init__.py rename to sanatio/__init__.py diff --git a/src/assets/country.json b/sanatio/assets/country.json similarity index 100% rename from src/assets/country.json rename to sanatio/assets/country.json diff --git a/src/assets/regex.json b/sanatio/assets/regex.json similarity index 100% rename from src/assets/regex.json rename to sanatio/assets/regex.json diff --git a/src/main.py b/sanatio/main.py similarity index 99% rename from src/main.py rename to sanatio/main.py index d68f8ca..2a4da33 100644 --- a/src/main.py +++ b/sanatio/main.py @@ -4,7 +4,7 @@ from dateutil.parser import parse from Levenshtein import distance as levenshtein_distance -from src.utils import all_country, regexs +from sanatio.utils import all_country, regexs class Validator(object): """ Validator class for validating the data """ diff --git a/src/utils.py b/sanatio/utils.py similarity index 91% rename from src/utils.py rename to sanatio/utils.py index 7daf579..99a38b8 100644 --- a/src/utils.py +++ b/sanatio/utils.py @@ -3,7 +3,7 @@ import re ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -ASSETS_DIR = os.path.join(ROOT_DIR, 'src/assets') +ASSETS_DIR = os.path.join(ROOT_DIR, 'sanatio/assets') def load_json(filename): diff --git a/scripts/test_release.sh b/scripts/test_release.sh index 494aa62..f4604a2 100644 --- a/scripts/test_release.sh +++ b/scripts/test_release.sh @@ -25,7 +25,7 @@ check_file() { check_command git check_command flake8 check_command twine -check_file setup.py +check_file ./setup.py python3 setup.py sdist bdist_wheel check_directory dist python3 -m twine upload --repository testpypi dist/* diff --git a/setup.py b/setup.py index dc246f8..5683ce4 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ import setuptools +from glob import glob with open("README.md", "r") as fh: long_description = fh.read() @@ -7,7 +8,7 @@ requirements = fh.read().splitlines() setuptools.setup( - name="", + name="Sanatio", version="0.0.1", author="Deepak Raj", author_email="deepak008@live.com", @@ -15,6 +16,7 @@ long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/Py-Contributors/validator.py", + data_files=[('assets', glob('sanatio/assets/*'))], keywords="audiobook", install_requires=requirements, packages=setuptools.find_packages(), @@ -27,4 +29,5 @@ "Operating System :: OS Independent", "Intended Audience :: Developers"], python_requires=">=3.4", + include_package_data=True, ) diff --git a/tests/credit_card_test.py b/tests/credit_card_test.py index 90a664b..887a61f 100644 --- a/tests/credit_card_test.py +++ b/tests/credit_card_test.py @@ -1,7 +1,7 @@ import sys import unittest sys.path.append('.') -from src.main import Validator +from sanatio.main import Validator validator = Validator() diff --git a/tests/date_test.py b/tests/date_test.py index 3c8695f..9e26363 100644 --- a/tests/date_test.py +++ b/tests/date_test.py @@ -2,7 +2,7 @@ import datetime import unittest sys.path.append('.') -from src.main import Validator +from sanatio.main import Validator validator = Validator() diff --git a/tests/document/driving_license_test.py b/tests/document/driving_license_test.py index 675538e..65abdcd 100644 --- a/tests/document/driving_license_test.py +++ b/tests/document/driving_license_test.py @@ -1,7 +1,7 @@ import sys import unittest sys.path.append('.') -from src.main import Validator +from sanatio.main import Validator validator = Validator() diff --git a/tests/document/license_plate_test.py b/tests/document/license_plate_test.py index 8ecd209..c0a08fe 100644 --- a/tests/document/license_plate_test.py +++ b/tests/document/license_plate_test.py @@ -1,7 +1,7 @@ import sys import unittest sys.path.append('.') -from src.main import Validator +from sanatio.main import Validator validator = Validator() diff --git a/tests/document/mobilephone_test.py b/tests/document/mobilephone_test.py index 6279515..a5020eb 100644 --- a/tests/document/mobilephone_test.py +++ b/tests/document/mobilephone_test.py @@ -1,7 +1,7 @@ import sys import unittest sys.path.append('.') -from src.main import Validator +from sanatio.main import Validator validator = Validator() diff --git a/tests/document/passport_test.py b/tests/document/passport_test.py index 07d90a9..7febeeb 100644 --- a/tests/document/passport_test.py +++ b/tests/document/passport_test.py @@ -1,7 +1,7 @@ import sys import unittest sys.path.append('.') -from src.main import Validator +from sanatio.main import Validator validator = Validator() diff --git a/tests/document/postal_code_test.py b/tests/document/postal_code_test.py index 75bd2d7..859e717 100644 --- a/tests/document/postal_code_test.py +++ b/tests/document/postal_code_test.py @@ -1,7 +1,7 @@ import sys import unittest sys.path.append('.') -from src.main import Validator +from sanatio.main import Validator validator = Validator() diff --git a/tests/document/ssn_test.py b/tests/document/ssn_test.py index 58f0e08..d72c8df 100644 --- a/tests/document/ssn_test.py +++ b/tests/document/ssn_test.py @@ -1,7 +1,7 @@ import sys import unittest sys.path.append('.') -from src.main import Validator +from sanatio.main import Validator validator = Validator() diff --git a/tests/email_test.py b/tests/email_test.py index b4eb3f4..afa068a 100644 --- a/tests/email_test.py +++ b/tests/email_test.py @@ -1,7 +1,7 @@ import sys import unittest sys.path.append('.') -from src.main import Validator +from sanatio.main import Validator validator = Validator() diff --git a/tests/hash_test.py b/tests/hash_test.py index 078d1ee..fac4ab5 100644 --- a/tests/hash_test.py +++ b/tests/hash_test.py @@ -1,7 +1,7 @@ import sys import unittest sys.path.append('.') -from src.main import Validator +from sanatio.main import Validator validator = Validator() diff --git a/tests/imei_test.py b/tests/imei_test.py index ef60541..014b14b 100644 --- a/tests/imei_test.py +++ b/tests/imei_test.py @@ -1,7 +1,7 @@ import sys import unittest sys.path.append('.') -from src.main import Validator +from sanatio.main import Validator validator = Validator() diff --git a/tests/ip_test.py b/tests/ip_test.py index 5f35e87..380e7d5 100644 --- a/tests/ip_test.py +++ b/tests/ip_test.py @@ -1,7 +1,7 @@ import sys import unittest sys.path.append('.') -from src.main import Validator +from sanatio.main import Validator validator = Validator() diff --git a/tests/json_test.py b/tests/json_test.py index 0f5e04c..752fabd 100644 --- a/tests/json_test.py +++ b/tests/json_test.py @@ -1,7 +1,7 @@ import sys import unittest sys.path.append('.') -from src.main import Validator +from sanatio.main import Validator validator = Validator() diff --git a/tests/lat_long_test.py b/tests/lat_long_test.py index 71b064e..697eb4c 100644 --- a/tests/lat_long_test.py +++ b/tests/lat_long_test.py @@ -1,7 +1,7 @@ import sys import unittest sys.path.append('.') -from src.main import Validator +from sanatio.main import Validator validator = Validator() diff --git a/tests/mac_address_test.py b/tests/mac_address_test.py index c22c355..c9510b2 100644 --- a/tests/mac_address_test.py +++ b/tests/mac_address_test.py @@ -1,7 +1,7 @@ import sys import unittest sys.path.append('.') -from src.main import Validator +from sanatio.main import Validator validator = Validator() diff --git a/tests/number_test.py b/tests/number_test.py index 7db84d0..2300ebb 100644 --- a/tests/number_test.py +++ b/tests/number_test.py @@ -1,7 +1,7 @@ import sys import unittest sys.path.append('.') -from src.main import Validator +from sanatio.main import Validator validator = Validator() diff --git a/tests/password_test.py b/tests/password_test.py index 6894e5b..4747aaf 100644 --- a/tests/password_test.py +++ b/tests/password_test.py @@ -1,7 +1,7 @@ import sys import unittest sys.path.append('.') -from src.main import Validator +from sanatio.main import Validator validator = Validator() diff --git a/tests/string_case_test.py b/tests/string_case_test.py index 0f5f601..1786251 100644 --- a/tests/string_case_test.py +++ b/tests/string_case_test.py @@ -1,7 +1,7 @@ import sys import unittest sys.path.append('.') -from src.main import Validator +from sanatio.main import Validator validator = Validator() diff --git a/tests/string_conversion_test.py b/tests/string_conversion_test.py index f976d78..2da71b5 100644 --- a/tests/string_conversion_test.py +++ b/tests/string_conversion_test.py @@ -1,7 +1,7 @@ import sys import unittest sys.path.append('.') -from src.main import Validator +from sanatio.main import Validator validator = Validator() diff --git a/tests/username_test.py b/tests/username_test.py index 16f59d1..4281f07 100644 --- a/tests/username_test.py +++ b/tests/username_test.py @@ -1,7 +1,7 @@ import sys import unittest sys.path.append('.') -from src.main import Validator +from sanatio.main import Validator validator = Validator()