7 Commits
Author SHA1 Message Date
bendtherules 46edf10e9d Fixed logo link 1 2015-06-21 21:34:13 +05:30
bendtherules 354ce2e307 Fixed doc link 4 2015-06-21 21:28:31 +05:30
bendtherules 98ebd5b40e Fixed doc link 3 2015-06-21 21:23:53 +05:30
bendtherules c1924f3630 Fixed doc link 2 2015-06-21 21:22:35 +05:30
bendtherules b579683287 Fixed docs link 2015-06-21 21:19:33 +05:30
bendtherules ccdeea9ccf Moved tests + removed extra img 2015-06-21 20:59:55 +05:30
bendtherules 027665d9eb Moved docs + build working 2015-06-21 18:48:28 +05:30
20 changed files with 3186 additions and 33 deletions
+1
View File
@@ -274,3 +274,4 @@ docs/_build/
# PyBuilder
target/
*.pypirc
MANIFEST
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.
-14
View File
@@ -1,14 +0,0 @@
# HumbleMatch
Will **Sanitize your type-checks and duck-checks** for you
Available at [HumbleMatch@pypi]()
## What the heck is it?
HumbleMatch is made to *add a zing* to your mundane type-checking and duck-checking code.
* Check your function arguments reliably, add *more flexible signatures* and most of all, have a lovely API.
* Or just *sprinkle some assert* checks to ensure the data is what you expect it to be at any point.
* Provide helpful debugging errors, *dont just fail with cryptic errors*
@@ -1,13 +1,7 @@
Title: HumbleMatch - Go sanitize your type-checking
Date: 2015-06-19 16:56
Authors: bendtherules
Category: Projects
Tags: HumbleMatch, Launch stuff, Projects
Slug: HumbleMatch_Launch
## Intro
Hi, I am [Abhas](blog.codesp.in) and personally, I love Python mostly for its intuitive, flexible and beautiful API. But some things, I really hate doing. HumbleMatch is my attempt at solving that pain.
Hi, I am [Abhas](http://blog.codesp.in) and personally, I love Python mostly for its intuitive, flexible and beautiful API. But some things, I really hate doing. HumbleMatch is my attempt at solving that pain.
## The Pain Point #1

Before

Width:  |  Height:  |  Size: 521 KiB

After

Width:  |  Height:  |  Size: 521 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

+28
View File
@@ -0,0 +1,28 @@
# HumbleMatch
Will **Sanitize your type-checks and duck-checks** for you
![HumbleMatch logo](./img/logo_medium.png "Yeah, I took that pic :)")
Available at [HumbleMatch@pypi](https://pypi.python.org/pypi/humblematch)
## What the heck is it?
HumbleMatch is made to *add a zing* to your mundane type-checking and duck-checking code.
* Check your function arguments reliably, add *more flexible signatures* and most of all, have a lovely API.
* Or just *sprinkle some assert* checks to ensure the data is what you expect it to be at any point.
* Provide helpful debugging errors, *dont just fail with cryptic errors*
## Impress me
Lets say we want a Point class with two __init__ signatures - `Point(x,y)` and `Point([x,y])`.
Assume its `__init__` signature looks like `def __init__(self, x, y=None)`
This is the only typechecking code you'll need for valid arguments.
from humblematch import w
assert( w([int, int]) == [x, y] or w([[int, int], None]) == [x, y] )
If you like it, please move to the [Tutorials](./tutorial). Its a bit long, but that all the documentation youll need to know.
+2 -1
View File
@@ -109,6 +109,8 @@ save_as in multimatch with list behaviour(done)
Any and OR save_as (done)
name change to humblematch (done)
test if data == Multi branch, raise error doesnt break anything
more docs
@@ -122,4 +124,3 @@ more doctest for other methods and helpers
test helpers
name change to humblematch
File diff suppressed because it is too large Load Diff
@@ -1,4 +1,4 @@
from wrap_obj import WrapObj, Any, OR, w
from humblematch import WrapObj, Any, OR, w
import collections
import pytest
+2
View File
@@ -1,3 +1,5 @@
site_name: HumbleMatch
theme: cerulean
docs_dir: humblematch/docs
-5
View File
@@ -1,5 +0,0 @@
Run doctest -
python -m doctest .\wrap_obj.py
Run py.test-
py.test
+49
View File
@@ -0,0 +1,49 @@
# HumbleMatch
--------------
Will **Sanitize your type-checks and duck-checks** for you
![HumbleMatch logo](http://humblematch.readthedocs.org/en/latest/img/logo_medium.png "Yeah, I took that pic :)")
Available at [HumbleMatch@pypi](https://pypi.python.org/pypi/humblematch)
More Docs at [projects.codesp.in/humblematch](http://humblematch.readthedocs.org/en/latest/)
## What the heck is it?
HumbleMatch is made to *add a zing* to your mundane type-checking and duck-checking code.
* Check your function arguments reliably, add *more flexible signatures* and most of all, have a lovely API.
* Or just *sprinkle some assert* checks to ensure the data is what you expect it to be at any point.
* Provide helpful debugging errors, *dont just fail with cryptic errors*
## Get Running
--------------
### Run doctest -
python -m doctest .\wrap_obj.py
### Run tests-
cd humblematch
py.test
### To build code -
python setup.py sdist bdist_wheel
python setup.py build --plat-name=win-amd64 bdist_wininst
python setup.py build --plat-name=win32 bdist_wininst
### To upload to PYPI-
twine upload dist/*
### To build or serve docs
mkdocs build
or
mkdocs serve
-----
+4 -1
View File
@@ -1,2 +1,5 @@
[metadata]
description-file = README
description-file = readme.md
[bdist_wheel]
universal=1
+32 -3
View File
@@ -1,14 +1,43 @@
from distutils.core import setup
import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = []
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(self.pytest_args)
sys.exit(errno)
setup(
name='humblematch',
packages=['humblematch'], # this must be the same as the name above
version='0.1.dev1',
version='0.1.dev2',
description='Will Sanitize your type-checks and duck-checks for you',
author='bendtherules',
author_email='bendtherules@codesp.in',
url='https://github.com/bendtherules/humblematch', # use the URL to the github repo
download_url='https://github.com/bendtherules/humblematch/tarball/0.1.dev1', # I'll explain this in a second
download_url='https://github.com/bendtherules/humblematch/tarball/0.1.dev2', # I'll explain this in a second
license='WTFPL',
keywords=['type-checking', 'testing', 'assert'], # arbitrary keywords
classifiers=['Development Status :: 3 - Alpha', ],
package_data={
# Include all files in all packages
# 'humblematch': ['docs/*.md', 'test/*'],
},
tests_require=['pytest'],
cmdclass={'test': PyTest},
)