mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00

Commit messages for posterity: * wip transaction schema definition * test for SchemaObject * test SchemaObject definions meta property * schema documentation updates * test for basic validation * commit before change to .json file definiton + rst generation * move to straight .json schema, test for additionalProperties on each object * add asset to transaction definiton * remove outdated tx validation * make all tests pass * create own exception for validation error and start validating transactions * more tx validation fixes * move to yaml file for schema * automatic schema documentation generator * remove redundant section * use YAML safe loading * change current_owners to owners_before in tx schema * re-run tests and make correct yaml schema * fix some broken tests * update Release_Process.md * move tx validation into it's own method * add jsonschema dependency * perform schema validation after ID validation on Transaction * Release_Process.md, markdown auto numbering * remove old transaction.json * resolve remaining TODOs in schema docuementation * add `id` and `$schema` to transaction.yaml * add transaction.yaml to setup.py so it gets copied * address some concernes in PR for transaction.yaml * address more PR concerns in transaction.yaml * refactor validtion exceptions and move transaction schema validation into it's own function in bigchaindb.common.schema.__init__ * add note to generated schema.rst indicating when and how it's generated * move tx schema validation back above ID validation in Transaction.validate_structure, test that structurally invalid transaction gets caught and 400 returned in TX POST handler * remove timestamp from transaction schema index * Add README.md to bigchaindb.common.schema for introduction to JSON Schema and reasons for YAML * Use constant for schema definitions' base prefix * Move import of ValidationError exception into only the tests that require it * Move validate transaction test helper to tests/common/util.py * move ordered transaction schema load to generate_schema_documentation.py where it's needed * use double backticks to render terms in schema docs * change more backticks and change transaction version description in transaction schema * make details a mandatory property of condition * Many more documentation fixes * rename schema.rst to schema/transaction.rst * Fix documentation for Metadata * Add more links to documentation * Various other documentation fixes * Rename section titles in rendered documentation * use to manage file handle * fix extrenuous comma in test_tx_serialization_with_incorrect_hash args * 'a' * 64 * remove schema validation until we can analyze properly impact on downstream consumers * fix flake8 error * use `with` always
117 lines
2.8 KiB
Python
117 lines
2.8 KiB
Python
"""
|
|
BigchainDB: A Scalable Blockchain Database
|
|
|
|
For full docs visit https://bigchaindb.readthedocs.org
|
|
|
|
"""
|
|
from setuptools import setup, find_packages
|
|
|
|
|
|
# get the version
|
|
version = {}
|
|
with open('bigchaindb/version.py') as fp:
|
|
exec(fp.read(), version)
|
|
|
|
|
|
# check if setuptools is up to date
|
|
def check_setuptools_features():
|
|
import pkg_resources
|
|
try:
|
|
list(pkg_resources.parse_requirements('foo~=1.0'))
|
|
except ValueError:
|
|
exit('Your Python distribution comes with an incompatible version '
|
|
'of `setuptools`. Please run:\n'
|
|
' $ pip3 install --upgrade setuptools\n'
|
|
'and then run this command again')
|
|
|
|
|
|
check_setuptools_features()
|
|
|
|
|
|
tests_require = [
|
|
'coverage',
|
|
'pep8',
|
|
'flake8',
|
|
'pylint',
|
|
'pytest',
|
|
'pytest-cov>=2.2.1',
|
|
'pytest-xdist',
|
|
'pytest-flask',
|
|
]
|
|
|
|
dev_require = [
|
|
'ipdb',
|
|
'ipython',
|
|
]
|
|
|
|
docs_require = [
|
|
'Sphinx>=1.3.5',
|
|
'recommonmark>=0.4.0',
|
|
'sphinx-rtd-theme>=0.1.9',
|
|
'sphinxcontrib-httpdomain>=1.5.0',
|
|
]
|
|
|
|
benchmarks_require = [
|
|
'line-profiler==1.0',
|
|
]
|
|
|
|
install_requires = [
|
|
'rethinkdb~=2.3', # i.e. a version between 2.3 and 3.0
|
|
'pysha3>=0.3',
|
|
'cryptoconditions>=0.5.0',
|
|
'statsd>=3.2.1',
|
|
'python-rapidjson>=0.0.6',
|
|
'logstats>=0.2.1',
|
|
'flask>=0.10.1',
|
|
'flask-restful~=0.3.0',
|
|
'requests~=2.9',
|
|
'gunicorn~=19.0',
|
|
'multipipes~=0.1.0',
|
|
'jsonschema~=2.5.1',
|
|
'pyyaml~=3.12',
|
|
]
|
|
|
|
setup(
|
|
name='BigchainDB',
|
|
version=version['__version__'],
|
|
description='BigchainDB: A Scalable Blockchain Database',
|
|
long_description=__doc__,
|
|
url='https://github.com/BigchainDB/bigchaindb/',
|
|
author='BigchainDB Contributors',
|
|
author_email='dev@bigchaindb.com',
|
|
license='AGPLv3',
|
|
zip_safe=False,
|
|
|
|
classifiers=[
|
|
'Development Status :: 3 - Alpha',
|
|
'Intended Audience :: Developers',
|
|
'Topic :: Database',
|
|
'Topic :: Database :: Database Engines/Servers',
|
|
'Topic :: Software Development',
|
|
'Natural Language :: English',
|
|
'License :: OSI Approved :: GNU Affero General Public License v3',
|
|
'Programming Language :: Python :: 3 :: Only',
|
|
'Programming Language :: Python :: 3.4',
|
|
'Programming Language :: Python :: 3.5',
|
|
'Operating System :: MacOS :: MacOS X',
|
|
'Operating System :: POSIX :: Linux',
|
|
],
|
|
|
|
packages=find_packages(exclude=['tests*']),
|
|
|
|
entry_points={
|
|
'console_scripts': [
|
|
'bigchaindb=bigchaindb.commands.bigchain:main'
|
|
],
|
|
},
|
|
install_requires=install_requires,
|
|
setup_requires=['pytest-runner'],
|
|
tests_require=tests_require,
|
|
extras_require={
|
|
'test': tests_require,
|
|
'dev': dev_require + tests_require + docs_require + benchmarks_require,
|
|
'docs': docs_require,
|
|
},
|
|
package_data={'bigchaindb.common.schema': ['transaction.yaml']},
|
|
)
|