https://github.com/actinia-org/actinia-example-plugin
A small example plugin for actinia-core.
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.4%) to scientific vocabulary
Keywords
Repository
A small example plugin for actinia-core.
Basic Info
Statistics
- Stars: 1
- Watchers: 5
- Forks: 1
- Open Issues: 2
- Releases: 2
Topics
Metadata Files
README.md
actinia-example-plugin
This is an example plugin for actinia-core which adds a "Hello World" endpoint to actinia-core.
You can run actinia-example-plugin as an actinia-core plugin.
Installation
Use docker-compose for installation:
bash
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:bash 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:
```bash
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: ```bash 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-example-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 actiniacore.main:flaskapp
```
Hints
If you have no
.gitfolder in the plugin folder, you need to set theSETUPTOOLS_SCM_PRETEND_VERSIONbefore installing the plugin:bash export SETUPTOOLS_SCM_PRETEND_VERSION=0.0Otherwise you will get an error like thisLookupError: setuptools-scm was unable to detect version for '/src/actinia-example-plugin'..If you make changes in code and nothing changes you can try to uninstall the plugin:
bash pip3 uninstall actinia-example-plugin.wsgi -y rm -rf /usr/lib/python3.8/site-packages/actinia_example_plugin.wsgi-*.egg
Running tests
You can run the tests in the actinia test docker:
```bash docker build -f docker/actinia-example-plugin-test/Dockerfile -t actinia-example-plugin-test . docker run -it actinia-example-plugin-test -i
cd /src/actinia-example-plugin/
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
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
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
Owner
- Name: actinia
- Login: actinia-org
- Kind: organization
- Website: https://actinia.mundialis.de
- Repositories: 22
- Profile: https://github.com/actinia-org
The geoprocessing platform actinia analyses large volumes of Earth-observation and geodata in the cloud. Repo overview at https://actinia-org.github.io/
GitHub Events
Total
- Release event: 1
- Delete event: 5
- Push event: 57
- Pull request review event: 75
- Pull request review comment event: 180
- Pull request event: 21
- Fork event: 1
- Create event: 11
Last Year
- Release event: 1
- Delete event: 5
- Push event: 57
- Pull request review event: 75
- Pull request review comment event: 180
- Pull request event: 21
- Fork event: 1
- Create event: 11
Dependencies
- actions/checkout v4 composite
- actions/checkout v4 composite
- actions/setup-python v5 composite
- actions/checkout v4 composite
- actions/setup-python v5 composite
- softprops/action-gh-release v2 composite
- actions/checkout v4 composite
- github/super-linter v5 composite
- actions/checkout v4 composite
- docker/build-push-action v5 composite
- docker/setup-buildx-action v3 composite
- mundialis/actinia-core latest build
- mundialis/actinia-core latest build
- redis 5.0.4-alpine