diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..44aaa0b --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,35 @@ +# Read the Docs configuration file for Sphinx projects +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Set the OS, Python version and other tools you might need +build: + os: ubuntu-22.04 + tools: + python: "3.12" + # You can also specify other tool versions: + # nodejs: "20" + # rust: "1.70" + # golang: "1.20" + +# Build documentation in the "docs/" directory with Sphinx +sphinx: + configuration: docs/conf.py + # You can configure Sphinx to use a different builder, for instance use the dirhtml builder for simpler URLs + # builder: "dirhtml" + # Fail on all warnings to avoid broken references + # fail_on_warning: true + +# Optionally build your docs in additional formats such as PDF and ePub +formats: + - pdf + - epub + +# Optional but recommended, declare the Python requirements required +# to build your documentation +# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html +python: + install: + - requirements: docs/requirements.txt \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 09ea4a4..8a341ac 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,6 +1,6 @@ from datetime import datetime -project = 'Validation.py' +project = 'Sanatio' author = 'Deeapk Raj' release = '1.0.0' @@ -14,7 +14,7 @@ pdf_documents = [('index', u'documentation', 'My Docs', u'Me'), ] -releases_github_path = "Py-Contributors/validator.py" +releases_github_path = "codeperfectplus/Sanatio" autosectionlabel_prefix_document = True diff --git a/docs/index.rst b/docs/index.rst index 1eb1f9b..e8227f6 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -3,9 +3,6 @@ Welcome to Validator.py's documentation! ===================================== -Documentation for the Morse code library is in the works. it will be available soon. - -Contribute to Morse documentation on GitHub check out the source code for this documentation. .. toctree:: :maxdepth: 2 diff --git a/docs/introduction.rst b/docs/introduction.rst index ca4a994..5e01c0d 100644 --- a/docs/introduction.rst +++ b/docs/introduction.rst @@ -1,11 +1,38 @@ Introduction ============ -This project is python port of Validator.js which is a library for string validation. -So people who are familiar with Validator.js can easily switch to this library. -It is also a good way to learn how to port a library from one language to another. -I have tried to keep the code as similar as possible to the original library. -if you find any bugs or have any suggestions please open an issue. -if you want to contribute please open a pull request. +This project is inspired from Validator.js which is a library for string validation. +So people who are familiar with Validator.js can easily switch to this library. + +This library is written in pure python and is very easy to use. +It is a simple library that can be used to validate strings, documents, emails, dates, urls, domain names, etc. + +Installation +============ + +To install the library, you can use pip: + +```bash +pip install sanatio +``` + +Usage +===== + +```python +from sanatio import Validator +val = Validator() + + +# Check if the string is equal to the given value + +```python +val.equals("abc", "abc") # True +``` + + + + + diff --git a/requirements.txt b/requirements.txt index b988673..4974856 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -python-Levenshtein==0.20.8 \ No newline at end of file +python-Levenshtein==0.25.1 diff --git a/sanatio/__init__.py b/sanatio/__init__.py index e69de29..bfe2dc1 100644 --- a/sanatio/__init__.py +++ b/sanatio/__init__.py @@ -0,0 +1,3 @@ +from sanatio.main import Validator + +__all__ = ['Validator'] \ No newline at end of file diff --git a/sanatio/utils/__init__.py b/sanatio/utils/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/sanatio/utils/checksum_algorithms/__init__.py b/sanatio/utils/checksum_algorithms/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/setup.py b/setup.py index 5683ce4..10df53d 100644 --- a/setup.py +++ b/setup.py @@ -1,15 +1,15 @@ import setuptools from glob import glob -with open("README.md", "r") as fh: - long_description = fh.read() +with open("README.md", "rb") as fh: + long_description = fh.read().decode("utf-8") with open("requirements.txt", "r") as fh: requirements = fh.read().splitlines() setuptools.setup( name="Sanatio", - version="0.0.1", + version="1.0.0", author="Deepak Raj", author_email="deepak008@live.com", description="",