diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
deleted file mode 100644
index aaeacdd..0000000
--- a/.gitlab-ci.yml
+++ /dev/null
@@ -1,71 +0,0 @@
-image: python:3.5.3
-
-services:
- - rethinkdb:latest
-
-before_script:
- - apt-get update -qy
- - apt-get install -y libxml2-dev libxslt1-dev lib32z1-dev libpython3-dev python3-dev python3-pip python3-setuptools libffi-dev
- - pyvenv env
- - source env/bin/activate
- - pip3 install -U setuptools pip
-
-stages:
- - build
- - test
- - deploy
-
-build:
- stage: build
- only:
- - master
- - develop
- script:
- - pip install -e .[dev]
- - bigchaindb --dev-allow-temp-keypair start &
-
-test:
- stage: test
- only:
- - master
- - develop
- script:
- - pip install -e .[dev]
- - mkdir .cache
- - bigchaindb --dev-allow-temp-keypair start &
- - sleep 5
- - coverage run --source prov2bigchaindb setup.py test
- - coverage report -m
- - coverage html
- artifacts:
- paths:
- - .cache/html-coverage/
- - .cache/
-
-pages:
- stage: deploy
- dependencies:
- - test
- script:
- - mv .cache/html-coverage/ public/
- artifacts:
- paths:
- - public
- expire_in: 30 days
- only:
- - master
-
-manual_test:
- script:
- - pip install -e .[dev]
- - mkdir .cache
- - bigchaindb --dev-allow-temp-keypair start &
- - sleep 5
- - coverage run --source prov2bigchaindb setup.py test
- - coverage report -m
- - coverage html
- artifacts:
- paths:
- - .cache/html-coverage/
- - .cache/
- when: manual
diff --git a/.travis.yml b/.travis.yml
index ae67367..555555d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,9 +10,7 @@ addons:
before_install:
- sudo apt-get update -qy
- sudo apt-get install -y libxml2-dev lib32z1-dev libssl-dev
- - pyvenv env
- - source env/bin/activate
- - pip3 install -U setuptools pip
+ - pip install -U setuptools pip
# Install packages
install:
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 7ccbc20..207e6b9 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,6 +1,14 @@
Changelog
=========
+Version 0.4.1 (2018-04-09)
+--------------------------
+
+- Updated BigchainDB to 1.3.0
+- Updated db-driver to 0.4.1
+- Updated networkx to 2.1
+- Updated prov to 1.5.2
+
Version 0.4.0 (2017-06-29)
--------------------------
diff --git a/Makefile b/Makefile
index 3a5a26b..480796c 100644
--- a/Makefile
+++ b/Makefile
@@ -55,7 +55,7 @@ docs-travis:
./.travis_docs.sh
release: clean
- python setup.py sdist upload
+ python setup.py sdist upload -r pypi
dist: clean
python setup.py sdist
diff --git a/README.rst b/README.rst
index d0308eb..6be006c 100644
--- a/README.rst
+++ b/README.rst
@@ -16,16 +16,13 @@ Introduction
.. image:: https://coveralls.io/repos/github/DLR-SC/prov2bigchaindb/badge.svg?branch=master
:target: https://coveralls.io/github/DLR-SC/prov2bigchaindb?branch=master
:alt: Coverage Status
-.. image:: https://www.quantifiedcode.com/api/v1/project/00b76af4d7d747ee8dd0a6e4a5fa4ce5/badge.svg
- :target: https://www.quantifiedcode.com/app/project/00b76af4d7d747ee8dd0a6e4a5fa4ce5
- :alt: Code issues
.. image:: https://pyup.io/repos/github/DLR-SC/prov2bigchaindb/shield.svg
:target: https://pyup.io/repos/github/DLR-SC/prov2bigchaindb/
:alt: Updates
.. image:: https://zenodo.org/badge/87302481.svg
:target: https://zenodo.org/badge/latestdoi/87302481
-This python module provides three different clients to save `W3C-PROV `_ documents into a federation of `BigchainDB `_ nodes.
+This python module provides three different clients to store `W3C-PROV `_ documents into a federation of `BigchainDB `_ nodes.
All clients are implemented with respect to the proposed concepts from the masters thesis `Trustworthy Provenance Recording using a blockchain-like database `_.
See full documentation at: `prov2bigchaindb.readthedocs.io `_
@@ -60,7 +57,7 @@ Source
cd prov2bigchaindb
# Setup virtual environment
- pyenv env
+ python -m venv env
source env/bin/activate
# Install dependencies and package into virtual enviroment
diff --git a/docs/development.rst b/docs/development.rst
index f0c259b..72d1561 100644
--- a/docs/development.rst
+++ b/docs/development.rst
@@ -20,7 +20,7 @@ Setup
cd prov2bigchaindb
# Setup virtual environment
- pyvenv env
+ python -m venv env
source env/bin/activate
# Install dependencies
diff --git a/prov2bigchaindb/core/accounts.py b/prov2bigchaindb/core/accounts.py
index 80f2e15..f1f9956 100644
--- a/prov2bigchaindb/core/accounts.py
+++ b/prov2bigchaindb/core/accounts.py
@@ -93,7 +93,7 @@ def _transfer_asset(self, bdb_connection: BigchainDB, recipient_pub_key: str, tx
transfer_input = {
'fulfillment': output['condition']['details'],
'fulfills': {
- 'output': output_index,
+ 'output_index': output_index,
'transaction_id': tx['id']
},
'owners_before': output['public_keys']
diff --git a/prov2bigchaindb/core/clients.py b/prov2bigchaindb/core/clients.py
index 9281c9a..bcb10b3 100644
--- a/prov2bigchaindb/core/clients.py
+++ b/prov2bigchaindb/core/clients.py
@@ -172,10 +172,10 @@ def calculate_account_data(prov_document: provmodel.ProvDocument) -> list:
namespaces = prov_document.get_registered_namespaces()
g = provgraph.prov_to_graph(prov_document=prov_document)
elements = []
- for node, nodes in g.adjacency_iter():
+ for node, node_dict in g.adjacency():
relations = {'with_id': [], 'without_id': []}
# print(node)
- for tmp_relations in nodes.values():
+ for tmp_relations in node_dict.values():
for relation in tmp_relations.values():
relation = relation['relation']
if relation.identifier:
@@ -282,14 +282,14 @@ def calculate_account_data(prov_document: provmodel.ProvDocument) -> list:
namespaces = prov_document.get_registered_namespaces()
g = provgraph.prov_to_graph(prov_document=prov_document)
- sorted_nodes = topological_sort(g, reverse=True)
+ sorted_nodes = list(reversed(list(topological_sort(g))))
agents = list(filter(lambda elem: isinstance(elem, provmodel.ProvAgent), sorted_nodes))
elements = list(filter(lambda elem: not isinstance(elem, provmodel.ProvAgent), sorted_nodes))
# Check on compatibility
if not is_directed_acyclic_graph(g):
raise Exception("Provenance graph is not acyclic")
- if isolates(g):
+ if list(isolates(g)):
raise Exception("Provenance not compatible with role-based concept. Has isolated Elements")
for element in elements:
if provmodel.ProvAgent not in [type(n) for n in g.neighbors(element)]:
diff --git a/prov2bigchaindb/tests/test_graph_concept.py b/prov2bigchaindb/tests/test_graph_concept.py
index f8c8543..f86b3c8 100644
--- a/prov2bigchaindb/tests/test_graph_concept.py
+++ b/prov2bigchaindb/tests/test_graph_concept.py
@@ -45,7 +45,6 @@ def test_simple2_prov_doc(self):
doc = graph_client.get_document(tx_ids)
self.assertEqual(len(prov_document.get_records()), len(doc.get_records()))
self.assertEqual(prov_document, doc)
- print(tx_ids)
@unittest.skip("testing skipping")
def test_thesis_prov_doc(self):
diff --git a/prov2bigchaindb/tests/test_role_concept.py b/prov2bigchaindb/tests/test_role_concept.py
index abefd40..f5956a1 100644
--- a/prov2bigchaindb/tests/test_role_concept.py
+++ b/prov2bigchaindb/tests/test_role_concept.py
@@ -47,7 +47,6 @@ def test_simple2_prov_doc(self):
doc = role_client.get_document(tx_ids)
self.assertEqual(len(prov_document.get_records()), len(doc.get_records()))
self.assertEqual(prov_document, doc)
- print(tx_ids)
@unittest.skip("testing skipping")
def test_thesis_prov_doc(self):
diff --git a/prov2bigchaindb/version.py b/prov2bigchaindb/version.py
index d90ba8b..ce4b94e 100644
--- a/prov2bigchaindb/version.py
+++ b/prov2bigchaindb/version.py
@@ -1,2 +1,2 @@
-__version__ = '0.4.0'
+__version__ = '0.4.1'
__short_version__ = '0.4'
diff --git a/requirements.txt b/requirements.txt
index ba8352e..fa023cb 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,3 +1,4 @@
-BigchainDB==1.0.0rc1
-bigchaindb-driver==0.3.1
-prov==1.5.0
\ No newline at end of file
+BigchainDB~=1.3.0
+bigchaindb-driver~=0.4.1
+networkx~=2.1
+prov~=1.5.2
\ No newline at end of file
diff --git a/setup.py b/setup.py
index 16b07fd..d87c4ef 100644
--- a/setup.py
+++ b/setup.py
@@ -5,12 +5,13 @@
from distutils.core import setup, find_packages
install_requires=[
- "bigchaindb_driver~=0.3",
- "prov"
+ "bigchaindb_driver~=0.4.1",
+ "networkx~=2.1",
+ "prov~=1.5.2"
]
tests_require = [
- "BigchainDB~=1.0.0rc1",
+ "BigchainDB~=1.3.0",
'coverage',
'coveralls'
]