Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dane-0.3.7.tar.gz (30.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dane-0.3.7-py3-none-any.whl (36.9 kB view details)

Uploaded Python 3

File details

Details for the file dane-0.3.7.tar.gz.

File metadata

  • Download URL: dane-0.3.7.tar.gz
  • Upload date:
  • Size: 30.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.6 Linux/5.15.90.1-microsoft-standard-WSL2

File hashes

Hashes for dane-0.3.7.tar.gz
Algorithm Hash digest
SHA256 acfe1e418d4a202faddab61b4cdabe3b017393cf210ce4a8fff61310802a9a73
MD5 f0dc5c760a256f1f1fdd1e71dcc2611b
BLAKE2b-256 a35943cd4c2479a4815e2be35cefff80d88f3aadd51ef7dcd4ecb9aaeba013ca

See more details on using hashes here.

File details

Details for the file dane-0.3.7-py3-none-any.whl.

File metadata

  • Download URL: dane-0.3.7-py3-none-any.whl
  • Upload date:
  • Size: 36.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.6 Linux/5.15.90.1-microsoft-standard-WSL2

File hashes

Hashes for dane-0.3.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3d12a47ee91e643d32d676c7ca1038a5bfd384d70c23b308919373c8cf271a4f
MD5 bcbd3462dffd8e3cab4fc7f7b2569160
BLAKE2b-256 6540ae06604d37ab9369792145d4db5aff6e0f9b5280764ead95ce546ff5b905

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page