actinia-grassdata-management-plugin
This is an example plugin for actinia-core which adds a "Hello World" endpoint to actinia-core.
You can run actinia-grassdata-management-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 foundyou 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
Requesting helloworld endpoint
You can test the plugin and request the /helloworld endpoint, e.g. with:
curl -u actinia-gdi:actinia-gdi -X GET http://localhost:8088/api/v3/helloworld | jq
curl -u actinia-gdi:actinia-gdi -H 'accept: application/json' -H 'Content-Type: application/json' -X POST http://localhost:8088/api/v3/helloworld -d '{"name": "test"}' | jq
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-grassdata-management-plugin && python3 setup.py install)
# start actinia-core with your plugin
sh /src/start.sh
# gunicorn -b 0.0.0.0:8088 -w 1 --access-logfile=- -k gthread actinia_core.main:flask_app
Hints
- If you have no
.gitfolder in the plugin folder, you need to set theSETUPTOOLS_SCM_PRETEND_VERSIONbefore 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-grassdata-management-plugin'..
- If you make changes in code and nothing changes you can try to uninstall the plugin:
pip3 uninstall actinia-grassdata-management-plugin.wsgi -y
rm -rf /usr/lib/python3.8/site-packages/actinia_grassdata_management_plugin.wsgi-*.egg
Running tests
You can run the tests in the actinia test docker:
docker build -f docker/actinia-grassdata-management-plugin-test/Dockerfile -t actinia-grassdata-management-plugin-test .
docker run -it -w /src/actinia-grassdata-management-plugin/ actinia-grassdata-management-plugin-test -i
# 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
Starting steps for own plugin
If you want to have your own plugin you can use this repo to create it by
executing the scripts/create_own_plugin.sh.
If you want the repo in git then you first have to create an empty git repository and then run the script. Then follow the last instructions from the script to upload the initial code to your git repository.
bash create_own_plugin.sh actinia-ex2-plugin git
If you only want your own plugin in a folder and not in git you can execute the script like this:
bash create_own_plugin.sh actinia-ex2-plugin
Hint for the development of actinia plugins
skip permission check
The parameter skip_permission_check (see example in actinia-statistic plugin)
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
- the limit of the number of processes
- the limit of the processing time
Not skipped are:
- the limit of the cells
- the mapset/project limitations of the user
Metadata
Release files for actinia-grassdata-management-plugin 1.0.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 |
|---|---|---|---|---|
| actinia_grassdata_management_plugin-1.0.0.tar.gz | 52.5 kB | Without provenance | Details for actinia_grassdata_management_plugin-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| actinia_grassdata_management_plugin-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for actinia_grassdata_management_plugin-1.0.0-py3-none-any.whl |
Total release size: 139.7 kB
Release files / actinia_grassdata_management_plugin-1.0.0.tar.gz
| Download URL | actinia_grassdata_management_plugin-1.0.0.tar.gz |
|---|---|
| Size | 52.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
723d49b3007eaae3be24069975ba3b9c2cd6b2b67853d1a05b9e11f8c7f2a5f9
|
|
BLAKE2b-256 checksum How to use checksums |
6b2cabce2498547d3478ed3ddcbcd2193c5870b2012976444ec1215ab5f9bc5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / actinia_grassdata_management_plugin-1.0.0-py3-none-any.whl
| Download URL | actinia_grassdata_management_plugin-1.0.0-py3-none-any.whl |
|---|---|
| Size | 87.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0acc4ad98d648bacb3cb30091380c08283892e39360efe2796f4eeef1dd175a8
|
|
BLAKE2b-256 checksum How to use checksums |
46b50ad83a132736a2e7657ab37900319392bb4a3f94c9d707d13f9366b75566
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for actinia-grassdata-management-plugin 1.0.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.