Utils for working with the Distributed Annotation and Enrichment system
Project description
DANE
The Distributed Annotation 'n' Enrichment (DANE) system handles compute task assignment and file storage for the automatic annotation of content.
This repository contains contains the building blocks for with DANE, such as creating custom analysis workers or submitting new task.
Installation
This package can be installed through pip:
pip install dane
Configuration
DANE components are configured through the dane.config module, which is described here: https://dane.readthedocs.io/en/latest/intro.html#configuration
It is however noteable that, because all DANE components are expected to rely on it, some of the DANE-server, ElasticSearch and RabbitMQ configuration
are included in the default config. As such it is recommended that you create a $HOME/.dane/config.yml
or $DANE_HOME/config.yml
which contain machine-wide settings for how to connect to these services, which involves specifying the following settings:
DANE:
API_URL: 'http://localhost:5500/DANE/'
MANAGE_URL: 'http://localhost:5500/manage/'
RABBITMQ:
HOST: 'localhost'
PORT: 5672
EXCHANGE: 'DANE-exchange'
RESPONSE_QUEUE: 'DANE-response-queue'
USER: 'guest'
PASSWORD: 'guest'
ELASTICSEARCH:
HOST: ['localhost']
PORT: 9200
USER: 'elastic'
PASSWORD: 'changeme'
SCHEME: 'http'
INDEX: 'your_dane_index'
The values given here are the default values.
Usage
Examples of how to use DANE can be found in the examples/
directory.
Local Development
We moved from setup.py
& requirements.txt
to a single pyproject.toml
. For local builds and publishing we use poetry.
For local installation:
poetry install
poetry shell
After installation the following unit test should succeed:
python -m test.test_dane
To build a wheel + source package (will end up in dist
directory):
poetry build
The wheel can be conveniently tested in e.g. your own DANE worker by installing it e.g. using pip
:
pip install path_to_dane_wheel_file
or with poetry
poetry add path_to_dane_wheel_file
Breaking changes after 0.3.1
Since version 0.3.1 DANE must be imported in lowercase letters:
import dane
Before version 0.3.1 you should import using uppercase letters:
import DANE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dane-0.4.3.tar.gz
.
File metadata
- Download URL: dane-0.4.3.tar.gz
- Upload date:
- Size: 32.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.7 Linux/5.15.146.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1af481db2e9c69ff69a4b28281ca1512ec5ef7fb15155616993b28666b99f63 |
|
MD5 | 4bc00ae4acbd996147948975d537db0b |
|
BLAKE2b-256 | 733931fd1af94b766e13cdb43846f0350178ce05aca11b4eaf0c5e036cf601fa |
File details
Details for the file dane-0.4.3-py3-none-any.whl
.
File metadata
- Download URL: dane-0.4.3-py3-none-any.whl
- Upload date:
- Size: 39.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.7 Linux/5.15.146.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd695608caf43f9b9f943e5d0c4b35f5434f6d84b77d37d231bfc857333d61f6 |
|
MD5 | 34c0479bc39e9c144d8e315b1e0bb0a8 |
|
BLAKE2b-256 | c2feae8eb08e052dd05a4b49cc69c42b01f500b7bdebda9480b7aca58ba4d2a9 |