Autodetect tentacle zip root folder
Admin
The tentacle archive root folder is hard coded:
If we detected the root folder automatically, a tentacle developer could simply use a git release to share tentacles (zip root folder is repo name).
Admin
Dennis Straffin - Apr 2021
Sorry I wasn't clear. I don't wish to automatically load up tenatacles from a url on startup, but wish to be able to easily create and share tentacles with the community.
The internal directory structure of a tentacle zip file currently requires a directory called "reference_tentacles" as created by tentacles-manager:
$ unzip -l any_platform.zip
Archive: any_platform.zip
Length Date Time Name
0 2021-04-15 12:18 reference_tentacles/
0 2021-04-15 10:55 reference_tentacles/Evaluator/
0 2021-04-15 11:06 reference_tentacles/Evaluator/TA/
0 2021-04-15 11:07 reference_tentacles/Evaluator/TA/oscillator_evaluator/
0 2021-04-15 11:50 reference_tentacles/Evaluator/TA/oscillator_evaluator/config/
0 2021-04-15 11:49 reference_tentacles/Evaluator/TA/oscillator_evaluator/resources/
52 2021-04-15 12:00 reference_tentacles/Evaluator/TA/oscillator_evaluator/__init__.py
2895 2021-04-15 12:18 reference_tentacles/Evaluator/TA/oscillator_evaluator/oscillator.py
149 2021-04-15 11:48 reference_tentacles/Evaluator/TA/oscillator_evaluator/metadata.json
85 2021-04-15 11:57 reference_tentacles/Evaluator/TA/oscillator_evaluator/config/UltimateOscillatorEvaluator.json
842 2021-04-15 11:56 reference_tentacles/Evaluator/TA/oscillator_evaluator/config/UltimateOscillatorEvaluator_schema.json
123 2021-04-15 11:59 reference_tentacles/Evaluator/TA/oscillator_evaluator/resources/UltimateOscillatorEvaluator.md
4146 12 files
I created a tentacle as a test and did a github release, but the zip file uses a root dir of the name of the repo, so it is not imported correctly.
https://github.com/dbstraffin/dbstraffin-tentacles/releases/tag/0.1.0
$ unzip -l dbstraffin-tentacles-0.1.0.zip
Archive: dbstraffin-tentacles-0.1.0.zip
45ee1e4adbe1b4f78a15e7b3f29eb38bad556b1c
Length Date Time Name
0 2021-04-16 21:57 dbstraffin-tentacles-0.1.0/
0 2021-04-16 21:57 dbstraffin-tentacles-0.1.0/Evaluator/
0 2021-04-16 21:57 dbstraffin-tentacles-0.1.0/Evaluator/TA/
0 2021-04-16 21:57 dbstraffin-tentacles-0.1.0/Evaluator/TA/oscillator_evaluator/
95 2021-04-16 21:57 dbstraffin-tentacles-0.1.0/Evaluator/TA/oscillator_evaluator/__init__.py
0 2021-04-16 21:57 dbstraffin-tentacles-0.1.0/Evaluator/TA/oscillator_evaluator/config/
85 2021-04-16 21:57 dbstraffin-tentacles-0.1.0/Evaluator/TA/oscillator_evaluator/config/UltimateOscillatorEvaluator.json
842 2021-04-16 21:57 dbstraffin-tentacles-0.1.0/Evaluator/TA/oscillator_evaluator/config/UltimateOscillatorEvaluator_schema.json
149 2021-04-16 21:57 dbstraffin-tentacles-0.1.0/Evaluator/TA/oscillator_evaluator/metadata.json
2895 2021-04-16 21:57 dbstraffin-tentacles-0.1.0/Evaluator/TA/oscillator_evaluator/oscillator.py
0 2021-04-16 21:57 dbstraffin-tentacles-0.1.0/Evaluator/TA/oscillator_evaluator/resources/
123 2021-04-16 21:57 dbstraffin-tentacles-0.1.0/Evaluator/TA/oscillator_evaluator/resources/UltimateOscillatorEvaluator.md
261 2021-04-16 21:57 dbstraffin-tentacles-0.1.0/metadata.yaml
4450 13 files
I understand I could setup a cicd build pipeline in order to properly use tenatacles-manager to create the zip file, but that raises the barrier to entry for contributors to the community.
Admin
Herklos - Apr 2021
Hi Dennis, it's a good suggestion, but you can already do this with TENTACLES_URL environment var (you can find it in OctoBot/octobot/constants.py:48).