diff --git a/requirements.txt b/requirements.txt index 17a51ec..4c57207 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1 @@ -pandas==1.0.1 ramda==0.5.5 \ No newline at end of file diff --git a/setup.py b/setup.py index 94b0b7e..08e1f81 100644 --- a/setup.py +++ b/setup.py @@ -2,13 +2,13 @@ setup( name = 'validium', # How you named your package folder (MyLib) packages = ['validium'], # Chose the same as "name" - version = '0.1.0', # Start with a small number and increase it with every change you make + version = '0.1.1', # Start with a small number and increase it with every change you make license= 'MIT', # Chose a license from here: https://help.github.com/articles/licensing-a-repository description = 'a utility library for generating chunks of time within a datetime range', # Give a short description about your library author = 'Jason Yung', author_email = 'json.yung@gmail.com', url = 'https://github.com/json2d/validium', # Provide either the link to your github or to your website - download_url = 'https://github.com/json2d/validium/archive/v0.1.0.tar.gz', + download_url = 'https://github.com/json2d/validium/archive/v0.1.1.tar.gz', keywords = ['datetime', 'interval', 'chunks'], # Keywords that define your package best install_requires= [], classifiers=[ diff --git a/tests/units.py b/tests/units.py index 5e4c6ec..f224e72 100644 --- a/tests/units.py +++ b/tests/units.py @@ -10,7 +10,6 @@ import unittest import ramda as R -import pandas as pd import validium as V diff --git a/validium/core.py b/validium/core.py index 07b69fd..c60c267 100644 --- a/validium/core.py +++ b/validium/core.py @@ -1,14 +1,14 @@ class Validator: - def __init__(self, predicate, fail_msg=None): + def __init__(self, predicate, msg=None): assert callable(predicate), "the argument 'predicate' must be callable" - assert fail_msg is None or isinstance(fail_msg, str), "the argument 'fail_msg' must be None or an instance of str" + assert msg is None or isinstance(msg, str), "the argument 'msg' must be None or an instance of str" self.__dict__ = dict( predicate=predicate, - fail_msg=fail_msg, + msg=msg, ) def validate(self, target): - assert self.predicate(target), self.fail_msg \ No newline at end of file + assert self.predicate(target), self.msg \ No newline at end of file