Skip to main content

actinia-parallel-plugin

This is the actinia-parallel-plugin for actinia-core which adds parallel processing endpoints to actinia.

You can run actinia-parallel-plugin as an actinia-core plugin.

Installation

Use docker compose for installation:

docker compose -f docker/docker-compose.yml build
docker compose -f docker/docker-compose.yml up -d

Installation hints

  • If you get an error like: ERROR: for docker_kvdb_1 Cannot start service valkey: network xxx not found you can try the following:
docker compose -f docker/docker-compose.yml down
# remove all custom networks not used by a container
docker network prune
docker compose -f docker/docker-compose.yml up -d

DEV setup

For a DEV setup you can use the docker/docker-compose.yml:

docker compose -f docker/docker-compose.yml build
docker compose -f docker/docker-compose.yml run --rm --service-ports --entrypoint sh actinia

# install the plugin
(cd /src/actinia-parallel-plugin && pip3 install .)
# start actinia-core with your plugin
gunicorn -b 0.0.0.0:8088 -w 1 --access-logfile=- -k gthread actinia_core.main:flask_app

# or for debugging in one line with reset
reset && (cd /src/actinia-parallel-plugin && pip3 install .) && gunicorn -b 0.0.0.0:8088 -w 3 --access-logfile=- -k gthread actinia_core.main:flask_app

PostGIS

Connect to PostGIS DB from actinia-core docker container:

psql -U actinia -h postgis -d gis

Hints

  • If you have no .git folder in the plugin folder, you need to set the SETUPTOOLS_SCM_PRETEND_VERSION before installing the plugin:
export SETUPTOOLS_SCM_PRETEND_VERSION=0.0

Otherwise you will get an error like this: LookupError: setuptools-scm was unable to detect version for '/src/actinia-parallel-plugin'..

  • If you make changes in code and nothing changes you can try to uninstall the plugin:
pip3 uninstall actinia-parallel-plugin.wsgi -y
rm -rf /usr/lib/python3.8/site-packages/actinia_parallel_plugin.wsgi-*.egg

Running tests

You can run the tests in the actinia test docker:

docker compose -f docker/docker-compose-test.yml build
docker compose -f docker/docker-compose-test.yml up -d

# exec docker and run tests manually
docker exec -it docker_actinia-test_1 sh

# run all tests
make test

# run only unittests
make unittest
# run only integrationtests
make integrationtest

# or run tests outside of docker container
docker exec -it docker_actinia-test_1 sh /usr/bin/run_integration_tests.sh
docker exec -it docker_actinia-test_1 sh /usr/bin/run_unittests.sh

docker compose -f docker/docker-compose-test.yml down

You can also run the tests in the GHA workflows locally via act. To run docker compose inside a workflow act_base can be used. With these you can run the following to run the tests:

# list all workflows
act -l

# run workflow
act -j integration-tests -P ubuntu-latest=lucasalt/act_base:latest
act -j unittests -P ubuntu-latest=lucasalt/act_base:latest

Examples

Requesting batch job and job endpoints

# request batch job
curl -u actinia-gdi:actinia-gdi -X GET http://localhost:8088/api/v3/resources/actinia-gdi/batches/1 | jq
# request job
curl -u actinia-gdi:actinia-gdi -X GET http://localhost:8088/api/v3/resources/actinia-gdi/batches/1/jobs/1 | jq

Start parallel batch job

Ephemeral processing

You can start a parallel ephemeral batch job via:

# parallel ephemeral processing
curl -u actinia-gdi:actinia-gdi -X POST -H 'Content-Type: application/json' -d @test_postbodies/parallel_ephemeral_processing.json http://localhost:8088/api/v3/projects/nc_spm_08_grass7_root/processing_parallel | jq

Attention:

  • The individual process chains must be "independent" of each other, since createBatch is designed as an ephemeral process.

TODOs:

  • exporter in PC
  • using stdout/export in PC of next block

Metadata

Release files for actinia-parallel-plugin 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for actinia-parallel-plugin 1.2.0
File Size Uploaded Provenance Actions
actinia_parallel_plugin-1.2.0.tar.gz 39.6 kB Without provenance Details for actinia_parallel_plugin-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for actinia-parallel-plugin 1.2.0
File Interpreter ABI Platform Actions
actinia_parallel_plugin-1.2.0-py3-none-any.whl Python 3 none any Details for actinia_parallel_plugin-1.2.0-py3-none-any.whl

Total release size: 91.4 kB

Release files / actinia_parallel_plugin-1.2.0.tar.gz

Download URL actinia_parallel_plugin-1.2.0.tar.gz
Size 39.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b7196a6858fa18669e22e89e1d7a4c497ab981948b44d366fc888132618a4a26
BLAKE2b-256 checksum
How to use checksums
44b1486bc00d17e80bc4302c0c3cbc68c9b847aee0bc7edaf7b82fb32cd370fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / actinia_parallel_plugin-1.2.0-py3-none-any.whl

Download URL actinia_parallel_plugin-1.2.0-py3-none-any.whl
Size 51.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74ea5a7cd09def3d0b63283e21d40d49e27d999af6f82c6f217e52edb07b0376
BLAKE2b-256 checksum
How to use checksums
b08e574ce098e6c95e3b90879781ef584fde67e1f9162716358464ee79ad1ad0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Security for actinia-parallel-plugin 1.2.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.

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page