diff --git a/Dockerfile-all-in-one b/Dockerfile-all-in-one index c4b7b77..736934c 100644 --- a/Dockerfile-all-in-one +++ b/Dockerfile-all-in-one @@ -10,7 +10,7 @@ WORKDIR /usr/src/app RUN apk --update add sudo bash \ && apk --update add python3 openssl ca-certificates git \ && apk --update add --virtual build-dependencies python3-dev \ - libffi-dev openssl-dev build-base jq \ + libffi-dev openssl-dev build-base jq zsh \ && apk add --no-cache libstdc++ dpkg gnupg \ && pip3 install --upgrade pip cffi \ && pip install -e . \ diff --git a/Dockerfile-alpine b/Dockerfile-alpine index 59da072..0efa4cd 100644 --- a/Dockerfile-alpine +++ b/Dockerfile-alpine @@ -5,7 +5,7 @@ COPY . /usr/src/app/ WORKDIR /usr/src/app RUN apk --update add sudo \ && apk --update add python3 py-pip openssl ca-certificates git\ - && apk --update add --virtual build-dependencies python3-dev \ + && apk --update add --virtual build-dependencies python3-dev zsh \ libffi-dev openssl-dev build-base \ && apk add --no-cache libstdc++ \ && pip3 install --upgrade pip cffi \ diff --git a/Dockerfile-dev b/Dockerfile-dev index c55073e..c44b4f3 100644 --- a/Dockerfile-dev +++ b/Dockerfile-dev @@ -3,7 +3,7 @@ FROM python:${python_version} LABEL maintainer "contact@ipdb.global" RUN apt-get update \ - && apt-get install -y git \ + && apt-get install -y git zsh\ && pip install -U pip \ && apt-get autoremove \ && apt-get clean diff --git a/README.md b/README.md index 0745b0b..d0a1949 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,9 @@ so show the latest GitHub release instead. [![Codecov branch](https://img.shields.io/codecov/c/github/planetmint/planetmint/master.svg)](https://codecov.io/github/planetmint/planetmint?branch=master) [![Latest release](https://img.shields.io/github/release/planetmint/planetmint/all.svg)](https://github.com/planetmint/planetmint/releases) -[![Status on PyPI](https://img.shields.io/pypi/status/planetmint.svg)](https://pypi.org/project/Planetmint/) -[![Travis branch](https://img.shields.io/travis/planetmint/planetmint/master.svg)](https://travis-ci.com/planetmint/planetmint) -[![Documentation Status](https://readthedocs.org/projects/planetmint-server/badge/?version=latest)](https://docs.planetmint.com/projects/server/en/latest/) -[![Join the chat at https://gitter.im/planetmint/planetmint](https://badges.gitter.im/planetmint/planetmint.svg)](https://gitter.im/planetmint/planetmint?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Status on PyPI](https://img.shields.io/pypi/status/planetmint.svg)](https://pypi.org/project/Planetmint) +[![Build Status](https://app.travis-ci.com/planetmint/planetmint.svg?branch=main)](https://app.travis-ci.com/planetmint/planetmint) +[![Join the chat at https://gitter.im/planetmint/planetmint](https://badges.gitter.im/planetmint/planetmint.svg)](https://gitter.im/planetmint/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) # Planetmint Server diff --git a/acceptance/python/Dockerfile b/acceptance/python/Dockerfile index ae59ca0..a106dcf 100644 --- a/acceptance/python/Dockerfile +++ b/acceptance/python/Dockerfile @@ -1,9 +1,10 @@ FROM python:3.9 +RUN apt-get update && apt-get install -y vim zsh RUN mkdir -p /src RUN pip install --upgrade \ pycco \ websocket-client~=0.47.0 \ pytest~=3.0 \ - bigchaindb-driver~=0.6.2 \ + planetmint-driver>=0.9.0 \ blns diff --git a/acceptance/python/src/test_basic.py b/acceptance/python/src/test_basic.py index b29a47b..5e09085 100644 --- a/acceptance/python/src/test_basic.py +++ b/acceptance/python/src/test_basic.py @@ -24,8 +24,8 @@ import os # For this test case we import and use the Python Driver. -from bigchaindb_driver import BigchainDB -from bigchaindb_driver.crypto import generate_keypair +from planetmint_driver import Planetmint +from planetmint_driver.crypto import generate_keypair def test_basic(): @@ -34,7 +34,7 @@ def test_basic(): # connect to localhost, but you can override this value using the env variable # called `PLANETMINT_ENDPOINT`, a valid value must include the schema: # `https://example.com:9984` - bdb = BigchainDB(os.environ.get('PLANETMINT_ENDPOINT')) + bdb = Planetmint(os.environ.get('PLANETMINT_ENDPOINT')) # ## Create keypairs # This test requires the interaction between two actors with their own keypair. diff --git a/acceptance/python/src/test_divisible_asset.py b/acceptance/python/src/test_divisible_asset.py index 00baeaf..1967237 100644 --- a/acceptance/python/src/test_divisible_asset.py +++ b/acceptance/python/src/test_divisible_asset.py @@ -26,18 +26,18 @@ # And of course, we also need the `BadRequest`. import os import pytest -from bigchaindb_driver.exceptions import BadRequest +from planetmint_driver.exceptions import BadRequest # For this test case we import and use the Python Driver. -from bigchaindb_driver import BigchainDB -from bigchaindb_driver.crypto import generate_keypair +from planetmint_driver import Planetmint +from planetmint_driver.crypto import generate_keypair def test_divisible_assets(): # ## Set up a connection to Planetmint # Check [test_basic.py](./test_basic.html) to get some more details # about the endpoint. - bdb = BigchainDB(os.environ.get('PLANETMINT_ENDPOINT')) + bdb = Planetmint(os.environ.get('PLANETMINT_ENDPOINT')) # Oh look, it is Alice again and she brought her friend Bob along. alice, bob = generate_keypair(), generate_keypair() diff --git a/acceptance/python/src/test_double_spend.py b/acceptance/python/src/test_double_spend.py index 66a2467..8f8fab9 100644 --- a/acceptance/python/src/test_double_spend.py +++ b/acceptance/python/src/test_double_spend.py @@ -11,13 +11,13 @@ from uuid import uuid4 from threading import Thread import queue -import bigchaindb_driver.exceptions -from bigchaindb_driver import BigchainDB -from bigchaindb_driver.crypto import generate_keypair +import planetmint_driver.exceptions +from planetmint_driver import Planetmint +from planetmint_driver.crypto import generate_keypair def test_double_create(): - bdb = BigchainDB(os.environ.get('PLANETMINT_ENDPOINT')) + bdb = Planetmint(os.environ.get('PLANETMINT_ENDPOINT')) alice = generate_keypair() results = queue.Queue() @@ -33,7 +33,7 @@ def test_double_create(): try: bdb.transactions.send_commit(tx) results.put('OK') - except bigchaindb_driver.exceptions.TransportError as e: + except planetmint_driver.exceptions.TransportError as e: results.put('FAIL') t1 = Thread(target=send_and_queue, args=(tx, )) diff --git a/acceptance/python/src/test_multiple_owners.py b/acceptance/python/src/test_multiple_owners.py index ea82ed0..e60c63a 100644 --- a/acceptance/python/src/test_multiple_owners.py +++ b/acceptance/python/src/test_multiple_owners.py @@ -25,15 +25,15 @@ import os # For this test case we import and use the Python Driver. -from bigchaindb_driver import BigchainDB -from bigchaindb_driver.crypto import generate_keypair +from planetmint_driver import Planetmint +from planetmint_driver.crypto import generate_keypair def test_multiple_owners(): # ## Set up a connection to Planetmint # Check [test_basic.py](./test_basic.html) to get some more details # about the endpoint. - bdb = BigchainDB(os.environ.get('PLANETMINT_ENDPOINT')) + bdb = Planetmint(os.environ.get('PLANETMINT_ENDPOINT')) # Hey Alice and Bob, nice to see you again! alice, bob = generate_keypair(), generate_keypair() diff --git a/acceptance/python/src/test_naughty_strings.py b/acceptance/python/src/test_naughty_strings.py index f0e92d4..423ae01 100644 --- a/acceptance/python/src/test_naughty_strings.py +++ b/acceptance/python/src/test_naughty_strings.py @@ -24,9 +24,9 @@ from blns import blns import pytest # For this test case we import and use the Python Driver. -from bigchaindb_driver import BigchainDB -from bigchaindb_driver.crypto import generate_keypair -from bigchaindb_driver.exceptions import BadRequest +from planetmint_driver import Planetmint +from planetmint_driver.crypto import generate_keypair +from planetmint_driver.exceptions import BadRequest naughty_strings = blns.all() @@ -36,7 +36,7 @@ def send_naughty_tx(asset, metadata): # ## Set up a connection to Planetmint # Check [test_basic.py](./test_basic.html) to get some more details # about the endpoint. - bdb = BigchainDB(os.environ.get('PLANETMINT_ENDPOINT')) + bdb = Planetmint(os.environ.get('PLANETMINT_ENDPOINT')) # Here's Alice. alice = generate_keypair() diff --git a/acceptance/python/src/test_stream.py b/acceptance/python/src/test_stream.py index c82f43d..c6d037b 100644 --- a/acceptance/python/src/test_stream.py +++ b/acceptance/python/src/test_stream.py @@ -27,8 +27,8 @@ from uuid import uuid4 # [websocket](https://github.com/websocket-client/websocket-client) module from websocket import create_connection -from bigchaindb_driver import BigchainDB -from bigchaindb_driver.crypto import generate_keypair +from planetmint_driver import Planetmint +from planetmint_driver.crypto import generate_keypair def test_stream(): @@ -40,7 +40,7 @@ def test_stream(): # *That's pretty bad, but let's do like this for now.* WS_ENDPOINT = 'ws://{}:9985/api/v1/streams/valid_transactions'.format(BDB_ENDPOINT.rsplit(':')[0]) - bdb = BigchainDB(BDB_ENDPOINT) + bdb = Planetmint(BDB_ENDPOINT) # Hello to Alice again, she is pretty active in those tests, good job # Alice! diff --git a/docs/root/source/contributing/index.rst b/docs/root/source/contributing/index.rst index a6fc866..cf0b606 100644 --- a/docs/root/source/contributing/index.rst +++ b/docs/root/source/contributing/index.rst @@ -11,7 +11,7 @@ There are many ways you can contribute to Planetmint. It includes several sub-projects. - `Planetmint Server `_ -- `Planetmint Python Driver `_ +- `Planetmint Python Driver `_ - `Planetmint JavaScript Driver `_ - `Planetmint Java Driver `_ - `cryptoconditions `_ (a Python package by us) diff --git a/docs/root/source/contributing/ways-to-contribute/report-a-bug.md b/docs/root/source/contributing/ways-to-contribute/report-a-bug.md index 9d3c37a..fadc345 100644 --- a/docs/root/source/contributing/ways-to-contribute/report-a-bug.md +++ b/docs/root/source/contributing/ways-to-contribute/report-a-bug.md @@ -22,7 +22,6 @@ People ask questions about Planetmint in the following places: - Gitter - [planetmint/planetmint](https://gitter.im/planetmint/community) - - [planetmint/js-planetmint-driver](https://gitter.im/planetmint/community)) - [Twitter](https://twitter.com/planetmint) - [Stack Overflow "planetmint"](https://stackoverflow.com/search?q=planetmint) diff --git a/docs/root/source/contributing/ways-to-contribute/write-docs.md b/docs/root/source/contributing/ways-to-contribute/write-docs.md index b67f82e..d223243 100644 --- a/docs/root/source/contributing/ways-to-contribute/write-docs.md +++ b/docs/root/source/contributing/ways-to-contribute/write-docs.md @@ -19,7 +19,7 @@ If you're writing code, you should also update any related docs. However, you mi You can certainly do that! - The docs for Planetmint Server live under ``planetmint/docs/`` in the ``planetmint/planetmint`` repo. -- There are docs for the Python driver under ``bigchaindb-driver/docs/`` in the ``planetmint/bigchaindb-driver`` repo. +- There are docs for the Python driver under ``planetmint-driver/docs/`` in the ``planetmint/planetmint-driver`` repo. - There are docs for the JavaScript driver under ``planetmint/js-bigchaindb-driver`` in the ``planetmint/js-bigchaindb-driver`` repo. - The source code for the Planetmint website is in a private repo, but we can give you access if you ask. diff --git a/docs/root/source/korean/query-ko.md b/docs/root/source/korean/query-ko.md index 0fc08c6..3819068 100644 --- a/docs/root/source/korean/query-ko.md +++ b/docs/root/source/korean/query-ko.md @@ -205,10 +205,6 @@ Tendermint voting 파워가 0인 노드인 추종자 노드를 생성할 수 있 [MongoDB node.js 드라이버](https://mongodb.github.io/node-mongodb-native/?jmp=docs)와 같은 MongoDB 드라이버를 사용하여 다음 중 하나를 사용하여 노드의 MongoDB 데이터베이스에 연결할 수 있습니다. 여기 자바스크립트 쿼리 코드에 대한 링크가 있습니다. -<<<<<<< HEAD -- [The Planetmint JavaScript/Node.js driver source code](https://github.com/planetmint/js-bigchaindb-driver) -======= -- [The Planetmint JavaScript/Node.js driver source code](https://github.com/planetmint/js-planetmint-driver) ->>>>>>> 3bfc3298f8210b135084e823eedd47f213538088 -- [Example code by @manolodewiner](https://github.com/manolodewiner/query-mongodb-planetmint/blob/master/queryMongo.js) -- [More example code by @manolodewiner](https://github.com/planetmint/planetmint/issues/2315#issuecomment-392724279) \ No newline at end of file +- [The Planetmint JavaScript/Node.js driver source code](https://github.com/bigchaindb/js-bidchaindb-driver) +- [Example code by @manolodewiner](https://github.com/manolodewiner/query-mongodb-bigchaindb/blob/master/queryMongo.js) +- [More example code by @manolodewiner](https://github.com/bigchaindb/bigchaindb/issues/2315#issuecomment-392724279) \ No newline at end of file diff --git a/k8s/toolbox/Dockerfile b/k8s/toolbox/Dockerfile index 9c9f783..d4c7d4a 100644 --- a/k8s/toolbox/Dockerfile +++ b/k8s/toolbox/Dockerfile @@ -9,8 +9,8 @@ WORKDIR / RUN apk add --no-cache --update curl bind-tools python3-dev g++ \ libffi-dev make vim git nodejs openssl-dev \ && pip3 install ipython \ - && git clone https://github.com/bigchaindb/bigchaindb-driver \ - && cd bigchaindb-driver \ + && git clone https://github.com/planetmint/planetmint-driver \ + && cd planetmint-driver \ && pip3 install -e . \ && npm install -g wsc ENTRYPOINT ["/bin/sh"] diff --git a/setup.py b/setup.py index f6f80c1..f837710 100644 --- a/setup.py +++ b/setup.py @@ -16,6 +16,9 @@ from setuptools import setup, find_packages if sys.version_info < (3, 9): sys.exit('Please use Python version 3.9 or higher.') +with open('README.md') as readme_file: + readme = readme_file.read() + # get the version version = {} with open('planetmint/version.py') as fp: @@ -59,7 +62,6 @@ tests_require = [ 'flake8', 'flake8-quotes==0.8.1', 'hypothesis>=5.3.0', - # Removed pylint because its GPL license isn't Apache2-compatible 'pytest>=3.0.0', 'pytest-cov==2.8.1', 'pytest-mock', @@ -74,7 +76,7 @@ install_requires = [ 'chardet==3.0.4', 'aiohttp==3.7.4', 'abci==0.8.3', - 'cryptoconditions==0.8.1', + 'planetmint-cryptoconditions>=0.9.0', 'flask-cors==3.0.10', 'flask-restful==0.3.9', 'flask==2.0.1', @@ -97,20 +99,12 @@ setup( name='Planetmint', version=version['__version__'], description='Planetmint: The Blockchain Database', - long_description=( - "Planetmint allows developers and enterprises to deploy blockchain " - "proof-of-concepts, platforms and applications with a blockchain " - "database. Planetmint supports a wide range of industries and use cases " - "from identity and intellectual property to supply chains, energy, IoT " - "and financial ecosystems. With high throughput, low latency, powerful " - "query functionality, decentralized control, immutable data storage and " - "built-in asset support, Planetmint is like a database with blockchain " - "characteristics." - ), + long_description=readme, + long_description_content_type='text/markdown', url='https://github.com/Planetmint/planetmint/', author='Planetmint Contributors', author_email='contact@ipdb.global', - license='Apache Software License 2.0', + license='AGPLv3', zip_safe=False, python_requires='>=3.9', classifiers=[