Commit Graph

201 Commits

Author SHA1 Message Date
codegeschrei dd84d4eb6f Problem: There are unnecessary markers (#2522)
* Problem: we have unused and outdated fixtures
Solution: clean up fixtures and tests accordingly

* Problem: there are still unused fixtures
Solution: remove Merlin keys

* Problem: There are unnecessary markers
Solution: remove the tendermint marker for tests
2018-09-10 09:53:18 +02:00
codegeschrei 55a9151c14 Problem: tests in test_bigchain_api are not activated (#2456)
* Problem: tests in test_bigchain_api are not activated
Solution: remove or active tests

* Problem: TransactionNotInValidBlock was removed
Solution: remove TransactionNotInValidBlock from tests
2018-08-22 09:56:44 +02:00
Troy McConaghy abdd23f5a6 Problem: Source files contain no license info (#2455)
* Problem: Source files contain no license info

Solution: Add comments with SPDX license info to source files

* Python 3 files don't need # -*- coding: utf-8 -*-
2018-08-16 12:31:32 +02:00
Zachary Bowen 3092beb995 Reenable test bigchain api - part 1 (#2415)
* Problem: core.py contains an unused class, `Bigchain`

Solution: Remove core.py. Refactor BigchainDB Class to remove inheritance from Bigchain.

* Fixed flake8 complaint about too many blank lines

* Attempting to fix Sphinx docs. This may result in some redundant commits, as I don't know what I'm doing, and I can't experiment without running the CI...

Sorry in advance!

* Updating from master changed BigchainDB.process_post_response to a private method, so I had to align with that.

* Fixed a couple stale references to bigchaindb.Bigchain in docstrings

* Missed a reference to `Bigchain` in a patch call...

* Problem: Tests in class `TestBigChainAPI` from `tests/db/test_bigchain_api.py` were disabled

Solution: Fixed the tests that still made sense, and deleted the rest.

* Problem: Flake8 style complaints

Solution: Made things prettier

* Problem: Debugging comments were slightly NSFW

Solution: Deleted the debugging comments

* Problem: Stale use of `pytest.mark.genesis` decorator on these tests

Solution: Removed the decorator

* Problem: CriticalDoubleInclusion exception was no longer used anywhere in the code

Solution: Deleted it

* Problem: Unused exception `GenesisBlockAlreadyExistsError`

Solution: Deleted it

* Problem: I removed a test that covered writing to the DB and checking that everything is stored faithfully

Solution: Replaced it and got it working again
2018-08-13 09:54:45 +02:00
codegeschrei 44be8f572f Problem: Block parameters are not required anymore (#2374)
* Problem: all blocks are valid
Solution: remove the status from transactions

* Problem: changed the return type of get_transaction_filtered
Solution: return tx class instead of dict
2018-08-08 15:08:34 +02:00
Zachary Bowen 2386ca9d71 Refactor tendermint directory to project root (#2401)
* Problem: core.py contains an unused class, `Bigchain`

Solution: Remove core.py. Refactor BigchainDB Class to remove inheritance from Bigchain.

* Problem: core.py contains an unused class, `Bigchain`

Solution: Remove core.py. Refactor BigchainDB Class to remove inheritance from Bigchain.

* Fixed flake8 complaint about too many blank lines

* Attempting to fix Sphinx docs. This may result in some redundant commits, as I don't know what I'm doing, and I can't experiment without running the CI...

Sorry in advance!

* Attempting to fix Sphinx docs. This may result in some redundant commits, as I don't know what I'm doing, and I can't experiment without running the CI...

Sorry in advance!

* Updating from master changed BigchainDB.process_post_response to a private method, so I had to align with that.

* Fixed a couple stale references to bigchaindb.Bigchain in docstrings

* Missed a reference to `Bigchain` in a patch call...

* Problem: BigchainDB class should be part of project root

Solution: Removed the /tendermint directory and moved its contents to project root

* Problem: Flake8 complained that imports were not at the top of the file

Solution: Had to play around with the order of imports to avoid cyclic dependencies, but its working and style compliant now

* Problem: Stale reference to /tendermint directory in the index

Solution: Removed the references to /tendermint

* Problem: Flake8 complaining of unused import in __init__.py

Solution: The import is there so I can import App directly from bigchaindb, rather than from bigchaindb.core (which I think improves code readability. I added a # noqa to silence Flake8.

* Problem: Stale references to `bigchaindb.tendermint.BigchainDB` in the rst files cause Sphinx to fail

Solution: Updated the autodoc files to use `bigchaindb.BigchainDB` instead

* Problem: Stale reference to the `tendermint` directory in an @patch in a disabled test

Solution: Updated the @patch for completeness

* Problem: BigchainDB class should be part of project root

Solution: Removed the /tendermint directory and moved its contents to project root

* Problem: Flake8 complained that imports were not at the top of the file

Solution: Had to play around with the order of imports to avoid cyclic dependencies, but its working and style compliant now

* Problem: Stale reference to /tendermint directory in the index

Solution: Removed the references to /tendermint

* Problem: Flake8 complaining of unused import in __init__.py

Solution: The import is there so I can import App directly from bigchaindb, rather than from bigchaindb.core (which I think improves code readability. I added a # noqa to silence Flake8.

* Problem: Stale references to `bigchaindb.tendermint.BigchainDB` in the rst files cause Sphinx to fail

Solution: Updated the autodoc files to use `bigchaindb.BigchainDB` instead

* Problem: Stale reference to the `tendermint` directory in an @patch in a disabled test

Solution: Updated the @patch for completeness
2018-07-25 16:59:25 +02:00
Zachary Bowen 4d2e58416c Problem: Bigchain class is unused and redundant (#2366)
* Problem: core.py contains an unused class, `Bigchain`

Solution: Remove core.py. Refactor BigchainDB Class to remove inheritance from Bigchain.

* Problem: core.py contains an unused class, `Bigchain`

Solution: Remove core.py. Refactor BigchainDB Class to remove inheritance from Bigchain.

* Fixed flake8 complaint about too many blank lines

* Attempting to fix Sphinx docs. This may result in some redundant commits, as I don't know what I'm doing, and I can't experiment without running the CI...

Sorry in advance!

* Attempting to fix Sphinx docs. This may result in some redundant commits, as I don't know what I'm doing, and I can't experiment without running the CI...

Sorry in advance!

* Updating from master changed BigchainDB.process_post_response to a private method, so I had to align with that.

* Fixed a couple stale references to bigchaindb.Bigchain in docstrings

* Missed a reference to `Bigchain` in a patch call...

* Merge with master and re-do some changes
2018-07-10 17:34:51 +02:00
Lev Berman 744ab3d5ef Problem: 2 implementations of fastquery exist. (#2365)
* Problem: 2 implementations of fastquery exist.

Solution: Remove the old deprecated implementation. Update the tests.

* Problem: There are still 3 outdated fastquery tests.

Solution: Fix the tests.
2018-06-29 15:48:58 +02:00
codegeschrei af996650c3 Problem: The Block class is deprecated (#2368)
* Problem: docs are not building anymore
Solution: add wget to the requirements for docs

* Problem: The Block class is deprecated
Solution: remove the block class and all occurrences
2018-06-29 15:32:16 +02:00
Muawia Khan 2b39566a4b Problem: Some configurations are defunct (#2338)
* Problem: BigchainDB config has stale/deprecated parameters

- Remove `keyring` and `keypair` from config
- Update tests
- Add `tendermint` config

* Fix flake8

* Update some naming conventions and redundant changes

* Remove redundant routine `fast_query`

* Remove deprecated parameters and descriptions

* remove some more unwanted code

* Problem: Two flake8 errors made Travis fail

Solution: Fix the two flake8 errors

* Address comments

- Remove reference of nodes_except_me and me_private and me
  as attributes of BigchainDB instances
- Update and re-add test(s)
- Do not introduce `tendermint` in configuration instead handle that
  in a separate PR along with docs

* Address comments

- Remove tests that are already covered with 2.0
- Remove tests that are no longer relevant
- Add TODO for more cleanup

* Remove tendermint config from configure command
2018-06-08 15:50:50 +02:00
Troy McConaghy 241db4ee48 Problem: backlog_reassign_delay is defunct but still listed (#2332)
* Fixed 2 PEP257 compliance errors

* Upgrade Tendermint to 0.19.7 except for Docker image, which is still at 0.19.2

* Problem: backlog_reassign_delay is defunct but still listed

Solution: remove all mentions of & calls for backlog_reassign_delay
2018-06-04 12:19:24 +02:00
Lev Berman 89b28b8471 Remove unsupported backends (#2289)
* Problem: RethinkDB, change feed, old mongo, admin interface are not supported any longer.

Solution: Remove unsupported functionality. Bring the MongoDB backend implementation completely to the localmongodb package. Fix the test setup.

* Problem: Nothing depends on multipipes any longer.

Solution: Remove multipipes from setup.py.

* Problem: The how-to-run-tests doc uses --database-backend.

Solution: Do not include the --database-backend option into the documented pytest usage.

* Problem: The backends docs are outdated.

Solution: Document MongoDB as the default and only backend for BigchainDB.

* Problem: The inputs fixtures uses old blocks API.

Solution: Change the inputs fixtures to use the new blocks API.

* Problem: rethinkdb package is not used anymore.

Solution: Remove the rethinkdb dependency from setup.py.

* Problem: The abci-marked tests use outdated Mongo conn.

Solution: Replace MongoDBConnection with LocalMongoDBConnection for them.
2018-05-23 11:34:00 +02:00
Sylvain Bellemare 9dd2e026b0 Fixes #1891 2017-12-05 19:38:52 +01:00
Katha e377fb57af
Pre commit styling (#1914)
* run pre-commit and fix errors

* mention pre-commit in our guides
2017-11-30 15:04:14 +01:00
Sylvain Bellemare 02fe712c34 Integrate cryptoconditions version 02 2017-06-22 14:56:22 +02:00
Rodolphe Marques b523ba3fe5 Rename unspent -> spent in outputs endpoint
- If spent=None return all outputs
- If spent=True return only spent outputs
- If spent=False return only unspent outputs
- Updated documentation
- Add the ability to return only spent outputs in core
- Added and update tests
2017-06-16 10:31:46 +02:00
Rodolphe Marques 3819ae5d65 Clean up code
- Fixed docstrings
2017-05-26 10:34:58 +02:00
Rodolphe Marques 285fc03ca9 Merge remote-tracking branch 'origin/master' into feat/1462/text-search 2017-05-24 11:59:49 +02:00
Rodolphe Marques 6900e86458 Filter out assets from invalid transactions
- Created docstrings
- Created tests
- Raise an exception when trying to use text search with RethinkDB.
2017-05-24 11:38:15 +02:00
Rodolphe Marques 92392b51a7 Initial implementation to decouple assets from transactions.
Most changes done to how we write and read blocks to the database.
Created schema, indexes and queries for mongodb.
Fixed tests.
2017-05-10 16:43:52 +02:00
Scott Sadler b4f14b26ce address nomenclature issues 2017-05-08 14:25:39 +02:00
Scott Sadler 4f99122758 fast unspents 2017-04-19 15:47:58 +02:00
Rodolphe Marques 10d83c2ab9 No duplicate vote inserts with mongodb (#1258)
* prevent duplicate vote inserts
2017-03-22 14:25:16 +01:00
Scott Sadler 1f5a8582b6 Merge branch 'master' into tx-structure 2017-03-14 16:22:14 +01:00
Scott Sadler 7c461e47d7 remove structural and schematic validations from Transaction.validate which is validating the spend 2017-03-14 12:39:57 +01:00
Scott Sadler dc58466de3 Merge branch 'master' into voting-class-integration 2017-03-13 13:35:03 +01:00
Scott Sadler a3fccbc599 change TransactionDoesNotExist to InputDoesNotExist in tests 2017-03-08 13:01:52 +01:00
Scott Sadler ffccf86c91 Merge remote-tracking branch 'origin/master' into voting-class-integration 2017-03-08 12:54:33 +01:00
Scott Sadler e5dd5c665b address vrde's comments, reshuffle some exceptions around 2017-03-07 13:15:31 +01:00
Scott Sadler 352627b83a add test that asset id is a string 2017-03-06 12:12:04 +01:00
Scott Sadler 3346fcb47b break BigchainDBCritical into CriticalDoubleSpend and CriticalDoubleInclusion and add test 2017-03-03 13:48:52 +01:00
Scott Sadler 5584de59b0 Make ValidationError a superclass of all validation errors and use it 2017-03-03 11:36:50 +01:00
Scott Sadler ebeb94f35a cleanup has_previous_vote 2017-02-27 16:25:29 +01:00
libscott 4a5a5566e7 Merge pull request #1208 from bigchaindb/is_new_transaction
Bigchaindb.is_new_transaction, fix double inclusion in Vote pipeline
2017-02-24 10:17:06 +01:00
Scott Sadler 89e76ffec2 fix tests, temporarily disabling some tests that need to be re-written 2017-02-23 21:53:12 +01:00
Scott Sadler b94eab715d introduce BigchainDBCritical exception 2017-02-22 14:37:34 +01:00
Scott Sadler 843d65d233 bigchain.is_new_transaction method 2017-02-22 13:55:29 +01:00
Scott Sadler 2af8fcb918 test unicode write block to disk 2017-01-31 15:48:34 +01:00
Scott Sadler 248e89a666 unicode tests uses serialize() and includes info about unicode symbol 2017-01-31 15:43:46 +01:00
Scott Sadler 2a07362bad test transaction supports unicode 2017-01-30 16:11:44 +01:00
Scott Sadler 9762b4b968 fix spend input twice bug (https://github.com/bigchaindb/bigchaindb/issues/1099) 2017-01-26 13:39:06 +01:00
Scott Sadler e3317b370b don't rename TransactionLink to TL 2017-01-24 12:11:21 +01:00
Scott Sadler af23ff5b65 clean up use of double quotes, rename UNSPENTS_ENDPOINT, clarify test 2017-01-24 12:08:55 +01:00
Scott Sadler 897ffe81bc outputs endpoint with unspent filter parameter 2017-01-23 16:10:21 +01:00
Scott Sadler 4bb64fa0b8 generalise get_owned_ids to get_outputs and get_owned_ids 2017-01-23 16:10:21 +01:00
Scott Sadler 7c4c7e9be3 remove use of random in test_bigchain_api 2017-01-17 11:48:58 +01:00
Sylvain Bellemare 1cfd3de60e Fix flake8 errors in tests 2017-01-11 05:13:27 -05:00
Rodolphe Marques 7f05974f0f Added a secondary index with uniqueness constraint in backlog.
Several test fixes
2017-01-09 13:25:42 +01:00
Rodolphe Marques 8e99d18fd6 Merge pull request #994 from bigchaindb/feat/927/implement-mongodb-changefeed
[WIP] Implement mongodb changefeed
2017-01-04 17:10:46 +01:00
Rodolphe Marques 1b3c909d51 Fixed mongodb queries
Fixed some tests
2017-01-04 15:43:17 +01:00