# lcmap-change-worker
worker for initiating change detection jobs, and sending results to the data store
## Install
```bash
# locally
$ pip install -e.
```
## Usage
```bash
# lcw-listen is available following install with pip
$ lcw-listen
# lcw-test-send will send stdin to the LCW_RABBIT_EXCHANGE
$ lcw-test-send '{"some":"message"}'
```
```python
# same effect as lcw-listen
from cw import __listener__
__listener__.main()
# useful for sending test messages only.
from cw import __sender__
message = '{"x": 123, "y": 456, "algorithm": "pyccd-beta1", "result": "OUTPUT"}'
__sender__.main(message)
```
## Configuration
landsat-change-worker is configurable with the following environment variables
| Variable | Default | Description |
| --- | --- | --- |
| `LCW_RABBIT_HOST` | localhost | RabbitMQ Host |
| `LCW_RABBIT_PORT` | 5672 | RabbitMQ Port |
| `LCW_RABBIT_QUEUE` | local.lcmap.changes.worker | Queue for LCW to listen for messages |
| `LCW_RABBIT_EXCHANGE` | local.lcmap.changes.worker | Exchange for LCW to publish messages |
| `LCW_RABBIT_RESULT_ROUTING_KEY` | change-detection-result | Routing key used when publishing change detection result messages |
| `LCW_RABBIT_SSL` | False | Enable/Disable SSL. True/False |
## Developing & Testing
Get the local environment ready for development and testing.
```bash
$ git clone git@github.com:usgs-eros/lcmap-change-worker
$ cd lcmap-change-worker
$ virtualenv -p python3 .venv
$ . .venv/bin/activate
$ pip install -e .[test]
$ pip install -e .[dev]
```
Run tests:
```bash
# the right way
$ python setup.py test
# alternatively
$ pytest
```
## Deploying
Metadata
Release files for lcmap-change-worker 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lcmap-change-worker-0.1.0.tar.gz | 7.6 kB | Without provenance | Details for lcmap-change-worker-0.1.0.tar.gz |
Release files / lcmap-change-worker-0.1.0.tar.gz
| Download URL | lcmap-change-worker-0.1.0.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8498b7e122971404850e37b201d2290a06dec769bd7dd4eaaed430ed5ef66674
|
|
BLAKE2b-256 checksum How to use checksums |
2b3e4b015766e95a81735fd1926592d68bd3a2f5e88fa2020e0854428a6d609c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for lcmap-change-worker 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.