https://github.com/umd-lib/solrizer
RDF to Solr document converter microservice
https://github.com/umd-lib/solrizer
Last synced: 3 months ago
JSON representation
RDF to Solr document converter microservice
- Host: GitHub
- URL: https://github.com/umd-lib/solrizer
- Owner: umd-lib
- License: apache-2.0
- Created: 2024-07-30T14:09:47.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2026-03-04T01:48:26.000Z (3 months ago)
- Last Synced: 2026-03-04T02:34:28.532Z (3 months ago)
- Language: Python
- Homepage: https://umd-lib.github.io/solrizer/
- Size: 81.1 MB
- Stars: 0
- Watchers: 7
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# solrizer
RDF to Solr document converter microservice
## Configuration
See `solrizer.web`
## Development Setup
Requires Python 3.12
```zsh
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](https://pypi.org/project/edtf/) module to correctly
handle certain Level 2 [EDTF](https://www.loc.gov/standards/datetime/)
date ranges, and it should be installed before the other dependencies.
```zsh
pip install git+https://github.com/peichman-umd/python-edtf.git@68f0b36deee03a355e6bec9f255d718f0d9f032b
pip install -e '.[dev,test]'
```
The [Dockerfile](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
```zsh
flask --app solrizer.web run
```
The application will be available at
### Tests
```zsh
pytest
```
With coverage information:
```zsh
pytest --cov src --cov-report term-missing tests
```
### API Documentation
```zsh
pdoc solrizer
```
API documentation generated by [pdoc](https://pdoc.dev/)
will be available at .
To serve the documentation on an alternate port:
```zsh
pdoc -p 8888 solrizer
```
Now the documentation will be at .
### Docker Image
Build the image:
```zsh
docker build -t docker.lib.umd.edu/solrizer .
```
Run, using the `.env` file set up earlier:
```zsh
docker run --rm -it -p 5000:5000 --env-file .env docker.lib.umd.edu/solrizer
```
## License
See the [LICENSE](LICENSE.md) file for license rights and
limitations (Apache 2.0).