Contributing¶
Thank you for your interest in contributing! Please read along to learn how to get started.
Running the tests¶
We create a seperate database to run our tests, so it does not interfere with the current synced database.
Use the following command to create a new database:
$ createdb ether_sql_tests
If you are testing using Infura node use the command:
$ python -m pytest tests/infura
If you are using a local parity node use the command:
$ python -m pytest tests/parity
Updating the database tables¶
We use Alembic to handle database migrations.
You can create new tables by adding a new class in the ether_sql/models
module. More details on available columns are available at SQLAlchemy guides
To create SQL commands that can reflect the changes in the database, run the following command.
$ ether_sql sql migrate -m "message for changes"
Next upgrade the database using the following command:
$ ether_sql sql upgrade
Updating the docs¶
We suggest to create different virtual enviornment for updating the docs.
$ virtualenv venvdocs
$ source venvdocs/bin/activate
$ pip install -e . requirements.txt
We use Sphinx to automate the documentation of python modules and sphinx-click to automate building docs of click commands.
Pull Requests¶
Once all the tests are passing generate a pull request and we will merge the contribution after a discussion.