analyseether / ether_sql

A python library to push ethereum blockchain data into an sql database.
http://ether-sql.readthedocs.io
Apache License 2.0
69 stars 22 forks source link

WIP: Added the method export_to_csv and its relevant cli #20

Closed ankitchiplunkar closed 6 years ago

ankitchiplunkar commented 6 years ago

Types of changes

What types of changes does your code introduce to ether_sql? Put an x in the boxes that apply

Explain your changes

This is a response to the issue: https://github.com/analyseether/ether_sql/issues/15

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

Any relevant logs, error output, etc?

Sometimes the tests pass but several times they get stuck. I think the issue is due to not properly closing the session of sqlalchemy. https://stackoverflow.com/questions/26350911/what-to-do-when-a-py-test-hangs-silently?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

(ether_sql) ankit@ankit-X541UAK:~/projects/ether_sql$ python -m pytest -vv tests/infura/test_sql.py 
============================================================= test session starts =============================================================
platform linux -- Python 3.5.5, pytest-3.0.0, py-1.5.3, pluggy-0.3.1 -- /home/ankit/anaconda3/envs/ether_sql/bin/python
cachedir: .cache
rootdir: /home/ankit/projects/ether_sql, inifile: 
plugins: cov-2.2.1
collected 4 items 

tests/infura/test_sql.py::TestEmptyDB::test_create_db PASSED
tests/infura/test_sql.py::TestEmptyDB::test_remove_db PASSED
tests/infura/test_sql.py::TestEmptyDB::test_block_number PASSED
tests/infura/test_sql.py::TestEmptyDB::test_export_to_csv 

The tests are stuck on the last step since forever.

Any other comments?

This pull request is still a work in progress

Where has this been tested?

Operating System: Ubuntu 16.04 Node: Parity

ankitchiplunkar commented 6 years ago

Need to remove samimilar codes from infura and parity tests have opened https://github.com/analyseether/ether_sql/issues/21 to log this issue.