mirror of
https://github.com/planetmint/planetmint.git
synced 2025-11-25 15:05:49 +00:00
resolved comments and clean-up of unused code
This commit is contained in:
parent
014847828c
commit
7de2efbee7
@ -1,6 +1,6 @@
|
|||||||
from functools import singledispatch
|
from functools import singledispatch
|
||||||
# Copyright © 2020 Interplanetary Database Association e.V.,
|
# Copyright © 2020 Interplanetary Database Association e.V.,
|
||||||
# BigchainDB and IPDB software contributors.
|
# Planetmint and IPDB software contributors.
|
||||||
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
# SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0)
|
||||||
# Code is Apache-2.0 and docs are CC-BY-4.0
|
# Code is Apache-2.0 and docs are CC-BY-4.0
|
||||||
|
|
||||||
|
|||||||
@ -189,7 +189,7 @@ def set_config(config):
|
|||||||
Any previous changes made to ``planetmint.config`` will be lost.
|
Any previous changes made to ``planetmint.config`` will be lost.
|
||||||
"""
|
"""
|
||||||
# Deep copy the default config into planetmint.config
|
# Deep copy the default config into planetmint.config
|
||||||
_config = Config().get() #copy.deepcopy(planetmint._config)
|
_config = Config().get()
|
||||||
# Update the default config with whatever is in the passed config
|
# Update the default config with whatever is in the passed config
|
||||||
update(_config, update_types(config, _config))
|
update(_config, update_types(config, _config))
|
||||||
_config['CONFIGURED'] = True
|
_config['CONFIGURED'] = True
|
||||||
|
|||||||
@ -654,8 +654,6 @@ class Transaction(object):
|
|||||||
'id': id
|
'id': id
|
||||||
}
|
}
|
||||||
|
|
||||||
# print( f" Schema validation {tx}")
|
|
||||||
# print( f" Schema validation {local_dict}")
|
|
||||||
if not skip_schema_validation:
|
if not skip_schema_validation:
|
||||||
cls.validate_id(local_dict)
|
cls.validate_id(local_dict)
|
||||||
cls.validate_schema(local_dict)
|
cls.validate_schema(local_dict)
|
||||||
@ -702,7 +700,6 @@ class Transaction(object):
|
|||||||
tx_ids = list(tx_map.keys())
|
tx_ids = list(tx_map.keys())
|
||||||
metadata_list = list(planet.get_metadata(tx_ids))
|
metadata_list = list(planet.get_metadata(tx_ids))
|
||||||
for metadata in metadata_list:
|
for metadata in metadata_list:
|
||||||
# print (f"\n\nmetadata: { metadata}")
|
|
||||||
if 'id' in metadata:
|
if 'id' in metadata:
|
||||||
tx = tx_map[metadata['id']]
|
tx = tx_map[metadata['id']]
|
||||||
tx.update({'metadata': metadata.get('metadata')})
|
tx.update({'metadata': metadata.get('metadata')})
|
||||||
|
|||||||
28
setup.py
28
setup.py
@ -59,20 +59,20 @@ dev_require = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
tests_require = [
|
tests_require = [
|
||||||
'coverage',
|
'coverage',
|
||||||
'pep8',
|
'pep8',
|
||||||
'flake8',
|
'flake8',
|
||||||
'flake8-quotes==0.8.1',
|
'flake8-quotes==0.8.1',
|
||||||
'hypothesis>=5.3.0',
|
'hypothesis>=5.3.0',
|
||||||
'pytest>=3.0.0',
|
'pytest>=3.0.0',
|
||||||
'pytest-cov==2.8.1',
|
'pytest-cov==2.8.1',
|
||||||
'pytest-mock',
|
'pytest-mock',
|
||||||
'pytest-xdist',
|
'pytest-xdist',
|
||||||
'pytest-flask',
|
'pytest-flask',
|
||||||
'pytest-aiohttp',
|
'pytest-aiohttp',
|
||||||
'pytest-asyncio',
|
'pytest-asyncio',
|
||||||
'tox',
|
'tox',
|
||||||
] + docs_require
|
] + docs_require
|
||||||
|
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'chardet==3.0.4',
|
'chardet==3.0.4',
|
||||||
|
|||||||
@ -162,8 +162,6 @@ def test_init_chain_successfully_registers_chain(b):
|
|||||||
request = generate_init_chain_request('chain-XYZ')
|
request = generate_init_chain_request('chain-XYZ')
|
||||||
res = App(b).init_chain(request)
|
res = App(b).init_chain(request)
|
||||||
assert res == types.ResponseInitChain()
|
assert res == types.ResponseInitChain()
|
||||||
|
|
||||||
print('############# CONNECTION ############')
|
|
||||||
print(b.connection)
|
print(b.connection)
|
||||||
|
|
||||||
chain = query.get_latest_abci_chain(b.connection)
|
chain = query.get_latest_abci_chain(b.connection)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user