Azure / simdem

Tool for Simulating Demo's, delivering Tutorials and using documentation as tests.
MIT License
34 stars 17 forks source link

How do we define defaults for test purposes when user input is required? #118

Open jasonmesser7 opened 2 years ago

jasonmesser7 commented 2 years ago

What is the default way we are going to handle writing documentation where we cannot have environment variables in an evn.json file? How do we request custom input?

I was just exporting the variable declarations in the setup. i.e

image

But what do we do for custom values the user needs to input? How can we ask for custom input while still having simdem run automatically? Unfortunately, any local declarations made will overrun env.json variables declared behind the scenes during a simdem run.

image

SorraTheOrc commented 2 years ago

What are the circumstances in which you cannot have an env file available?

jasonmesser7 commented 2 years ago

The way that documentation works today there is no location for an env file. Would you recommend we provide an env file for every 'simdem' document which is in documentation?

rgardler-msft commented 2 years ago

Rather than try to make SimDem jump through hoops lets establish whether it is viable to include env files alongside documentation. I don't see any reason why not. We might be able to be creative too. For example, there is already the [!INCLUDE directive for docs so why not include the env file directly in the docs when rendered.

On the surface that would seem to be a nice tidy solution.

Of course, we do have the problem that SimDem today uses a dodgy JSON format for env files. That needs to be fixed.