diff --git a/Release_Process.md b/Release_Process.md index e4a988a1..be4c448a 100644 --- a/Release_Process.md +++ b/Release_Process.md @@ -10,6 +10,7 @@ that [major version 0.x does not export a stable API](http://semver.org/#spec-it A minor release is preceeded by a feature freeze and created from the 'master' branch. This is a summary of the steps we go through to release a new minor version of BigchainDB Server. 1. Update the `CHANGELOG.md` file in master +1. In `k8s/bigchaindb/bigchaindb-dep.yaml`, find the line of the form `image: bigchaindb/bigchaindb:0.8.1` and change the version number to the new version number, e.g. `0.9.0`. (This is the Docker image that Kubernetes should pull from Docker Hub.) Commit that change to master 1. Create and checkout a new branch for the minor release, named after the minor version, without a preceeding 'v', e.g. `git checkout -b 0.9` (*not* 0.9.0, this new branch will be for e.g. 0.9.0, 0.9.1, 0.9.2, etc. each of which will be identified by a tagged commit) 1. In `bigchaindb/version.py`, update `__version__` and `__short_version__`, e.g. to `0.9` and `0.9.0` (with no `.dev` on the end) 1. Commit that change, and push the new branch to GitHub @@ -26,8 +27,11 @@ A patch release is similar to a minor release, but piggybacks on an existing min 1. Check out the minor release branch, e.g. `0.9` 1. Apply the changes you want, e.g. using `git cherry-pick`. 1. Update the `CHANGELOG.md` file -1. Increment the patch version in `bigchaindb/version.py`, e.g. "0.9.1" -1. Commit that change, and push the updated branch to GitHub +1. Increment the patch version in `bigchaindb/version.py`, e.g. `0.9.1` +1. Commit that change +1. In `k8s/bigchaindb/bigchaindb-dep.yaml`, find the line of the form `image: bigchaindb/bigchaindb:0.9.0` and change the version number to the new version number, e.g. `0.9.1`. (This is the Docker image that Kubernetes should pull from Docker Hub.) +1. Commit that change +1. Push the updated minor release branch to GitHub 1. Follow steps outlined in [Common Steps](#common-steps) 1. Cherry-pick the `CHANGELOG.md` update commit (made above) to the `master` branch diff --git a/bigchaindb/backend/query.py b/bigchaindb/backend/query.py index 74879cef..f989c8b1 100644 --- a/bigchaindb/backend/query.py +++ b/bigchaindb/backend/query.py @@ -259,7 +259,7 @@ def get_assets(connection, asset_ids): """Get a list of assets from the assets table. Args: - asset_ids (list): a of list of ids for the assets to be retrieved from + asset_ids (list): a list of ids for the assets to be retrieved from the database. Returns: @@ -323,7 +323,7 @@ def get_last_voted_block_id(connection, node_pubkey): node_pubkey (str): base58 encoded public key. Returns: - The last block id the node has voted on. If the node didn't cast + The id of the last block the node has voted on. If the node didn't cast any vote then the genesis block id is returned. """ diff --git a/bigchaindb/core.py b/bigchaindb/core.py index 3626197c..923cb8a8 100644 --- a/bigchaindb/core.py +++ b/bigchaindb/core.py @@ -605,7 +605,7 @@ class Bigchain(object): asset_ids (:obj:`list` of :obj:`str`): A list of asset_ids to retrieve from the database. - Returs: + Returns: list: The list of assets returned from the database. """ return backend.query.get_assets(self.connection, asset_ids) diff --git a/bigchaindb/models.py b/bigchaindb/models.py index c77c3338..8ca79b67 100644 --- a/bigchaindb/models.py +++ b/bigchaindb/models.py @@ -106,7 +106,7 @@ class Transaction(Transaction): if tx_dict['operation'] in [Transaction.CREATE, Transaction.GENESIS]: # TODO: Maybe replace this call to a call to get_asset_by_id asset = list(bigchain.get_assets([tx_dict['id']]))[0] - asset.pop('id') + del asset['id'] tx_dict.update({'asset': asset}) return cls.from_dict(tx_dict) @@ -351,7 +351,7 @@ class Block(object): def decouple_assets(self): """ - Extracts the assets from the `CREATE` transactions in the block. + Extracts the assets from the ``CREATE`` transactions in the block. Returns: tuple: (assets, block) with the assets being a list of dicts and @@ -372,9 +372,9 @@ class Block(object): @staticmethod def couple_assets(block_dict, assets): """ - Give a block_dict with not assets (as returned from a database call) - and a list of assets, reconstruct the original block by puting the - assets back into the `CREATE` transactions in the block. + Given a block_dict with no assets (as returned from a database call) + and a list of assets, reconstruct the original block by putting the + assets back into the ``CREATE`` transactions in the block. Args: block_dict (:obj:`dict`): The block dict as returned from a @@ -391,15 +391,14 @@ class Block(object): for transaction in block_dict['block']['transactions']: if transaction['operation'] in [Transaction.CREATE, Transaction.GENESIS]: - transaction.update({'asset': assets.get(transaction['id'], - None)}) + transaction.update({'asset': assets.get(transaction['id'])}) return block_dict @staticmethod def get_asset_ids(block_dict): """ Given a block_dict return all the asset_ids for that block (the txid - of CREATE transactions). Usefull to know which assets to retrieve + of CREATE transactions). Useful to know which assets to retrieve from the database to reconstruct the block. Args: diff --git a/docs/server/source/drivers-clients/index.rst b/docs/server/source/drivers-clients/index.rst index 0bfde7ad..ef749d55 100644 --- a/docs/server/source/drivers-clients/index.rst +++ b/docs/server/source/drivers-clients/index.rst @@ -20,7 +20,7 @@ Community-Driven Libraries and Tools Some of these projects are a work in progress, but may still be useful. -* `Javascript transaction builder `_ +* `JavaScript / Node.js driver `_ * `Haskell transaction builder `_ * `Go driver `_ * `Java driver `_ diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index aa3a9bca..4fe5618f 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,5 @@ name: bigchaindb -version: master +version: git summary: a scalable blockchain database description: | With high throughput, sub-second latency and powerful functionality to diff --git a/tests/test_block_model.py b/tests/test_block_model.py index 0824c40f..6e14d293 100644 --- a/tests/test_block_model.py +++ b/tests/test_block_model.py @@ -220,7 +220,7 @@ class TestBlockModel(object): block_dict_reconstructed = Block.couple_assets(block_dict, assets_from_block) - # check that the reconstructed block is the as the original block + # check that the reconstructed block is the same as the original block assert block == Block.from_dict(block_dict_reconstructed) def test_get_asset_ids(self, b):