-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from sbellem/0.1.0
0.1.0
- Loading branch information
Showing
9 changed files
with
130 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
language: python | ||
python: 2.7 | ||
install: pip install -e .[test] | ||
before_install: pip install codecov | ||
script: py.test -v --cov | ||
after_success: codecov |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM python:2.7 | ||
|
||
RUN mkdir -p /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
COPY requirements.txt /usr/src/app/ | ||
RUN pip install --upgrade pip | ||
|
||
COPY . /usr/src/app | ||
|
||
RUN pip install -e .[dev] | ||
|
||
CMD ["py.test", "-v", "tests/"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
trxs: | ||
build: . | ||
volumes: | ||
- ./transactions:/usr/src/app/transactions | ||
- ./tests:/usr/src/app/tests | ||
- ./pytest.ini:/usr/src/app/pytest.ini | ||
- ./setup.cfg:/usr/src/app/setup.cfg | ||
- ./setup.py:/usr/src/app/setup.py | ||
command: py.test -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[pytest] | ||
testpaths = tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[aliases] | ||
test=pytest | ||
|
||
[coverage:run] | ||
source = transactions | ||
omit = *test* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,88 @@ | ||
""" | ||
transactions: Bitcoin for Humans | ||
transactions is a small python library to easily create and push transactions | ||
to the bitcoin network. | ||
More information at https://github.com/ascribe/transactions | ||
""" | ||
import io | ||
import os | ||
import re | ||
|
||
from setuptools import setup | ||
|
||
|
||
def read(*names, **kwargs): | ||
with io.open( | ||
os.path.join(os.path.dirname(__file__), *names), | ||
encoding=kwargs.get('encoding', 'utf8') | ||
) as fp: | ||
return fp.read() | ||
|
||
|
||
def find_version(*file_paths): | ||
version_file = read(*file_paths) | ||
version_match = re.search( | ||
r'^__version__ = [\'"]([^\'"]*)[\'"]', version_file, re.M) | ||
if version_match: | ||
return version_match.group(1) | ||
raise RuntimeError('Unable to find version string.') | ||
|
||
|
||
install_requires = [ | ||
'pybitcointools==1.1.15', | ||
'pycoin==0.52', | ||
'requests==2.7.0', | ||
] | ||
|
||
tests_require = [ | ||
'pytest', | ||
'coverage', | ||
'pep8', | ||
'pyflakes', | ||
'pylint', | ||
'pytest', | ||
'pytest-cov', | ||
] | ||
|
||
dev_require = [ | ||
'ipdb', | ||
'ipython', | ||
] | ||
|
||
docs_require = [ | ||
'Sphinx>=1.3.5', | ||
'sphinxcontrib-napoleon>=0.4.4', | ||
] | ||
|
||
setup( | ||
name='transactions', | ||
version='0.1', | ||
version=find_version('transactions', '__init__.py'), | ||
url='https://github.com/ascribe/transactions', | ||
license='', | ||
license='Apache Software License', | ||
author='Rodolphe Marques', | ||
author_email='[email protected]', | ||
packages=['transactions', | ||
'transactions.services'], | ||
description='transactions: Bitcoin for Humans' | ||
description='transactions: Bitcoin for Humans', | ||
long_description=__doc__, | ||
classifiers=[ | ||
'Development Status :: 3 - Alpha', | ||
'Intended Audience :: Developers', | ||
'Natural Language :: English', | ||
'License :: OSI Approved :: Apache Software License', | ||
'Programming Language :: Python :: 2', | ||
'Programming Language :: Python :: 2.7', | ||
'Topic :: Software Development', | ||
], | ||
install_requires=install_requires, | ||
setup_requires=['pytest-runner'], | ||
tests_require=tests_require, | ||
extras_require={ | ||
'test': tests_require, | ||
'dev': dev_require + tests_require + docs_require, | ||
'docs': docs_require, | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
def test_init_transactions_class_with_defaults(): | ||
from transactions import Transactions | ||
from transactions.services.blockrservice import BitcoinBlockrService | ||
trxs = Transactions() | ||
assert trxs.testnet is False | ||
assert isinstance(trxs._service, BitcoinBlockrService) | ||
assert trxs._min_tx_fee == trxs._service._min_transaction_fee | ||
assert trxs._dust == trxs._service._min_dust |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
from transactions import Transactions | ||
from transactions import Transactions # noqa | ||
|
||
|
||
__version__ = '0.1.0' |