Skip to content

Commit

Permalink
Merge pull request #5 from codeperfectplus/v1.0.0
Browse files Browse the repository at this point in the history
V1.0.0
  • Loading branch information
codeperfectplus authored Jun 1, 2024
2 parents 8f04432 + 0641437 commit 6f1d17f
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 15 deletions.
35 changes: 35 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from datetime import datetime

project = 'Validation.py'
project = 'Sanatio'
author = 'Deeapk Raj'
release = '1.0.0'

Expand All @@ -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

Expand Down
3 changes: 0 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
39 changes: 33 additions & 6 deletions docs/introduction.rst
Original file line number Diff line number Diff line change
@@ -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
```







2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-Levenshtein==0.20.8
python-Levenshtein==0.25.1
3 changes: 3 additions & 0 deletions sanatio/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from sanatio.main import Validator

__all__ = ['Validator']
Empty file added sanatio/utils/__init__.py
Empty file.
Empty file.
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -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="[email protected]",
description="",
Expand Down

0 comments on commit 6f1d17f

Please sign in to comment.