-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Support external config files #2163
Comments
I think the current option is more convenient. Why isn't it possible to create a config folder in your gekko/ folder? |
This suggestion will not remove current option, it will just extend it to support external configs. It works to generate inside gekko and that’s how I initially started, but I had a copy of gekko in source control and these config files might change frequently to monitor currencies based on their performance. Every time i was generating configs, package.json was changing and also files there, so I didn't want to make direct changes in gekko folder in order to continue and be able to get latest updates from gekko. This way i build multi-gekko as external tool that will not affect gekko(well currently yes because of this util.js). So making it external gave me the option to not make commits for every change of asset or strategy and kept gekko clean, while on the other side multi-gekko can scale independently from gekko. |
Yes this is a big issue. Even though most modules inside Gekko are modular and independent of each other most files still import util which requires a config. That came out of a time when the whole codebase was very small and this was managable. Here is an example of a huge part of the codebase that I am completely pulling out of these weird dependencies: #2118 Going forward I want to do that for a lot more modules. Quick question: what kind of code are you looking to use outside Gekko? |
As I explained in previous comment, I was building this dynamic config generator to make it easier to monitor multiple assets and currencies with multiple strategies. You may have a look at multi-gekko, that's the case I had! Initially i started as everyone, just dropping my files inside gekko folder but then I had two machines and I had to commit changes very frequently to reflect on the other one. I ignored configs folder that was being generated but I didn't like that |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If you feel this is very a important issue please reach out the maintainer of this project directly via e-mail: gekko at mvr dot me. |
I was playing with a project to generate multiple config files based on currency and strategy and I didn't want to "pollute" gekko project with custom files. What I was trying to do is feed gekko with config file and start it from a different project(location) and seems it's not supported because of this part of the code in
core/util.js
:Current code supports only config files located within gekko folder!
I'd propose to support both cases so config file can be provided from within gekko project or external path. Making this small change could make it more flexible and support cases like mine where you don't want to make changes directly in gekko project but adding features from external projects:
So we could start gekko also like so:
node /path/to/gekko/gekko --config /path/to/config.js
I could make a PR if needed!
UPDATE: This method supports current cli method and the method I suggested. It’ll not remove current option!
The text was updated successfully, but these errors were encountered: