Depending on which features of Great Expectations you want to work on, you may want to configure different backends for local testing, such as postgresql and Spark. Also, there are a couple of extra steps if you want to build documentation locally.

If you want to develop against local postgresql:

To simplify setup, the repository includes a docker-compose file that can stand up a local postgresql container. To use it, you’ll need to have docker installed.

Navigate to assets/docker/postgresql in your great_expectations repo and run docker-composeup-d

Within the same directory, you can run docker-composeps to verify that the container is running. You should see something like:

Name Command State Ports
———————————————————————————————————————————
postgresql_travis_db_1 docker-entrypoint.sh postgres Up 0.0.0.0:5432->5432/tcp

Once you’re done testing, you can shut down your postgesql container by running docker-composedown from the same directory.

Caution: If another service is using port 5432, docker may start the container but silently fail to set up the port. In that case, you will probably see errors like this:

psycopg2.OperationalError: could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?