Metadata-Version: 2.1
Name: dane
Version: 0.4.2
Summary: Utils for working with the Distributed Annotation and Enrichment system
Home-page: https://github.com/CLARIAH/DANE
License: Apache-2.0
Author: Nanne van Noord
Author-email: n.j.e.vannoord@uva.nl
Requires-Python: >=3.10,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: boto3 (>=1.26.155,<2.0.0)
Requires-Dist: elasticsearch7 (>=7.17.7,<8.0.0)
Requires-Dist: pika (>=1.3.1,<2.0.0)
Requires-Dist: requests (>=2.28.1,<3.0.0)
Requires-Dist: urllib3 (>=1.26.12,<2.0.0)
Requires-Dist: yacs (>=0.1.8,<0.2.0)
Project-URL: Repository, https://github.com/CLARIAH/DANE
Description-Content-Type: text/markdown

# 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](https://python-poetry.org/).

For local installation:

```bash
poetry install
poetry shell
```

After installation the following unit test should succeed:

```bash
python -m test.test_dane
```

To build a wheel + source package (will end up in `dist` directory):

```bash
poetry build
```

The wheel can be conveniently tested in e.g. your own DANE worker by installing it e.g. using `pip`:

```bash
pip install path_to_dane_wheel_file
```

or with poetry

```bash
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:

```python
import dane
```

Before version 0.3.1 you should import using uppercase letters:

```python
import DANE
```
