Useful tools and wrappers used for indexing MMD in SolR. This software is developed for use in the context of Arctic Data Centre, supported through projects SIOS KC and Norwegian Scientific Data Network.
indexdata -c etc/config.yml -d tests/data -n
SOLRINDEXER_LOGFILE
can be set to enable logging to file.SOLRINDEXER_LOGLEVEL
can be set to change log level. See the Debugging section below.
Install instructions for the solrindexer package.
Make sure to have python3-venv installed.
sudo apt-get install python3-venv
Create a python virtualenv.
python -m venv testenv
Activate the virtualenv.
source testenv/bin/activate
Install the solrindexer package
pip install .
To enable support for thumbnail, additonal dependencies have to be installed.
pip install -r requirements-thumb.txt
Solrindexing depends on cartopy, which cannot be installed in the regular "pip" way. On linux, first install libproj and libgeos:
sudo apt-get install libproj-dev libgeos++-dev
To avoid problems with conflicting versions, we recommend using the Conda package manager. The below steps assume that Conda is installed.
Create a new environment:
conda env create -f environment.yml
Verify that the new environment is registered:
conda info --envs
Activate (use) the new environment:
conda activate solrindexing
Install the solrindexer package:
pip install .
All dependencies should now be installed.
To run python tests, install pytest dependency.
pip install pytest
Run the python tests with
python -m pytest -vv
To run the flake8 code syntax checker, install the flake8 dependency.
pip install flake8
Run the flake8 test
flake8 . --count --max-line-length=99 --ignore E221,E226,E228,E241 --show-source --statistics --exclude external