Skip to content

umd-lib/solrizer

Repository files navigation

solrizer

RDF to Solr document converter microservice

Configuration

See solrizer.web

Development Setup

Requires Python 3.12

git clone git@github.com:umd-lib/solrizer.git
cd solrizer
python -m venv --prompt "solrizer-py$(cat .python-version)" .venv
source .venv/bin/activate

Currently (2025-05-06), Solrizer requires a patched version of the python-edtf module to correctly handle certain Level 2 EDTF date ranges, and it should be installed before the other dependencies.

pip install git+https://github.com/peichman-umd/python-edtf.git@68f0b36deee03a355e6bec9f255d718f0d9f032b
pip install -e '.[dev,test]'

The Dockerfile includes this patch as well.

Create a .env file with the following contents:

FLASK_DEBUG=1
SOLRIZER_FCREPO_ENDPOINT={URL of fcrepo instance}
SOLRIZER_FCREPO_JWT_SECRET={shared secret for generating auth tokens}
SOLRIZER_IIIF_IDENTIFIER_PREFIX=fcrepo:
SOLRIZER_IIIF_MANIFESTS_URL_PATTERN={URI template for IIIF manifests}
SOLRIZER_IIIF_THUMBNAIL_URL_PATTERN={URI template for IIIF thumbnail images}
SOLRIZER_INDEXERS_FILE=indexers.yml
SOLRIZER_INDEXER_SETTINGS_FILE=indexer-settings.yml
SOLRIZER_HANDLE_PROXY_PREFIX={URL of handle proxy server}
SOLRIZER_SOLR_QUERY_ENDPOINT={URL of Solr query service}

In the IIIF URI templates, use {+id} as the placeholder for the IIIF identifier.

Running

flask --app solrizer.web run

The application will be available at http://localhost:5000

Tests

pytest

With coverage information:

pytest --cov src --cov-report term-missing tests

API Documentation

pdoc solrizer

API documentation generated by pdoc will be available at http://localhost:8080/.

To serve the documentation on an alternate port:

pdoc -p 8888 solrizer

Now the documentation will be at http://localhost:8888/.

Docker Image

Build the image:

docker build -t docker.lib.umd.edu/solrizer .

Run, using the .env file set up earlier:

docker run --rm -it -p 5000:5000 --env-file .env docker.lib.umd.edu/solrizer

License

See the LICENSE file for license rights and limitations (Apache 2.0).

About

RDF to Solr document converter microservice

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages