Update for beem - coverage improved and other improvements

in #utopian-io7 years ago (edited)

beem is a python library for accessing the steem blockchain. I build beem from scratch using python-bitshares as template. At the moment, beem is not really used, as the github has around 1 unique visitor each day and thats maybe me. The newest version of beem is 0.19.19.

I created a discord channel for answering question or discussing beem: https://discord.gg/4HM592V

beem is not a copy of python-steem, thus the classes and functions are different. beem is almost feature complete and should be able to do all things that python-steem can do. Differences to python-steem:

beempython-steem
websocket nodesyesno
native appbase callsyesno
python 2.7 supportetyesyes
python 3.3 supportetyesno
python 3.4 supportetyesno
python 3.6 supportetyesyes
number of unit tests34070
coverage75 % - 83%?
can be used on androidyesno

I decided to create an own library for steem and not participating to python-steem by pull-requests for the following reasons:

  • as python-steem is the official library, all changes have to be reviewed carfully. This takes a lot of time.
  • python-steem is used by many, therefore it is not possible to change classes or functions easily.
  • I like it to have my own repo, in which I can do what I want :).

beem is open source, so my work may improve python-steem.

Changes

Sync changes from python-graphenelib

Remove register_api and api_id calls

Import Wallet changes from bitshares and bug fixes

Removed not used classes

Improved test coverage

Several changes and improvements

Update test_steemnoderpc.py

Fix depreated function warning

Improve coverage of test_cli

Improve coverage for Price

Move post and comment_options to steem class

Improve coverage for steem

Remove steemitstage and improve coverage for steemnoderpc

Improvements for blockchain parameter reading and nodes benchmark

steem

  • Robustify reading of blockchain parameters

utils

  • improve formatTimedelta output

Examples

  • improve benchmark_nodes by added account history

Speedup wait_for_and_get_block

blockchain

  • reduced times in which get_current_block_num is called
  • when last_fetched_block_num is given, get_current_block_num is only called when block_number is greater than last_fetched_block_num

storage

  • default nodes list enhanced

steemnoderpc

  • Service Temporarily Unavailable and Bad Gateway added to exception detection

graphenerpc

  • check for Service Temporarily Unavailable and Bad Gateway
  • Improved handling of Client returned invalid format. Expected JSON! when output is int

Unit test

  • test_utils fixed

num_retries improved

Steemnoderpc

  • self.errror_cnt_call used instead of local variable doRetryCount

Graphenerpc

  • num_retries_call added for setting a max number of retries on a rpc call
  • self.n_urls added for getting the number of given nodes
  • sleep on retry removed, when switching over to the next node
    self.error_cnt_call used for counting rpc call retries

rpcutils

  • sleep_and_check_retries improved

Unit tests

  • num_retries added
  • test_golos reduced

Add option to set block_numbers as start and stop in history and history revers

Account

  • add option use_block_num to history, history_reverse and get_account_history

Reduce duplicate code

Wallet

  • reduce code duplication

operations

  • reduce code duplication



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  
Loading...

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Cool. I'm trying it out for my project

Well done Holger, I love the amount of work you are putting into this. I haven't tried it out myself yet, but I promise I will soon. Will try to make a test version for one of my bots.

I am maintaining an authority management program called keybox.py.

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by holger80 from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews, and netuoso. The goal is to help Steemit grow by supporting Minnows. Please find us at the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP.
Be sure to leave at least 50SP undelegated on your account.

Hey @holger80 I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x