actinia-cloudevent-plugin


Nameactinia-cloudevent-plugin JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryAn actinia-core plugin which adds example endpoints to actinia-core
upload_time2025-07-10 15:22:34
maintainerNone
docs_urlNone
authorCarmen Tawalika, Anika Weinmann
requires_python>=3.8
licenseNone
keywords processing earth observation cloud-based processing rest api gis grass gis osgeo example
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # actinia-cloudevent-plugin

This is a plugin for [actinia-core](https://github.com/mundialis/actinia_core) which adds cloudevent endpoints and runs as standalone app.

## Installation and Setup

Use docker-compose for installation:
```bash
docker compose -f docker/docker-compose.yml build
docker compose -f docker/docker-compose.yml run --rm --service-ports --entrypoint sh actinia-cloudevent
# within docker
gunicorn -b 0.0.0.0:5000 -w 8 --access-logfile=- -k gthread actinia_cloudevent_plugin.main:flask_app
```

### DEV setup
```bash
# Uncomment the volume mount of the cloud-event-plugin within docker/docker-compose.yml,
# then:
docker compose -f docker/docker-compose.yml build
docker compose -f docker/docker-compose.yml run --rm --service-ports --entrypoint sh actinia-cloudevent
# within docker:
# install the plugin
pip3 install .
# start flask app with actinia-cloudevent-plugin
python3 -m actinia_cloudevent_plugin.main
```

### 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:
```bash
docker compose -f docker/docker-compose-dev.yml down
# remove all custom networks not used by a container
docker network prune
docker compose -f docker/docker-compose-dev.yml up -d
```

## Configuration

- the URL of the cloudevent receiver is defined within [config/mount/sample.ini](config/mount/sample.ini): `[EVENTRECEIVER]` (Default value defined within [src/actinia_cloudevent_plugin/resources/config.py](src/actinia_cloudevent_plugin/resources/config.py))

## Requesting endpoint

**Note**: Assuming cloudevent-plugin is running as described in previous setup.

You can test the plugin and request the `/` endpoint, e.g. with:
```bash
# Start server for receiving of cloudevents (which are returned as response)
# NOTE: as defined within config/mount/sample.ini: [EVENTRECEIVER]
python3 tests/cloudevent_receiver_server.py

# In another terminal
JSON=tests/examples/cloudevent_example.json
curl -X POST -H 'Content-Type: application/json' --data @$JSON localhost:5000/api/v1/ | jq
```

Exemplary returned cloudevent: [tests/examples/cloudevent_example_return.json](tests/examples/cloudevent_example_return.json)

## Hints

* If you have no `.git` folder in the plugin folder, you need to set the
`SETUPTOOLS_SCM_PRETEND_VERSION` before installing the plugin:
    ```bash
    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-cloudevent-plugin'.`.

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

## Running tests
You can run the tests in the actinia test docker:

```bash
# Uncomment the volume mount of the cloud-event-plugin within docker/docker-compose.yml,
# then:
docker compose -f docker/docker-compose.yml build
docker compose -f docker/docker-compose.yml run --rm --service-ports --entrypoint sh actinia-cloudevent

# run all tests
make test

# # run only unittests
# make unittest

# run only integrationtests
make integrationtest

# run only tests which are marked for development with the decorator '@pytest.mark.dev'
make devtest
```

## Hint for the development of actinia plugins

### skip permission check
The parameter [`skip_permission_check`](https://github.com/mundialis/actinia_core/blob/main/src/actinia_core/processing/actinia_processing/ephemeral_processing.py#L1420-L1422) (see [example in actinia-statistic plugin](https://github.com/mundialis/actinia_statistic_plugin/blob/master/src/actinia_statistic_plugin/vector_sampling.py#L207))
should only be set to `True` if you are sure that you really don't want to check the permissions.

The skip of the permission check leads to a skipping of:
* [the module check](https://github.com/mundialis/actinia_core/blob/main/src/actinia_core/processing/actinia_processing/ephemeral_processing.py#L579-L589)
* [the limit of the number of processes](https://github.com/mundialis/actinia_core/blob/main/src/actinia_core/processing/actinia_processing/ephemeral_processing.py#L566-L570)
* the limit of the processing time

Not skipped are:
* the limit of the cells
* the mapset/project limitations of the user

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "actinia-cloudevent-plugin",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "processing, earth observation, cloud-based processing, rest api, gis, grass gis, osgeo, example",
    "author": "Carmen Tawalika, Anika Weinmann",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/e4/e6/a36cd73d22085e73f05c81a2a935e671df463d977a4be79ec227f68af2f3/actinia_cloudevent_plugin-0.1.0.tar.gz",
    "platform": null,
    "description": "# actinia-cloudevent-plugin\n\nThis is a plugin for [actinia-core](https://github.com/mundialis/actinia_core) which adds cloudevent endpoints and runs as standalone app.\n\n## Installation and Setup\n\nUse docker-compose for installation:\n```bash\ndocker compose -f docker/docker-compose.yml build\ndocker compose -f docker/docker-compose.yml run --rm --service-ports --entrypoint sh actinia-cloudevent\n# within docker\ngunicorn -b 0.0.0.0:5000 -w 8 --access-logfile=- -k gthread actinia_cloudevent_plugin.main:flask_app\n```\n\n### DEV setup\n```bash\n# Uncomment the volume mount of the cloud-event-plugin within docker/docker-compose.yml,\n# then:\ndocker compose -f docker/docker-compose.yml build\ndocker compose -f docker/docker-compose.yml run --rm --service-ports --entrypoint sh actinia-cloudevent\n# within docker:\n# install the plugin\npip3 install .\n# start flask app with actinia-cloudevent-plugin\npython3 -m actinia_cloudevent_plugin.main\n```\n\n### Installation hints\n* If you get an error like: `ERROR: for docker_kvdb_1  Cannot start service valkey: network xxx not found` you can try the following:\n```bash\ndocker compose -f docker/docker-compose-dev.yml down\n# remove all custom networks not used by a container\ndocker network prune\ndocker compose -f docker/docker-compose-dev.yml up -d\n```\n\n## Configuration\n\n- the URL of the cloudevent receiver is defined within [config/mount/sample.ini](config/mount/sample.ini): `[EVENTRECEIVER]` (Default value defined within [src/actinia_cloudevent_plugin/resources/config.py](src/actinia_cloudevent_plugin/resources/config.py))\n\n## Requesting endpoint\n\n**Note**: Assuming cloudevent-plugin is running as described in previous setup.\n\nYou can test the plugin and request the `/` endpoint, e.g. with:\n```bash\n# Start server for receiving of cloudevents (which are returned as response)\n# NOTE: as defined within config/mount/sample.ini: [EVENTRECEIVER]\npython3 tests/cloudevent_receiver_server.py\n\n# In another terminal\nJSON=tests/examples/cloudevent_example.json\ncurl -X POST -H 'Content-Type: application/json' --data @$JSON localhost:5000/api/v1/ | jq\n```\n\nExemplary returned cloudevent: [tests/examples/cloudevent_example_return.json](tests/examples/cloudevent_example_return.json)\n\n## Hints\n\n* If you have no `.git` folder in the plugin folder, you need to set the\n`SETUPTOOLS_SCM_PRETEND_VERSION` before installing the plugin:\n    ```bash\n    export SETUPTOOLS_SCM_PRETEND_VERSION=0.0\n    ```\n    Otherwise you will get an error like this `LookupError: setuptools-scm was unable to detect version for '/src/actinia-cloudevent-plugin'.`.\n\n* If you make changes in code and nothing changes you can try to uninstall the plugin:\n    ```bash\n    pip3 uninstall actinia-cloudevent-plugin.wsgi -y\n    rm -rf /usr/lib/python3.8/site-packages/actinia_cloudevent_plugin.wsgi-*.egg\n    ```\n\n## Running tests\nYou can run the tests in the actinia test docker:\n\n```bash\n# Uncomment the volume mount of the cloud-event-plugin within docker/docker-compose.yml,\n# then:\ndocker compose -f docker/docker-compose.yml build\ndocker compose -f docker/docker-compose.yml run --rm --service-ports --entrypoint sh actinia-cloudevent\n\n# run all tests\nmake test\n\n# # run only unittests\n# make unittest\n\n# run only integrationtests\nmake integrationtest\n\n# run only tests which are marked for development with the decorator '@pytest.mark.dev'\nmake devtest\n```\n\n## Hint for the development of actinia plugins\n\n### skip permission check\nThe parameter [`skip_permission_check`](https://github.com/mundialis/actinia_core/blob/main/src/actinia_core/processing/actinia_processing/ephemeral_processing.py#L1420-L1422) (see [example in actinia-statistic plugin](https://github.com/mundialis/actinia_statistic_plugin/blob/master/src/actinia_statistic_plugin/vector_sampling.py#L207))\nshould only be set to `True` if you are sure that you really don't want to check the permissions.\n\nThe skip of the permission check leads to a skipping of:\n* [the module check](https://github.com/mundialis/actinia_core/blob/main/src/actinia_core/processing/actinia_processing/ephemeral_processing.py#L579-L589)\n* [the limit of the number of processes](https://github.com/mundialis/actinia_core/blob/main/src/actinia_core/processing/actinia_processing/ephemeral_processing.py#L566-L570)\n* the limit of the processing time\n\nNot skipped are:\n* the limit of the cells\n* the mapset/project limitations of the user\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "An actinia-core plugin which adds example endpoints to actinia-core",
    "version": "0.1.0",
    "project_urls": {
        "API_Docs": "https://redocly.github.io/redoc/?url=https://actinia.mundialis.de/latest/swagger.json",
        "Homepage": "https://github.com/mundialis/actinia-cloudevent-plugin",
        "Tutorial": "https://mundialis.github.io/actinia_core"
    },
    "split_keywords": [
        "processing",
        " earth observation",
        " cloud-based processing",
        " rest api",
        " gis",
        " grass gis",
        " osgeo",
        " example"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "68e12063f83a80a791bb611cee677dd159a0043f89c93b6b0f155e3b3d0b9093",
                "md5": "c8bf2d31779c69955e5c6a4caa330a7f",
                "sha256": "1940b5b9818a854a1f80370ffc6379940573469bbac00119c933ec56f95fea5b"
            },
            "downloads": -1,
            "filename": "actinia_cloudevent_plugin-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c8bf2d31779c69955e5c6a4caa330a7f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 28456,
            "upload_time": "2025-07-10T15:22:33",
            "upload_time_iso_8601": "2025-07-10T15:22:33.513616Z",
            "url": "https://files.pythonhosted.org/packages/68/e1/2063f83a80a791bb611cee677dd159a0043f89c93b6b0f155e3b3d0b9093/actinia_cloudevent_plugin-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "e4e6a36cd73d22085e73f05c81a2a935e671df463d977a4be79ec227f68af2f3",
                "md5": "007142198727084a55ac804bc0ae5731",
                "sha256": "572a0aa60be82de429c239921a949975f63c0ee79ac2ebb250d631476c7344b7"
            },
            "downloads": -1,
            "filename": "actinia_cloudevent_plugin-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "007142198727084a55ac804bc0ae5731",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 24587,
            "upload_time": "2025-07-10T15:22:34",
            "upload_time_iso_8601": "2025-07-10T15:22:34.721800Z",
            "url": "https://files.pythonhosted.org/packages/e4/e6/a36cd73d22085e73f05c81a2a935e671df463d977a4be79ec227f68af2f3/actinia_cloudevent_plugin-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-10 15:22:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mundialis",
    "github_project": "actinia-cloudevent-plugin",
    "github_not_found": true,
    "lcname": "actinia-cloudevent-plugin"
}
        
Elapsed time: 1.27272s