Mink is Språkbanken Text's data platform, allowing users to upload corpus data, annotate it with Sparv, and view or search it in Korp and Strix.
The Mink backend is a FastAPI application serving as a backend to the Mink frontend.
The source code is available under the MIT license. If you have any questions, problems or suggestions please contact [email protected].
- Python 3.11 or newer
- memcached
Install the requirements listed in requirements-dev.txt e.g. by using a Python virtual environment. Start the
development server:
python run.py [--host <host>] [--port <port>]Start the queue manager:
python queue_manager.pyNow your development server should be up and running and you should be able to access the documentation pages (http://localhost:8000/docs).
The default configuration is defined in config.py. To override these settings, create a .env file in the project's
root directory and set the environment variables listed in config.py. For examples, see the developer's
guide.
To enable tracking to Matomo, set the following config variables:
TRACKING_MATOMO_URL- url to matomoTRACKING_MATOMO_IDSITE- id for this site (get from matomo admin)TRACKING_MATOMO_AUTH_TOKEN- access token to enable tracking IP numbers
The automatic tests are run with pytest. Make sure you have the dev dependencies installed (e.g. by running pip install -r requirements-dev.txt), and then run:
pytest [--custom-log-level=<log_level>] [--mink-log-level=<log_level>] [-k <test_name>]