dipdup icon indicating copy to clipboard operation
dipdup copied to clipboard

Interactive config generator

Open droserasprout opened this issue 1 year ago • 4 comments

dipdup new command currently can render one of templates with minor variations. Let's call it "from template" mode. We also need an "interactive mode". Start from empty config, then ask repetitive questions to construct config. Possible steps:

  • Add contract -> Select kind -> Set address/hash -> Repeat?
  • Add datasource -> Select kind -> Set URL/keys -> Repeat?
  • Add index -> Select kind -> Select contracts/events ->Repeat?

When done, dump resulting YAML as a root config. There's a tricky thing in this task, compose-style env variables.

droserasprout avatar Sep 18 '24 22:09 droserasprout

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

With over four years in blockchain and backend development, I’ve worked across different ecosystems, handling everything from smart contract design to on-chain interactions and protocol integration. I focus on building secure, scalable, and reliable blockchain applications, managing both on-chain and off-chain infrastructure.

How I plan on tackling this issue

As this will be my first time contributing here, I'd go over the dipdups implemation design for the template mode. Then proceed to working on the task.

JoE11-y avatar Sep 26 '24 09:09 JoE11-y

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have over 5 years of experience as a Python developer, I’ve been involved in the Starknet community early on, working on multiple projects with data indexing projects being a big chunk of them and I even lead a project myself.

I’ve already explored the DipDup codebase, I’ve checked, among others, how the CLI commands are implemented and I'm now all set to start contributing right away, the project is installed in my machine, and I'm able to make changes and test them

How I plan on tackling this issue

  • I’ll edit cli.py by adding an interactive command to guide users through generating dipdup.conf files step-by-step as described in the issue with a repeat behavior ….
  • I’ll make sure to follow the same logic and patterns and even reuse the functions from project.py like prompt_anyof
  • Will see how to do with the compose-style env vars and make sure they are properly handled
  • Obviously, I’ll write docs on how to use this new way of creating projects

bigherc18 avatar Sep 26 '24 09:09 bigherc18

I think I'll proceed by trying to implement this on the create project from scratch route.

@droserasprout

JoE11-y avatar Oct 02 '24 05:10 JoE11-y