actinia-core
actinia-core copied to clipboard
actinia file export: resulting zip file contains absolute, not relative path
Exporting a text file from actinia generally works but the packaging is not as advertised.
Export SLD file:
{
"module": "r.colors.out_sld",
"id": "r.colors.out_sld_1804289383",
"inputs":[
{"param": "map", "value": "peaks_CVA_map"},
{"param": "style_name", "value": "GRASS color table"}
],
"outputs":[
{"export": {"format":"TXT", "type":"file"},
"param": "output", "value": "$file::/tmp/peaks_CVA_map.sld"}
]
}
generates:
{'resources': ['https://actinia.mundialis.de/api/v1/resources/demouser/resource_id-deecf214-b355-4755-89bd-0f0b43eba5e3/peaks_CVA_map.sld.txt.zip',
...
which is fine but it contains
unzip peaks_CVA_map.sld.txt.zip
Archive: peaks_CVA_map.sld.txt.zip
inflating: actinia_core/workspace/temp_db/gisdbase_3367cd366c17486bb8b3af8673ae5bd4/.tmp/temp_file_1
instead of the expected peaks_CVA_map.sld.txt
.
The reason might be:
https://github.com/mundialis/actinia_core/blob/29f3549a6ecfcc5cff13c5eee58f26aefb220f0f/src/actinia_core/resources/ephemeral_processing_with_export.py#L427
where temp_file_path
might be undefined.
Any idea?