earthworks icon indicating copy to clipboard operation
earthworks copied to clipboard

Geospatial discovery application for Stanford University Libraries.

EarthWorks

CI

Geospatial discovery application for Stanford University Libraries, built using GeoBlacklight.

bay area video arcades slideshow preview

Developing

Pre-requisites

  • Ruby 3.1 or 3.2. Other versions may work but are unsupported.

Installing

Pull down the code:

git clone [email protected]:sul-dlss/earthworks.git

Unless using Docker (see below), proceed to install dependencies and prepare the database:

bin/setup

Start an Apache Solr instance using solr_wrapper:

solr_wrapper

Finally, start the development web server:

bin/rails server

Using Docker

A more production-like setup using Redis and Postgresql is available via Docker. To create the stack:

docker compose up

Then, to prepare the database:

docker compose exec app bin/setup

Most other commands can be run by prepending docker compose exec app to the command, which will execute the command in the app container.

Adding data

To add a small amount of test records to the Solr index, you can use the seed task:

bin/rake geoblacklight:solr:seed

You can also fetch records from OpenGeoMetadata using GeoCombine:

export OGM_PATH=tmp/opengeometadata     # location to store data
bin/rake geocombine:clone[edu.nyu]      # pull data from NYU
bin/rake geocombine:index               # index data in Solr

At Stanford, geospatial data is transformed and indexed by the gis-robot-suite.

Testing

You can run the full suite of tests with the ci command. Do not run this while ssh tunneled as it may delete the production index!

bin/rake ci

There is also a separate suite of "data integration" tests, which are intended to be run against a production search index.

export TEST_SOLR_URL=http://example.com:8080/solr/core_name
bin/rake integration