Skip to content

Commit

Permalink
Merge pull request #20 from DLR-SC/develop
Browse files Browse the repository at this point in the history
* Updated packages
* Release 0.4.1
  • Loading branch information
Drake81 committed Apr 9, 2018
2 parents 30a6cc1 + a21c78a commit 53f5f5d
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 95 deletions.
71 changes: 0 additions & 71 deletions .gitlab-ci.yml

This file was deleted.

4 changes: 1 addition & 3 deletions .travis.yml
Expand Up @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions 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)
--------------------------

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -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
7 changes: 2 additions & 5 deletions README.rst
Expand Up @@ -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 <https://www.w3.org/TR/prov-overview/>`_ documents into a federation of `BigchainDB <https://www.bigchaindb.com/>`_ nodes.
This python module provides three different clients to store `W3C-PROV <https://www.w3.org/TR/prov-overview/>`_ documents into a federation of `BigchainDB <https://www.bigchaindb.com/>`_ nodes.
All clients are implemented with respect to the proposed concepts from the masters thesis `Trustworthy Provenance Recording using a blockchain-like database <http://elib.dlr.de/111772/>`_.

See full documentation at: `prov2bigchaindb.readthedocs.io <http://prov2bigchaindb.readthedocs.io>`_
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/development.rst
Expand Up @@ -20,7 +20,7 @@ Setup
cd prov2bigchaindb
# Setup virtual environment
pyvenv env
python -m venv env
source env/bin/activate
# Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion prov2bigchaindb/core/accounts.py
Expand Up @@ -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']
Expand Down
8 changes: 4 additions & 4 deletions prov2bigchaindb/core/clients.py
Expand Up @@ -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:
Expand Down Expand Up @@ -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)]:
Expand Down
1 change: 0 additions & 1 deletion prov2bigchaindb/tests/test_graph_concept.py
Expand Up @@ -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):
Expand Down
1 change: 0 additions & 1 deletion prov2bigchaindb/tests/test_role_concept.py
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion prov2bigchaindb/version.py
@@ -1,2 +1,2 @@
__version__ = '0.4.0'
__version__ = '0.4.1'
__short_version__ = '0.4'
7 changes: 4 additions & 3 deletions requirements.txt
@@ -1,3 +1,4 @@
BigchainDB==1.0.0rc1
bigchaindb-driver==0.3.1
prov==1.5.0
BigchainDB~=1.3.0
bigchaindb-driver~=0.4.1
networkx~=2.1
prov~=1.5.2
7 changes: 4 additions & 3 deletions setup.py
Expand Up @@ -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'
]
Expand Down

0 comments on commit 53f5f5d

Please sign in to comment.